Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rails 7.2 support #484

Merged
merged 11 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 8.0 instead of 7.3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the next release will be 8.0 as I know

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to add the tests configuration for Rails 7.2 like it's done for 7.1 in 034ab03

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ngrebenshikov updated!


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: "../"
Loading