Skip to content

Commit 37a9579

Browse files
authoredAug 2, 2024··
Compatibility with Rack 3.1
1 parent 402af0e commit 37a9579

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/cypress-rails/server/puma.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ def self.create(app, port, host)
1010
default_options = {Host: host, Port: port, Threads: "0:4", workers: 0, daemon: false}
1111
options = default_options # .merge(options)
1212

13-
conf = Rack::Handler::Puma.config(app, options)
13+
puma_rack_handler = defined?(Rackup::Handler::Puma) ? Rackup::Handler::Puma : Rack::Handler::Puma
14+
conf = puma_rack_handler.config(app, options)
1415
conf.clamp
1516
logger = (defined?(::Puma::LogWriter) ? ::Puma::LogWriter : ::Puma::Events).stdio
1617

0 commit comments

Comments
 (0)
Please sign in to comment.