Skip to content

Commit

Permalink
Add Rails 7.2 support (#484)
Browse files Browse the repository at this point in the history
This change adds Rails 7.2 support and updates our CI configuration to test it.

---------

Co-authored-by: Philip Arndt <[email protected]>
  • Loading branch information
AhmedAliIbrahim and parndt authored Aug 28, 2024
1 parent cb672d9 commit 11f3cac
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 7 deletions.
35 changes: 34 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
sqlite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
gemfile:
Expand All @@ -21,6 +22,7 @@ jobs:
- rails_6_1
- rails_7_0
- rails_7_1
- rails_7_2
- rails_main
exclude:
- ruby: '3.2'
Expand All @@ -35,7 +37,7 @@ jobs:
- ruby: '3.0'
gemfile: rails_5_2

# Rails 8 requires Ruby 3.1 or higher
# Rails 7.2 requires Ruby 3.1 or higher
- ruby: '2.6'
gemfile: rails_main

Expand All @@ -50,6 +52,15 @@ jobs:

- ruby: '2.6'
gemfile: rails_7_1

- ruby: '2.6'
gemfile: rails_7_2

- ruby: '2.7'
gemfile: rails_7_2

- ruby: '3.0'
gemfile: rails_7_2
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true
Expand All @@ -73,6 +84,7 @@ jobs:
mysql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1']
gemfile:
Expand All @@ -81,6 +93,7 @@ jobs:
- rails_6_1
- rails_7_0
- rails_7_1
- rails_7_2
- rails_main
exclude:
- ruby: '3.2'
Expand Down Expand Up @@ -110,6 +123,15 @@ jobs:

- ruby: '2.6'
gemfile: rails_7_1

- ruby: '2.6'
gemfile: rails_7_2

- ruby: '2.7'
gemfile: rails_7_2

- ruby: '3.0'
gemfile: rails_7_2
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true
Expand Down Expand Up @@ -148,6 +170,7 @@ jobs:
postgres:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
gemfile:
Expand All @@ -156,6 +179,7 @@ jobs:
- rails_6_1
- rails_7_0
- rails_7_1
- rails_7_2
- rails_main
exclude:
- ruby: '3.2'
Expand Down Expand Up @@ -185,6 +209,15 @@ jobs:

- ruby: '2.6'
gemfile: rails_7_1

- ruby: '2.6'
gemfile: rails_7_2

- ruby: '2.7'
gemfile: rails_7_2

- ruby: '3.0'
gemfile: rails_7_2
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true
Expand Down
9 changes: 8 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{ '5_2' => '5.2.0', '6_0' => '6.0.0', '6_1' => '6.1.0', '7_0' => '7.0.0', '7_1' => '7.1.0' }.each do |rails, version|
{
"5_2" => "5.2.0",
"6_0" => "6.0.0",
"6_1" => "6.1.0",
"7_0" => "7.0.0",
"7_1" => "7.1.0",
"7_2" => "7.2.0"
}.each do |rails, version|
appraise "rails-#{rails}" do
gem "rails", "~> #{version}"
end
Expand Down
4 changes: 2 additions & 2 deletions awesome_nested_set.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Gem::Specification.new do |s|

s.required_ruby_version = '>= 2.0.0'

s.add_runtime_dependency 'activerecord', '>= 4.0.0', '< 7.2'
s.add_runtime_dependency 'activerecord', '>= 4.0.0', '< 8.0'

s.add_development_dependency 'appraisal'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'pry'
s.add_development_dependency 'pry-nav'
s.add_development_dependency 'rake', '~> 13'
s.add_development_dependency 'rspec-rails', '~> 4.0.0'
s.add_development_dependency 'rspec-rails', '>= 4.0.0', '<= 6.2'
end
2 changes: 1 addition & 1 deletion gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
gem "rails", "~> 6.0.0"

platforms :ruby do
gem "sqlite3"
gem "sqlite3", "~> 1.4"
gem "mysql2", "< 1.0.0"
gem "pg", "< 2.0.0"
end
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
gem "rails", "~> 6.1.0"

platforms :ruby do
gem "sqlite3"
gem "sqlite3", "~> 1.4"
gem "mysql2", "< 1.0.0"
gem "pg", "< 2.0.0"
end
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source "https://rubygems.org"
gem "rails", "~> 7.0.0"

platforms :ruby do
gem "sqlite3"
gem "sqlite3", "~> 1.4"
gem "mysql2", "< 1.0.0"
gem "pg", "< 2.0.0"
end
Expand Down
13 changes: 13 additions & 0 deletions gemfiles/rails_7_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", "~> 7.2.0"

platforms :ruby do
gem "mysql2", "< 1.0.0"
gem "pg", "< 2.0.0"
gem "sqlite3"
end

gemspec path: "../"

0 comments on commit 11f3cac

Please sign in to comment.