Skip to content

Commit 4cd8e99

Browse files
committed
Add testing of various activesupport versions
1 parent 3400ad2 commit 4cd8e99

File tree

3 files changed

+40
-12
lines changed

3 files changed

+40
-12
lines changed

.github/workflows/ci.yaml

+24-4
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,38 @@ jobs:
99
ci:
1010
runs-on: ubuntu-latest
1111
strategy:
12+
fail-fast: false
1213
matrix:
1314
ruby-version:
14-
- '2.5'
15-
- '2.6'
1615
- '2.7'
1716
- '3.0'
1817
- '3.1'
1918
- '3.2'
2019
- '3.3'
21-
- '3.2'
22-
- '3.3'
20+
rails-version:
21+
- '6.0'
22+
- '6.1'
23+
- '7.0'
24+
- '7.1'
25+
include:
26+
# Rails 7.0 and 7.1 support Ruby >= 2.7.0
27+
- ruby-version: '2.5'
28+
rails-version: '6.0'
29+
- ruby-version: '2.5'
30+
rails-version: '6.1'
31+
- ruby-version: '2.6'
32+
rails-version: '6.0'
33+
- ruby-version: '2.6'
34+
rails-version: '6.1'
35+
# Rails 7.2 supports Ruby >= 3.1.0
36+
- ruby-version: '3.1'
37+
rails-version: '7.2'
38+
- ruby-version: '3.2'
39+
rails-version: '7.2'
40+
- ruby-version: '3.3'
41+
rails-version: '7.2'
2342
env:
43+
TEST_RAILS_VERSION: "${{ matrix.rails-version }}"
2444
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}"
2545
steps:
2646
- uses: actions/checkout@v4

Gemfile

+13-8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ require File.join(Bundler::Plugin.index.load_paths("bundler-inject")[0], "bundle
66
# Specify your gem's dependencies in more_core_extensions.gemspec
77
gemspec
88

9-
# Rails 5 dropped support for Ruby < 2.2.2
10-
# Rails 6 dropped support for Ruby < 2.4.4
11-
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2.2")
12-
active_support_version = "< 5"
13-
elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.4")
14-
active_support_version = "< 6"
15-
end
16-
gem 'activesupport', active_support_version
9+
minimum_version =
10+
case ENV['TEST_RAILS_VERSION']
11+
when "7.2", nil
12+
"~>7.2.1"
13+
when "7.1"
14+
"~>7.1.4"
15+
when "7.0"
16+
"~>7.0.8"
17+
else "6.1"
18+
"~>6.1.7"
19+
end
20+
21+
gem "activesupport", minimum_version

spec/spec_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33

44
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
55
require "more_core_extensions/all"
6+
7+
puts
8+
puts "\e[93mUsing ActiveSupport #{ActiveSupport.version}\e[0m"

0 commit comments

Comments
 (0)