Skip to content

Commit

Permalink
Use Rackup::Server when available
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Jun 12, 2024
1 parent 69fa505 commit ab99726
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion features/fixtures/rack/app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,12 @@ def call(env)
end
end

Rack::Server.start(app: Bugsnag::Rack.new(BugsnagTests.new), Host: '0.0.0.0', Port: 3000)
Server =
if defined?(Rack::Server)
Rack::Server
else
require 'rackup'
Rackup::Server
end

Server.start(app: Bugsnag::Rack.new(BugsnagTests.new), Host: '0.0.0.0', Port: 3000)

0 comments on commit ab99726

Please sign in to comment.