Skip to content

Commit

Permalink
Merge pull request #318 from thoughtbot/sb-drop-rails-eol
Browse files Browse the repository at this point in the history
Drop support for Rails 5.2, Ruby 2.7, and add support Rails 7.1
  • Loading branch information
Stefanni Brasil authored Mar 25, 2024
2 parents 8c45a44 + 1a15435 commit d79759f
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 89 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -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
90 changes: 46 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
42 changes: 22 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 0 additions & 1 deletion gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
1 change: 0 additions & 1 deletion gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
1 change: 0 additions & 1 deletion gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
3 changes: 1 addition & 2 deletions gemfiles/rails_5.2.gemfile → gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
5 changes: 3 additions & 2 deletions high_voltage.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 5 additions & 7 deletions spec/high_voltage/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d79759f

Please sign in to comment.