Skip to content

Commit 9e1b24c

Browse files
committed
Remove support for EOL Ruby 2.5
Ruby 2.5 went EOL 2021-03-31. It is no longer supported upstream and so is not receiving bug fixes, including for security issues. Reduce the testing resources on RailsAdmin. https://www.ruby-lang.org/en/downloads/branches/ Dropping EOL Ruby versions allows the project to begin taking advantage of newer syntax and library features. TargetRubyVersion was removed from .rubocop.yml as this value is determined automatically from the gemspec.
1 parent 5cd807e commit 9e1b24c

8 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
orm: [active_record]
1414
adapter: [sqlite3]
1515
include:
16-
- ruby: 2.5
16+
- ruby: 2.6
1717
gemfile: gemfiles/rails_6.0.gemfile
1818
orm: active_record
1919
adapter: sqlite3

.rubocop.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ AllCops:
88
- "spec/dummy_app/tmp/**/*"
99
- "vendor/bundle/**/*"
1010
NewCops: disable
11-
TargetRubyVersion: 2.5
1211

1312
Gemspec/DateAssignment:
1413
Enabled: true

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ If you think you found a bug in RailsAdmin, you can [submit an issue](https://gi
9898

9999
This library aims to support and is [tested against][ghactions] the following Ruby implementations:
100100

101-
- Ruby 2.5
102101
- Ruby 2.6
103102
- Ruby 2.7
104103
- Ruby 3.0

lib/rails_admin/bootstrap-sass/sass_functions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def ie_hex_str(color)
88
assert_type color, :Color
99
alpha = (color.alpha * 255).round
1010
alphastr = alpha.to_s(16).rjust(2, '0')
11-
Sass::Script::String.new("##{alphastr}#{color.send(:hex_str)[1..-1]}".upcase)
11+
Sass::Script::String.new("##{alphastr}#{color.send(:hex_str)[1..]}".upcase)
1212
end
1313
declare :ie_hex_str, [:color] if respond_to?(:declare)
1414
end

rails_admin.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
2525
spec.homepage = 'https://github.com/railsadminteam/rails_admin'
2626
spec.name = 'rails_admin'
2727
spec.require_paths = %w[lib]
28-
spec.required_ruby_version = '>= 2.5.0'
28+
spec.required_ruby_version = '>= 2.6.0'
2929
spec.required_rubygems_version = '>= 1.8.11'
3030
spec.summary = 'Admin for Rails'
3131
spec.version = RailsAdmin::Version

spec/integration/actions/export_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
click_button 'Export to csv'
8787
csv = CSV.parse page.driver.response.body
8888
expect(csv[0]).to match_array ['Id', 'Commentable', 'Commentable type', 'Content', 'Created at', 'Updated at']
89-
csv[1..-1].each do |line|
89+
csv[1..].each do |line|
9090
expect(line[csv[0].index('Commentable')]).to eq(@player.id.to_s)
9191
expect(line[csv[0].index('Commentable type')]).to eq(@player.class.to_s)
9292
end

spec/integration/actions/index_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ def visit_page(page)
898898
end
899899
end
900900
end
901-
visit index_path(model_name: 'player', query: player.name[1..-1])
901+
visit index_path(model_name: 'player', query: player.name[1..])
902902
is_expected.to have_no_content(player.name)
903903
end
904904
end
@@ -1141,7 +1141,7 @@ def visit_page(page)
11411141
visit index_path(model_name: 'team')
11421142
cols = all('th').collect(&:text)
11431143
expect(cols[0..3]).to eq(all_team_columns[1..4])
1144-
expect(cols).to contain_exactly(*all_team_columns[1..-1])
1144+
expect(cols).to contain_exactly(*all_team_columns[1..])
11451145
expect(page).to have_selector('.ra-sidescroll[data-ra-sidescroll=2]')
11461146
end
11471147

@@ -1225,7 +1225,7 @@ def visit_page(page)
12251225
visit index_path(model_name: 'team')
12261226
cols = all('th').collect(&:text)
12271227
expect(cols[0..3]).to eq(all_team_columns[1..4])
1228-
expect(cols).to contain_exactly(*all_team_columns[1..-1])
1228+
expect(cols).to contain_exactly(*all_team_columns[1..])
12291229
expect(page).to have_selector('.ra-sidescroll[data-ra-sidescroll=3]')
12301230
end
12311231
end

spec/rails_admin/adapters/active_record_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class PlayerWithDefaultScope < Player
101101

102102
it '#destroy destroys multiple items' do
103103
abstract_model.destroy(@players[0..1])
104-
expect(Player.all).to eq(@players[2..-1])
104+
expect(Player.all).to eq(@players[2..])
105105
end
106106

107107
it '#where returns filtered results' do

0 commit comments

Comments
 (0)