Skip to content

Commit

Permalink
fix rack 3/rackup situation on ruby 3.4
Browse files Browse the repository at this point in the history
rack 3.1.0 deletes Rack::VERSION constant (in
rack/rack#1966),
causing our tests to fail.

Use Rack::RELEASE instead of Rack::VERSION
to work around the issue
  • Loading branch information
p authored and TonyCTHsu committed Nov 5, 2024
1 parent b3a00f4 commit dd90f2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions appraisal/ruby-3.4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

[
Expand Down
1 change: 1 addition & 0 deletions gemfiles/ruby_3.4_contrib.gemfile

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

2 changes: 1 addition & 1 deletion spec/datadog/tracing/contrib/suite/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd90f2e

Please sign in to comment.