Skip to content

Commit

Permalink
Merge pull request #3051 from DataDog/tonycthsu/activerecord-util-db-…
Browse files Browse the repository at this point in the history
…adapter

Fix ActiveRecord adapter name for Rails 7
  • Loading branch information
TonyCTHsu authored Aug 22, 2023
2 parents 13f4732 + e944eb9 commit 20fa281
Show file tree
Hide file tree
Showing 21 changed files with 1,426 additions and 899 deletions.
28 changes: 22 additions & 6 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,15 @@ elsif ruby_version?('2.3')
appraise 'core-old' do
gem 'dogstatsd-ruby', '~> 4'
end

# Somehow, I failed to install this appraisal group with Ruby 2.4
appraise 'activerecord-3' do
gem 'activerecord', '~> 3'
gem 'mysql2', '~> 0.3.0'
gem 'activerecord-mysql-adapter'
gem 'sqlite3', '~> 1.3.0'
gem 'makara', '~> 0.3.0'
end
# ----------------------------------------------------------------------------------------------------------------------
elsif ruby_version?('2.4')
appraise 'hanami-1' do
Expand Down Expand Up @@ -703,6 +712,13 @@ elsif ruby_version?('2.4')
gem 'que', '>= 1.0.0', '< 2.0.0'
end

appraise 'activerecord-4' do
gem 'activerecord', '~> 4'
gem 'mysql2'
gem 'sqlite3', '~> 1.3.0'
gem 'makara', '~> 0.3.0'
end

appraise 'sinatra' do
gem 'sinatra'
gem 'rack-test'
Expand Down Expand Up @@ -918,7 +934,7 @@ elsif ruby_version?('2.5')
gem 'actionpack'
gem 'actionview'
gem 'active_model_serializers', '>= 0.10.0'
gem 'activerecord'
gem 'activerecord', "~> 5"
gem 'aws-sdk'
gem 'concurrent-ruby'
gem 'cucumber'
Expand Down Expand Up @@ -948,10 +964,10 @@ elsif ruby_version?('2.5')
gem 'minitest', '>= 5.0.0'
gem 'mongo', '>= 2.8.0', '< 2.15.0' # TODO: FIX TEST BREAKAGES ON >= 2.15 https://github.com/DataDog/dd-trace-rb/issues/1596
gem 'mysql2', '< 1', platform: :ruby
gem 'activerecord-jdbcmysql-adapter', '>= 60.2', platform: :jruby
gem 'activerecord-jdbcmysql-adapter', '>= 52', platform: :jruby
gem 'opensearch-ruby'
gem 'pg', '>= 0.18.4', platform: :ruby
gem 'activerecord-jdbcpostgresql-adapter', '>= 60.2', platform: :jruby
gem 'activerecord-jdbcpostgresql-adapter', '>= 52', platform: :jruby
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
Expand All @@ -970,7 +986,7 @@ elsif ruby_version?('2.5')
gem 'bunny', '~> 2.19.0' # uninitialized constant OpenSSL::SSL::TLS1_3_VERSION for jruby, https://github.com/ruby-amqp/bunny/issues/645
gem 'sqlite3', '~> 1.4.1', platform: :ruby
gem 'stripe', '~> 7.0'
gem 'jdbc-sqlite3', '>= 3.28', platform: :jruby
gem 'activerecord-jdbcsqlite3-adapter', '>= 52', platform: :jruby
gem 'sucker_punch'
gem 'typhoeus'
gem 'que', '>= 1.0.0', '< 2.0.0'
Expand Down Expand Up @@ -1179,7 +1195,7 @@ elsif ruby_version?('2.6')
gem 'actionpack'
gem 'actionview'
gem 'active_model_serializers', '>= 0.10.0'
gem 'activerecord'
gem 'activerecord', "~> 6.0.0"
gem 'aws-sdk'
gem 'concurrent-ruby'
gem 'cucumber', '~> 7' # TODO: Support cucumber 8.x
Expand Down Expand Up @@ -1418,7 +1434,7 @@ elsif ruby_version?('2.7')
gem 'actionpack'
gem 'actionview'
gem 'active_model_serializers', '>= 0.10.0'
gem 'activerecord'
gem 'activerecord', "~> 6.1.0"
gem 'aws-sdk'
gem 'concurrent-ruby'
gem 'cucumber', '~> 7' # TODO: Support cucumber 8.x
Expand Down
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ task :ci do
declare '❌ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:action_view'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:active_model_serializers'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:active_record'

declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:active_support'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ❌ 3.3 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:autoinstrument'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:aws'
Expand Down Expand Up @@ -381,6 +382,10 @@ task :ci do
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal rails61-postgres-sidekiq rake spec:railsactivejob'
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby' => 'bundle exec appraisal rails61-semantic-logger rake spec:railssemanticlogger'

# Running with Old activerecord
declare '❌ 2.1 / ❌ 2.2 / ✅ 2.3 / ❌ 2.4 / ❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ❌ 3.3 / ❌ jruby' => 'bundle exec appraisal activerecord-3 rake spec:active_record'
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ✅ 2.4 / ❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ❌ 3.3 / ❌ jruby' => 'bundle exec appraisal activerecord-4 rake spec:active_record'

# explicitly test Hanami compatability
declare '❌ 2.1 / ❌ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ❌ 3.3 / ❌ jruby' => 'bundle exec appraisal hanami-1 rake spec:hanami'

Expand Down
8 changes: 4 additions & 4 deletions gemfiles/jruby_9.2.21.0_contrib.gemfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 20fa281

Please sign in to comment.