Skip to content

Commit ba5ba30

Browse files
authored
Merge pull request #163 from krzysztofjablonski/patch-1
Add compatibility with Rack 3.1
2 parents 402af0e + 7074329 commit ba5ba30

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ GEM
7272
puma (6.4.2)
7373
nio4r (~> 2.0)
7474
racc (1.7.3)
75-
rack (3.0.9)
75+
rack (3.1.7)
7676
rack-session (2.0.0)
7777
rack (>= 3.0.0)
7878
rack-test (2.1.0)

example/Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ GEM
134134
puma (6.4.2)
135135
nio4r (~> 2.0)
136136
racc (1.7.3)
137-
rack (3.0.9)
137+
rack (3.1.7)
138138
rack-proxy (0.7.7)
139139
rack
140140
rack-session (2.0.0)

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)