From 6332ae8c780a88878e298d3b37aa9f326303669a Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 15:34:12 -0600 Subject: [PATCH 01/10] Require ruby >= 3.0.0 --- high_voltage.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/high_voltage.gemspec b/high_voltage.gemspec index 1f1c930..ff56b29 100644 --- a/high_voltage.gemspec +++ b/high_voltage.gemspec @@ -21,6 +21,7 @@ Gem::Specification.new do |s| s.test_files = [] s.require_paths = ["lib"] + s.required_ruby_version = '>= 3.0' s.add_development_dependency('activesupport', '>= 5.2') s.add_development_dependency('appraisal') s.add_development_dependency('capybara') From 9e5d5aa1e1d1b1b3cdc2e52c00955355e32531c5 Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 15:41:11 -0600 Subject: [PATCH 02/10] Drop support for Rails 5.2 --- .github/workflows/ci.yml | 3 --- Appraisals | 1 - gemfiles/rails_5.2.gemfile | 9 --------- 3 files changed, 13 deletions(-) delete mode 100644 gemfiles/rails_5.2.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 495df7a..326952e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,6 @@ jobs: 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' runs-on: ubuntu-latest env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile diff --git a/Appraisals b/Appraisals index b799179..27ca49f 100644 --- a/Appraisals +++ b/Appraisals @@ -1,5 +1,4 @@ rails_versions = %w( - 5.2 6.0 6.1 7.0 diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile deleted file mode 100644 index 4681a26..0000000 --- a/gemfiles/rails_5.2.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "rails", "~> 5.2.0" -gem "rails-controller-testing" -gem "rspec-rails", "~> 5.0.0" - -gemspec path: "../" From b0d4be2630d0eb1ab5af8121c9dd1d175168105d Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 15:41:28 -0600 Subject: [PATCH 03/10] Bump activesupport and rspec-rails versions Dropping support to rails 5.2 allows us to bump these versions. --- Gemfile.lock | 42 ++++++++++++++++++++++-------------------- high_voltage.gemspec | 4 ++-- 2 files changed, 24 insertions(+), 22 deletions(-) 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/high_voltage.gemspec b/high_voltage.gemspec index ff56b29..115b795 100644 --- a/high_voltage.gemspec +++ b/high_voltage.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = '>= 3.0' - s.add_development_dependency('activesupport', '>= 5.2') + 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 From ee83154a2478c87264a01d6366621a787f0c93b1 Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 15:50:56 -0600 Subject: [PATCH 04/10] Remove rspec-rails calls from each gemfile This warning was being displayed by keeping this block: ``` Your Gemfile lists the gem rspec-rails (~> 5.0.0) more than once. You should probably keep only one of them. Remove any duplicate entries and specify the gem only once. While it's not a problem now, it could cause errors if you change the version of one of them later. ``` I don't know why they were added but they seem to not be needed anymore. --- .github/workflows/ci.yml | 2 +- Appraisals | 6 +----- CHANGELOG.md | 2 ++ gemfiles/rails_6.0.gemfile | 1 - gemfiles/rails_6.1.gemfile | 1 - gemfiles/rails_7.0.gemfile | 1 - gemfiles/rails_7.1.gemfile | 8 ++++++++ 7 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 gemfiles/rails_7.1.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 326952e..b2466e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: ruby-version: ['2.7', '3.0', '3.1', '3.2'] - gemfile: ['rails_6.0','rails_6.1','rails_7.0'] + 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 27ca49f..dbae566 100644 --- a/Appraisals +++ b/Appraisals @@ -2,16 +2,12 @@ rails_versions = %w( 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..838a18c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ - 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 ## [3.1.2] - 2019-05-20 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_7.1.gemfile b/gemfiles/rails_7.1.gemfile new file mode 100644 index 0000000..45820b6 --- /dev/null +++ b/gemfiles/rails_7.1.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.1.0" +gem "rails-controller-testing" + +gemspec path: "../" From e6e6d9a05c3d31c87479248823ea9a93b3ade7af Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 16:26:23 -0600 Subject: [PATCH 05/10] Remove unnecessary deprecator silence block This block was added when caching was deprecated. It's been a long time since we don't support native caching anymore, so we don't need to silence any deprecations here. --- spec/high_voltage/configuration_spec.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 From 86cbc48fa545bba824c1a0496aeb06df963690ce Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 16:31:51 -0600 Subject: [PATCH 06/10] Drop support of Ruby 2.7 --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 87 ++++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2466e3..e89d586 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['2.7', '3.0', '3.1', '3.2'] + ruby-version: ['3.0', '3.1', '3.2'] gemfile: ['rails_6.0','rails_6.1','rails_7.0', 'rails_7.1'] runs-on: ubuntu-latest env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 838a18c..43480f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,99 +6,99 @@ - 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 ## [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 @@ -114,5 +114,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 From 1563beb3f8316ee71b69c66757a989b59f935a9f Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 16:35:30 -0600 Subject: [PATCH 07/10] Include ruby 3.3 in the CI matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e89d586..67b8fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['3.0', '3.1', '3.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: From 9e8167266c88ce2eacfa27fcb1459c47af01a231 Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 16:57:26 -0600 Subject: [PATCH 08/10] Add note about maintenance-mode --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 916dace..bb26e2a 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) From 9bbed776b443f7595e26e38a0d7818e7b64f2ecf Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Tue, 19 Mar 2024 16:58:32 -0600 Subject: [PATCH 09/10] Add maintenance-mode note in the changelog [ci-skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43480f7..1ec8c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - 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 From 1a154351a5222940d88b6e3f5132c5850ac0d33a Mon Sep 17 00:00:00 2001 From: Stefanni Brasil Date: Mon, 25 Mar 2024 12:33:21 -0600 Subject: [PATCH 10/10] Capitalize Ruby and Rails --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bb26e2a..07c444b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ > [!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. +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.