Skip to content

Commit

Permalink
Rails 7.2 compatibility (#1632)
Browse files Browse the repository at this point in the history
* Add rails_7_2 appraisal

* Fix deprecated global Deprecation behavior

* Fix default value for attributes breaking in Rails 7.2

See rails/rails#44666

* Fix deprecated argument in Rails 7.1 and newer

Removed in Rails 8.0, see rails/rails@8069cc8

* Support Rails 7.2 counter_cache configuration

See rails/rails#51453

* Support Rails 7.2 normalized reflections API

See rails/rails#51726
  • Loading branch information
theodorton authored Aug 15, 2024
1 parent 1484cbd commit 5c92966
Show file tree
Hide file tree
Showing 10 changed files with 544 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- 3.1.4
- 3.0.6
appraisal:
- rails_7_2
- rails_7_1
- rails_7_0
- rails_6_1
Expand All @@ -44,6 +45,7 @@ jobs:
- { ruby: 3.2.2, appraisal: rails_6_1 }
- { ruby: 3.0.6, appraisal: rails_7_0 }
- { ruby: 3.0.6, appraisal: rails_7_1 }
- { ruby: 3.0.6, appraisal: rails_7_2 }
env:
DATABASE_ADAPTER: ${{ matrix.adapter }}
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
Expand Down
35 changes: 35 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,38 @@ appraise 'rails_7_1' do
gem 'sqlite3', '~> 1.4'
gem 'pg', '~> 1.1'
end

appraise 'rails_7_2' do
instance_eval(&shared_spring_dependencies)
instance_eval(&controller_test_dependency)

gem 'rails', '~> 7.2.0'

# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
gem 'brakeman', require: false

# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
gem 'rubocop-rails-omakase', require: false

gem 'sprockets-rails'
gem 'puma', '~> 6.0'
gem 'importmap-rails'
gem 'turbo-rails'
gem 'stimulus-rails'
gem 'jbuilder'
gem 'bootsnap', require: false
gem 'capybara'
gem 'selenium-webdriver'
gem 'webdrivers'

# test dependencies
gem 'rspec-rails', '~> 6.0'
gem 'shoulda-context', '~> 2.0.0'

# other dependencies
gem 'bcrypt', '~> 3.1.7'

# Database adapters
gem 'sqlite3', '~> 1.4'
gem 'pg', '~> 1.1'
end
44 changes: 44 additions & 0 deletions gemfiles/rails_7_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal", "2.5.0"
gem "bundler", "~> 2.0"
gem "pry"
gem "pry-byebug"
gem "rake", "13.0.1"
gem "rspec", "~> 3.9"
gem "rubocop", require: false
gem "rubocop-packaging", require: false
gem "rubocop-rails", require: false
gem "warnings_logger"
gem "zeus", require: false
gem "fssm"
gem "redcarpet"
gem "rouge"
gem "yard"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "rails-controller-testing", ">= 1.0.1"
gem "rails", "~> 7.2.0"
gem "brakeman", require: false
gem "rubocop-rails-omakase", require: false
gem "sprockets-rails"
gem "puma", "~> 6.0"
gem "importmap-rails"
gem "turbo-rails"
gem "stimulus-rails"
gem "jbuilder"
gem "bootsnap", require: false
gem "capybara"
gem "selenium-webdriver"
gem "webdrivers"
gem "rspec-rails", "~> 6.0"
gem "shoulda-context", "~> 2.0.0"
gem "bcrypt", "~> 3.1.7"
gem "sqlite3", "~> 1.4"
gem "pg", "~> 1.1"

if RUBY_VERSION >= "3.1" && RUBY_VERSION < "3.2"
gem "error_highlight", ">= 0.4.0", platforms: [:ruby]
end
Loading

0 comments on commit 5c92966

Please sign in to comment.