Skip to content

Commit

Permalink
Compatibility with Rack 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofjablonski authored Aug 2, 2024
1 parent 402af0e commit 37a9579
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cypress-rails/server/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def self.create(app, port, host)
default_options = {Host: host, Port: port, Threads: "0:4", workers: 0, daemon: false}
options = default_options # .merge(options)

conf = Rack::Handler::Puma.config(app, options)
puma_rack_handler = defined?(Rackup::Handler::Puma) ? Rackup::Handler::Puma : Rack::Handler::Puma
conf = puma_rack_handler.config(app, options)
conf.clamp
logger = (defined?(::Puma::LogWriter) ? ::Puma::LogWriter : ::Puma::Events).stdio

Expand Down

0 comments on commit 37a9579

Please sign in to comment.