diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 495df7a..67b8fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,8 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['2.7', '3.0', '3.1', '3.2'] - gemfile: ['rails_6.0','rails_6.1','rails_7.0'] - include: - - ruby-version: '2.7' - gemfile: 'rails_5.2' + ruby-version: ['3.0', '3.1', '3.2', '3.3'] + gemfile: ['rails_6.0','rails_6.1','rails_7.0', 'rails_7.1'] runs-on: ubuntu-latest env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile diff --git a/Appraisals b/Appraisals index b799179..dbae566 100644 --- a/Appraisals +++ b/Appraisals @@ -1,18 +1,13 @@ rails_versions = %w( - 5.2 6.0 6.1 7.0 + 7.1 ) rails_versions.each do |version| appraise "rails_#{version}" do gem "rails", "~> #{version}.0" gem "rails-controller-testing" - if Gem::Version.new(version) >= Gem::Version.new("6.1") - gem 'rspec-rails', '~> 6.0.0' - else - gem 'rspec-rails', '~> 5.0.0' - end end end diff --git a/CHANGELOG.md b/CHANGELOG.md index 442bbd8..1ec8c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,97 +6,100 @@ - Remove support for EOL'd Rails version 4.2 - Remove support for Travis CI and replaced with Github Actions -- Remove support for EOL'd Rails versions 5.0 and 5.1 +- Remove support for EOL'd Rails versions 5.x +- Add support for Rails 7.1 +- Add Ruby's minimum version required to >= 3.0 +- Add note about the project being in maintenance-mode ## [3.1.2] - 2019-05-20 ### Fixed -+ The previous release unintentionally included a `setup` script meant for +- The previous release unintentionally included a `setup` script meant for development only in the packaged gem. This has been removed. ## [3.1.1] - 2019-05-13 ### Fixed -+ Fix UTF-8 encoding error being raised on page requests - [#273] +- Fix UTF-8 encoding error being raised on page requests - [#273] ## [3.1.0] - 2018-05-04 -+ Fix bugs around finding pages via page_ids's that contain non-ASCII characters -+ Trailing slash is no longer required for finding pages -+ Some other improvements around page lookups -+ Don't require format in extension for looking up page id's HAML and Slim do +- Fix bugs around finding pages via page_ids's that contain non-ASCII characters +- Trailing slash is no longer required for finding pages +- Some other improvements around page lookups +- Don't require format in extension for looking up page id's HAML and Slim do not require them. -+ Test against Rails 5, 5.1, 5.2 -+ Test against Ruby 2.4, 2.5 +- Test against Rails 5, 5.1, 5.2 +- Test against Ruby 2.4, 2.5 ## [3.0.0] - 2016-04-15 -+ HighVoltage now supports Rails 5.0.0.beta3 and up. -+ Properly handle extensions in root route constraint requests. -+ Removes caching in preparation for Rails 5. +- HighVoltage now supports Rails 5.0.0.beta3 and up. +- Properly handle extensions in root route constraint requests. +- Removes caching in preparation for Rails 5. ## [2.4.0] - 2015-07-17 -+ Retrieve a list of available static pages via `HighVoltage.page_ids`. -+ Properly handle page ids which are blank when being sanitized. -+ Only provide deprecation warnings around caching when caching is enabled. +- Retrieve a list of available static pages via `HighVoltage.page_ids`. +- Properly handle page ids which are blank when being sanitized. +- Only provide deprecation warnings around caching when caching is enabled. ## [2.3.0] - 2015-04-17 -+ Ruby 2.2 and Rails 4.2 testing -+ Raise InvalidPageIdError when visiting a page with invalid characters -+ Code of Conduct added to Contributing guide +- Ruby 2.2 and Rails 4.2 testing +- Raise InvalidPageIdError when visiting a page with invalid characters +- Code of Conduct added to Contributing guide ## [2.2.1] - 2014-07-23 -+ Resolve issue with require statements for Rails 3.x projects +- Resolve issue with require statements for Rails 3.x projects ## [2.2.0] - 2014-06-24 -+ Deprecate caching because page and action caching was removed in Rails 4 -+ Refactor test suite to use rspec `expect` syntax consistently. -+ Added Rails 4.1 to test suite. -+ Remove Ruby 1.9.2 from test suite. -+ Remove Capybara from test suite. -+ Support dependency injection for Rails engine to define routes on +- Deprecate caching because page and action caching was removed in Rails 4 +- Refactor test suite to use rspec `expect` syntax consistently. +- Added Rails 4.1 to test suite. +- Remove Ruby 1.9.2 from test suite. +- Remove Capybara from test suite. +- Support dependency injection for Rails engine to define routes on ## [2.1.0] - 2013-12-30 -+ Extract configuration options into a module -+ Add ability to configure whether layout is cached with action_caching -+ Add ability to configure a `home_page` for root routing to High Voltage -+ Update README with new block style config +- Extract configuration options into a module +- Add ability to configure whether layout is cached with action_caching +- Add ability to configure a `home_page` for root routing to High Voltage +- Update README with new block style config ## [2.0.0] - 2013-10-05 -+ Extract PagesController into a module -+ Update README with module usage instructions +- Extract PagesController into a module +- Update README with module usage instructions ## [1.2.4] - 2013-07-19 -+ Add page and action caching -+ Remove redundant link style `page_path(id: 'about')` from README -+ Clean up Appraisals for Travis-CI -+ Remove Ruby 1.8.7 from test suite +- Add page and action caching +- Remove redundant link style `page_path(id: 'about')` from README +- Clean up Appraisals for Travis-CI +- Remove Ruby 1.8.7 from test suite ## [1.2.3] - 2013-07-04 -+ Updates for Rails 4 compatibility. -+ Fix for Rails 4 circular dependency error. -+ Add ability to load High Voltage outside of rails. Require `attribute_accessors` +- Updates for Rails 4 compatibility. +- Fix for Rails 4 circular dependency error. +- Add ability to load High Voltage outside of rails. Require `attribute_accessors` ## [1.2.2] - 2013-07-04 -+ Bug fix for RootRoute constraint. Support haml, slim, etc. -+ README updated for root routes. +- Bug fix for RootRoute constraint. Support haml, slim, etc. +- README updated for root routes. ## [1.2.1] - 2013-10-30 -+ Ability to disable HighVoltage routes. -+ New RootRoute constraint. -+ Updated README, with new TravisCI url. +- Ability to disable HighVoltage routes. +- New RootRoute constraint. +- Updated README, with new TravisCI url. [3.1.2]: https://github.com/thoughtbot/high_voltage/compare/v3.1.1...v3.1.2 [3.1.1]: https://github.com/thoughtbot/high_voltage/compare/v3.1.0...v3.1.1 @@ -112,5 +115,4 @@ [1.2.3]: https://github.com/thoughtbot/high_voltage/compare/v1.2.2...v1.2.3 [1.2.2]: https://github.com/thoughtbot/high_voltage/compare/v1.2.1...v1.2.2 [1.2.1]: https://github.com/thoughtbot/high_voltage/compare/v1.2.0...v1.2.1 - [#273]: https://github.com/thoughtbot/high_voltage/pull/273 diff --git a/Gemfile.lock b/Gemfile.lock index 6ab9fd0..6461ae0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,13 +43,13 @@ GEM coderay (1.1.3) concurrent-ruby (1.1.7) crass (1.0.6) - diff-lcs (1.5.0) + diff-lcs (1.5.1) erubi (1.12.0) i18n (1.8.5) concurrent-ruby (~> 1.0) - loofah (2.19.1) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) method_source (1.0.0) mini_mime (1.0.2) mini_portile2 (2.8.5) @@ -65,11 +65,13 @@ GEM rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) railties (6.0.3.3) actionpack (= 6.0.3.3) activesupport (= 6.0.3.3) @@ -78,23 +80,23 @@ GEM thor (>= 0.20.3, < 2.0) rake (13.0.1) regexp_parser (1.8.1) - rspec-core (3.12.1) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.4) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (4.0.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) + rspec-support (~> 3.13.0) + rspec-rails (5.0.3) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) rspec-core (~> 3.10) rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.12.0) + rspec-support (3.13.1) thor (1.0.1) thread_safe (0.3.6) tzinfo (1.2.7) @@ -107,12 +109,12 @@ PLATFORMS ruby DEPENDENCIES - activesupport (>= 5.2) + activesupport (>= 6.0) appraisal capybara high_voltage! pry - rspec-rails (~> 4.0.0) + rspec-rails (~> 5.0.0) BUNDLED WITH 2.2.33 diff --git a/README.md b/README.md index 8b0c73d..5d7b750 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # High Voltage [![Build Status](https://github.com/thoughtbot/high_voltage/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/thoughtbot/high_voltage/actions) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) +> [!NOTE] +> `high_voltage` is in maintenance-mode. We’re not actively adding new features, +but we’ll fix bugs and keep it up to date, and compatible with the latest Ruby +and Rails versions. + Rails engine for static pages. ... but be careful. [Danger!](https://www.youtube.com/watch?v=R-FxmoVM7X4) diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index 2e9cd79..57b8b42 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -4,6 +4,5 @@ source "https://rubygems.org" gem "rails", "~> 6.0.0" gem "rails-controller-testing" -gem "rspec-rails", "~> 5.0.0" gemspec path: "../" diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index bb7961f..1a36ab8 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -4,6 +4,5 @@ source "https://rubygems.org" gem "rails", "~> 6.1.0" gem "rails-controller-testing" -gem "rspec-rails", "~> 6.0.0" gemspec path: "../" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile index c62324a..2be2eae 100644 --- a/gemfiles/rails_7.0.gemfile +++ b/gemfiles/rails_7.0.gemfile @@ -4,6 +4,5 @@ source "https://rubygems.org" gem "rails", "~> 7.0.0" gem "rails-controller-testing" -gem "rspec-rails", "~> 6.0.0" gemspec path: "../" diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_7.1.gemfile similarity index 69% rename from gemfiles/rails_5.2.gemfile rename to gemfiles/rails_7.1.gemfile index 4681a26..45820b6 100644 --- a/gemfiles/rails_5.2.gemfile +++ b/gemfiles/rails_7.1.gemfile @@ -2,8 +2,7 @@ source "https://rubygems.org" -gem "rails", "~> 5.2.0" +gem "rails", "~> 7.1.0" gem "rails-controller-testing" -gem "rspec-rails", "~> 5.0.0" gemspec path: "../" diff --git a/high_voltage.gemspec b/high_voltage.gemspec index 1f1c930..115b795 100644 --- a/high_voltage.gemspec +++ b/high_voltage.gemspec @@ -21,9 +21,10 @@ Gem::Specification.new do |s| s.test_files = [] s.require_paths = ["lib"] - s.add_development_dependency('activesupport', '>= 5.2') + s.required_ruby_version = '>= 3.0' + s.add_development_dependency('activesupport', '>= 6.0') s.add_development_dependency('appraisal') s.add_development_dependency('capybara') s.add_development_dependency('pry') - s.add_development_dependency('rspec-rails', '~> 4.0.0') + s.add_development_dependency('rspec-rails', '~> 5.0.0') end diff --git a/spec/high_voltage/configuration_spec.rb b/spec/high_voltage/configuration_spec.rb index 4142b21..c5346b0 100644 --- a/spec/high_voltage/configuration_spec.rb +++ b/spec/high_voltage/configuration_spec.rb @@ -6,13 +6,11 @@ before(:each) do HighVoltage.configure do |config| - ActiveSupport::Deprecation.silence do - config.content_path = config_value - config.layout = config_value - config.parent_engine = config_value - config.route_drawer = config_value - config.routes = config_value - end + config.content_path = config_value + config.layout = config_value + config.parent_engine = config_value + config.route_drawer = config_value + config.routes = config_value end end