diff --git a/appraisal/ruby-3.4.rb b/appraisal/ruby-3.4.rb index 4c0cf60bd99..43a4e1eb122 100644 --- a/appraisal/ruby-3.4.rb +++ b/appraisal/ruby-3.4.rb @@ -125,6 +125,9 @@ gem 'sneakers', '>= 2.12.0' gem 'sucker_punch' gem 'que', '>= 1.0.0' + + # When Rack 3+ is used, we need rackup. + gem 'rackup' end [ diff --git a/gemfiles/ruby_3.4_contrib.gemfile b/gemfiles/ruby_3.4_contrib.gemfile index 3afda7b1380..aee3ff4df95 100644 --- a/gemfiles/ruby_3.4_contrib.gemfile +++ b/gemfiles/ruby_3.4_contrib.gemfile @@ -43,6 +43,7 @@ gem "sidekiq", "~> 7" gem "sneakers", ">= 2.12.0" gem "sucker_punch" gem "que", ">= 1.0.0" +gem "rackup" group :check do gem "ruby_memcheck", ">= 3" diff --git a/gemfiles/ruby_3.4_contrib.gemfile.lock b/gemfiles/ruby_3.4_contrib.gemfile.lock index d17af5081a1..5054b7d3ce3 100644 --- a/gemfiles/ruby_3.4_contrib.gemfile.lock +++ b/gemfiles/ruby_3.4_contrib.gemfile.lock @@ -113,6 +113,8 @@ GEM rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) + rackup (2.2.0) + rack (>= 3) rainbow (3.1.1) rake (12.3.3) rake-compiler (1.2.7) @@ -247,6 +249,7 @@ DEPENDENCIES pry-stack_explorer que (>= 1.0.0) rack-test + rackup rake (>= 12.3) rake-compiler (~> 1.1, >= 1.1.1) resque diff --git a/spec/datadog/tracing/contrib/suite/integration_spec.rb b/spec/datadog/tracing/contrib/suite/integration_spec.rb index b6279e74baf..eaf37eb1f8a 100644 --- a/spec/datadog/tracing/contrib/suite/integration_spec.rb +++ b/spec/datadog/tracing/contrib/suite/integration_spec.rb @@ -8,7 +8,7 @@ require 'rack' # `Rack::Handler::WEBrick` was extracted to the `rackup` gem in Rack 3.0 -require 'rackup' if Rack::VERSION[0] >= 3 +require 'rackup' if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3') require 'webrick' RSpec.describe 'contrib integration testing', :integration do