Skip to content

Commit 85c8378

Browse files
authored
Merge pull request #221 from activeadmin-plugins/chore/drop-eol-ruby-rails-add-8.1-ruby4
CI: drop EOL Ruby 3.2 / Rails 7.1, cover Ruby 4.0 and Rails 8.1
2 parents 0167de5 + e90d807 commit 85c8378

4 files changed

Lines changed: 23 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,27 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
ruby: ['3.2', '3.3', '3.4']
20-
rails: ['7.1.0', '7.2.0', '8.0.0']
19+
ruby: ['3.3', '3.4', '4.0']
20+
rails: ['7.2.0', '8.0.0', '8.1.0']
2121
activeadmin: ['3.2.0', '3.3.0', '3.4.0', '3.5.1']
2222
exclude:
23+
# ActiveAdmin 3.2.0 predates Rails 8 support.
2324
- rails: '8.0.0'
2425
activeadmin: '3.2.0'
26+
- rails: '8.1.0'
27+
activeadmin: '3.2.0'
2528
include:
29+
# ActiveAdmin 4 requires railties >= 7.2, so cover its floor and the
30+
# newest supported Rails releases.
2631
- ruby: '3.4'
2732
rails: '7.2.0'
2833
activeadmin: '4.0.0.beta22'
2934
- ruby: '3.4'
3035
rails: '8.0.0'
3136
activeadmin: '4.0.0.beta22'
37+
- ruby: '3.4'
38+
rails: '8.1.0'
39+
activeadmin: '4.0.0.beta22'
3240
env:
3341
RAILS: ${{ matrix.rails }}
3442
AA: ${{ matrix.activeadmin }}

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
source 'https://rubygems.org'
22
gemspec
33

4-
default_rails_version = '7.1.0'
5-
default_activeadmin_version = '3.2.0'
4+
default_rails_version = '8.0.0'
5+
default_activeadmin_version = '3.5.1'
66

77
# `~> 4.0.0.beta22` would admit 4.0.0 GA — pin prereleases exactly so the
88
# CI cell tests the AA build it claims to test.

active_admin_import.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Gem::Specification.new do |gem|
99
gem.summary = 'ActiveAdmin import based on activerecord-import gem.'
1010
gem.homepage = 'https://github.com/activeadmin-plugins/active_admin_import'
1111
gem.license = 'MIT'
12-
gem.required_ruby_version = '>= 3.1.0'
12+
gem.required_ruby_version = '>= 3.3.0'
1313
gem.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
1414
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
1515
gem.name = 'active_admin_import'

tasks/test.rake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ task :setup do
2424
)
2525
# v4 drops sprockets-rails (see Gemfile), so skip the asset pipeline to
2626
# avoid the auto-generated `config/initializers/assets.rb` crashing at boot.
27-
rails_new_opts.unshift('--skip-asset-pipeline') if aa_v4
27+
if aa_v4
28+
rails_new_opts.unshift('--skip-asset-pipeline')
29+
else
30+
# Rails 8.1 wires importmap-rails into the generated ApplicationController
31+
# (`stale_when_importmap_changes`). The AA 3 app uses Sprockets, not
32+
# importmap, so that gem is absent and the controller raises NameError at
33+
# boot. Skip JavaScript so the macro is never generated — the specs run on
34+
# rack_test and never execute JS anyway.
35+
rails_new_opts.unshift('--skip-javascript')
36+
end
2837

2938
system "bundle exec rails new spec/rails/#{TestAppPaths.app_dir_name} #{rails_new_opts.join(' ')}"
3039
end

0 commit comments

Comments
 (0)