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 11, 2024
1 parent 9978f60 commit c9340e7
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 c9340e7

Please sign in to comment.