Skip to content

Commit

Permalink
Merge pull request #570 from Tapjoy/fix/rack3
Browse files Browse the repository at this point in the history
Fix coverband:coverage_server rake task not being compatible with Rack 3 / Rackup
  • Loading branch information
danmayer authored Jan 11, 2025
2 parents edd2a90 + 33c2406 commit 37fa6ef
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/coverband/utils/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@
if Coverband.configuration.store.is_a?(Coverband::Adapters::FileStore)
Coverband.configuration.store.merge_mode = true
end
Rack::Server.start app: Coverband::Reporters::Web.new,

begin
require 'rackup/server'
server_class = Rackup::Server
rescue LoadError
require 'rack/server'
server_class = Rack::Server
end

server_class.start app: Coverband::Reporters::Web.new,
Port: ENV.fetch("COVERBAND_COVERAGE_PORT", 9022).to_i
end

Expand Down

0 comments on commit 37fa6ef

Please sign in to comment.