Skip to content

Commit

Permalink
test: Update Appraisals for Rails 7.2 (#1112)
Browse files Browse the repository at this point in the history
* chore: Add Appraisals for Rails 7.2

* chore: Add ruby version conditions

Rails 7.2.0 requires Ruby 3.1. We test on Ruby 3.0.
Prevent running the 7.2 tests on that version.

* chore: Restrain pg and que to use Rails < 7.2.0

There is also a bottom constraint of Rails
(or Rails-related gems) 6.1.0 to prevent
cases where Rails 3.2.0 was installed instead.

* chore: Adjust pg activerecord to bottom limit of 6.1

The bundle would install activerecord 3.2 without this constraint.
  • Loading branch information
kaylareopelle authored Aug 12, 2024
1 parent a9e6e1a commit c7569f5
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 2 deletions.
6 changes: 6 additions & 0 deletions instrumentation/action_mailer/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ end
appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
end
end
6 changes: 6 additions & 0 deletions instrumentation/action_pack/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ end
appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
end
end
6 changes: 6 additions & 0 deletions instrumentation/action_view/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ end
appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
end
end
6 changes: 6 additions & 0 deletions instrumentation/active_record/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ end
appraise 'activerecord-7.1' do
gem 'activerecord', '~> 7.1.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'activerecord-7.2' do
gem 'activerecord', '~> 7.2.0'
end
end
6 changes: 6 additions & 0 deletions instrumentation/active_support/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ end
appraise 'activesupport-7.1' do
gem 'activesupport', '~> 7.1.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'activesupport-7.2' do
gem 'activesupport', '~> 7.2.0'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-helpers-sql-obfuscation'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'

spec.add_development_dependency 'activerecord'
spec.add_development_dependency 'activerecord', '> 6.1.0'
spec.add_development_dependency 'appraisal', '~> 2.5'
spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/que/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'activerecord'
gem 'activerecord', '< 7.2.0', '> 6.1.0'
gem 'pg'
gem 'opentelemetry-helpers-sql-obfuscation', path: '../../helpers/sql-obfuscation'
gem 'opentelemetry-instrumentation-base', path: '../base'
Expand Down
6 changes: 6 additions & 0 deletions instrumentation/rails/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ end
appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
appraise 'rails-7.2' do
gem 'rails', '~> 7.2.0'
end
end

0 comments on commit c7569f5

Please sign in to comment.