File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 79
79
80
80
# Action Cable
81
81
group :cable do
82
- gem "puma" , require : false
82
+ gem "puma" , ">= 5.0.3" , require : false
83
83
84
84
gem "redis" , ">= 4.0.1" , require : false
85
85
Original file line number Diff line number Diff line change 372
372
rack
373
373
railties (>= 7.0.0.alpha2 )
374
374
public_suffix (4.0.6 )
375
- puma (5.5.2 )
375
+ puma (5.6.5 )
376
376
nio4r (~> 2.0 )
377
377
queue_classic (4.0.0 )
378
378
pg (>= 1.1 , < 2.0 )
@@ -587,7 +587,7 @@ DEPENDENCIES
587
587
nokogiri (>= 1.8.1 , != 1.11.0 )
588
588
pg (~> 1.3 )
589
589
propshaft (>= 0.1.7 )
590
- puma
590
+ puma ( >= 5.0.3 )
591
591
queue_classic (>= 4.0.0 )
592
592
racc (>= 1.4.6 )
593
593
rack-cache (~> 1.2 )
Original file line number Diff line number Diff line change @@ -74,10 +74,15 @@ def setup
74
74
end
75
75
76
76
def with_puma_server ( rack_app = ActionCable . server , port = 3099 )
77
- server = ::Puma ::Server . new ( rack_app , ::Puma ::Events . strings )
77
+ opts = { min_threads : 1 , max_threads : 4 }
78
+ server = if Puma ::Const ::PUMA_VERSION >= "6"
79
+ opts [ :log_writer ] = ::Puma ::LogWriter . strings
80
+ ::Puma ::Server . new ( rack_app , nil , opts )
81
+ else
82
+ # Puma >= 5.0.3
83
+ ::Puma ::Server . new ( rack_app , ::Puma ::Events . strings , opts )
84
+ end
78
85
server . add_tcp_listener "127.0.0.1" , port
79
- server . min_threads = 1
80
- server . max_threads = 4
81
86
82
87
thread = server . run
83
88
You can’t perform that action at this time.
0 commit comments