Skip to content

Commit

Permalink
Drop support for Ruby < 2.7 and Rails < 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nashby committed Jun 30, 2024
1 parent 246c797 commit 47f74cb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 73 deletions.
46 changes: 7 additions & 39 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,17 @@ jobs:
- gemfiles/Gemfile-rails-main
- gemfiles/Gemfile-rails-7-0
- gemfiles/Gemfile-rails-6-1
- gemfiles/Gemfile-rails-6-0
- gemfiles/Gemfile-rails-5-2
ruby:
- '3.3'
- '3.2'
- '3.1'
- '3.0'
- '2.7'
- '2.6'
- '2.5'
- "3.3"
- "3.2"
- "3.1"
- "3.0"
- "2.7"
exclude:
- gemfile: Gemfile
ruby: '2.6'
- gemfile: Gemfile
ruby: '2.5'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '3.0'
ruby: "3.0"
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.7'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.6'
- gemfile: gemfiles/Gemfile-rails-main
ruby: '2.5'
- gemfile: gemfiles/Gemfile-rails-7-0
ruby: '2.6'
- gemfile: gemfiles/Gemfile-rails-7-0
ruby: '2.5'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '3.3'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '3.2'
- gemfile: gemfiles/Gemfile-rails-6-0
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '3.3'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '3.2'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '3.1'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '3.0'
- gemfile: gemfiles/Gemfile-rails-5-2
ruby: '2.7'
ruby: "2.7"
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

* breaking changes
* Drop support to Ruby < 2.7
* Drop support to Rails < 6.0
* Remove redundant `aria-required` attribute for required fields. [@aduth](https://github.com/aduth)

## 5.3.1
Expand Down
10 changes: 0 additions & 10 deletions gemfiles/Gemfile-rails-5-2

This file was deleted.

10 changes: 0 additions & 10 deletions gemfiles/Gemfile-rails-6-0

This file was deleted.

6 changes: 3 additions & 3 deletions simple_form.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Gem::Specification.new do |s|
s.files = Dir["CHANGELOG.md", "MIT-LICENSE", "README.md", "lib/**/*"]
s.require_paths = ["lib"]

s.required_ruby_version = '>= 2.5.0'
s.required_ruby_version = '>= 2.7.0'

s.add_dependency('activemodel', '>= 5.2')
s.add_dependency('actionpack', '>= 5.2')
s.add_dependency('activemodel', '>= 6.1')
s.add_dependency('actionpack', '>= 6.1')
end
12 changes: 2 additions & 10 deletions test/action_view_extensions/builder_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,8 @@ def with_collection_check_boxes(object, attribute, collection, value_method, tex
test "collection radio sanitizes collection values for labels correctly" do
with_collection_radio_buttons @user, :name, ['$0.99', '$1.99'], :to_s, :to_s

# Rails 6 changed the way it sanitizes the values
# https://github.com/rails/rails/blob/6-0-stable/actionview/lib/action_view/helpers/tags/base.rb#L141
# https://github.com/rails/rails/blob/5-2-stable/actionview/lib/action_view/helpers/tags/base.rb#L141
if ActionView::VERSION::MAJOR == 5
assert_select 'label.collection_radio_buttons[for=user_name_099]', '$0.99'
assert_select 'label.collection_radio_buttons[for=user_name_199]', '$1.99'
else
assert_select 'label.collection_radio_buttons[for=user_name_0_99]', '$0.99'
assert_select 'label.collection_radio_buttons[for=user_name_1_99]', '$1.99'
end
assert_select 'label.collection_radio_buttons[for=user_name_0_99]', '$0.99'
assert_select 'label.collection_radio_buttons[for=user_name_1_99]', '$1.99'
end

test "collection radio checks the correct value to local variables" do
Expand Down

0 comments on commit 47f74cb

Please sign in to comment.