Skip to content

Commit 47f74cb

Browse files
committed
Drop support for Ruby < 2.7 and Rails < 6.0
1 parent 246c797 commit 47f74cb

File tree

6 files changed

+15
-73
lines changed

6 files changed

+15
-73
lines changed

.github/workflows/test.yml

+7-39
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,17 @@ jobs:
1010
- gemfiles/Gemfile-rails-main
1111
- gemfiles/Gemfile-rails-7-0
1212
- gemfiles/Gemfile-rails-6-1
13-
- gemfiles/Gemfile-rails-6-0
14-
- gemfiles/Gemfile-rails-5-2
1513
ruby:
16-
- '3.3'
17-
- '3.2'
18-
- '3.1'
19-
- '3.0'
20-
- '2.7'
21-
- '2.6'
22-
- '2.5'
14+
- "3.3"
15+
- "3.2"
16+
- "3.1"
17+
- "3.0"
18+
- "2.7"
2319
exclude:
24-
- gemfile: Gemfile
25-
ruby: '2.6'
26-
- gemfile: Gemfile
27-
ruby: '2.5'
2820
- gemfile: gemfiles/Gemfile-rails-main
29-
ruby: '3.0'
21+
ruby: "3.0"
3022
- gemfile: gemfiles/Gemfile-rails-main
31-
ruby: '2.7'
32-
- gemfile: gemfiles/Gemfile-rails-main
33-
ruby: '2.6'
34-
- gemfile: gemfiles/Gemfile-rails-main
35-
ruby: '2.5'
36-
- gemfile: gemfiles/Gemfile-rails-7-0
37-
ruby: '2.6'
38-
- gemfile: gemfiles/Gemfile-rails-7-0
39-
ruby: '2.5'
40-
- gemfile: gemfiles/Gemfile-rails-6-0
41-
ruby: '3.3'
42-
- gemfile: gemfiles/Gemfile-rails-6-0
43-
ruby: '3.2'
44-
- gemfile: gemfiles/Gemfile-rails-6-0
45-
ruby: '3.1'
46-
- gemfile: gemfiles/Gemfile-rails-5-2
47-
ruby: '3.3'
48-
- gemfile: gemfiles/Gemfile-rails-5-2
49-
ruby: '3.2'
50-
- gemfile: gemfiles/Gemfile-rails-5-2
51-
ruby: '3.1'
52-
- gemfile: gemfiles/Gemfile-rails-5-2
53-
ruby: '3.0'
54-
- gemfile: gemfiles/Gemfile-rails-5-2
55-
ruby: '2.7'
23+
ruby: "2.7"
5624
runs-on: ubuntu-latest
5725
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
5826
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Unreleased
2-
2+
* breaking changes
3+
* Drop support to Ruby < 2.7
4+
* Drop support to Rails < 6.0
35
* Remove redundant `aria-required` attribute for required fields. [@aduth](https://github.com/aduth)
46

57
## 5.3.1

gemfiles/Gemfile-rails-5-2

-10
This file was deleted.

gemfiles/Gemfile-rails-6-0

-10
This file was deleted.

simple_form.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
2424
s.files = Dir["CHANGELOG.md", "MIT-LICENSE", "README.md", "lib/**/*"]
2525
s.require_paths = ["lib"]
2626

27-
s.required_ruby_version = '>= 2.5.0'
27+
s.required_ruby_version = '>= 2.7.0'
2828

29-
s.add_dependency('activemodel', '>= 5.2')
30-
s.add_dependency('actionpack', '>= 5.2')
29+
s.add_dependency('activemodel', '>= 6.1')
30+
s.add_dependency('actionpack', '>= 6.1')
3131
end

test/action_view_extensions/builder_test.rb

+2-10
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,8 @@ def with_collection_check_boxes(object, attribute, collection, value_method, tex
4646
test "collection radio sanitizes collection values for labels correctly" do
4747
with_collection_radio_buttons @user, :name, ['$0.99', '$1.99'], :to_s, :to_s
4848

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

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

0 commit comments

Comments
 (0)