mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Prefer rackup file specified by CLI (#2236)
Co-Authored-By: Cristian Rivera <cristian_rivera@me.com> Co-authored-by: Artur Montenegro <artur.montenegro@tempest.com.br> Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
This commit is contained in:
parent
883b86112b
commit
5a4e744e8a
4 changed files with 14 additions and 1 deletions
|
@ -39,6 +39,7 @@
|
|||
* Fix `out_of_band` hook never executed if the number of worker threads is > 1 (#2177)
|
||||
* Fix ThreadPool#shutdown timeout accuracy (#2221)
|
||||
* Fix `UserFileDefaultOptions#fetch` to properly use `default` (#2233)
|
||||
* Prefer the rackup file specified by the CLI (#2225)
|
||||
|
||||
* Refactor
|
||||
* Remove unused loader argument from Plugin initializer (#2095)
|
||||
|
|
|
@ -308,7 +308,7 @@ module Puma
|
|||
# @example
|
||||
# rackup '/u/apps/lolcat/config.ru'
|
||||
def rackup(path)
|
||||
@options[:rackup] = path.to_s
|
||||
@options[:rackup] ||= path.to_s
|
||||
end
|
||||
|
||||
def early_hints(answer=true)
|
||||
|
|
1
test/config/with_rackup_from_dsl.rb
Normal file
1
test/config/with_rackup_from_dsl.rb
Normal file
|
@ -0,0 +1 @@
|
|||
rackup "test/rackup/hello-env.ru"
|
|
@ -43,6 +43,17 @@ class TestIntegrationSingle < TestIntegration
|
|||
assert_equal 0, status
|
||||
end
|
||||
|
||||
def test_prefer_rackup_file_specified_by_cli
|
||||
skip_unless_signal_exist? :TERM
|
||||
|
||||
cli_server "-C test/config/with_rackup_from_dsl.rb test/rackup/hello.ru"
|
||||
connection = connect
|
||||
reply = read_body(connection)
|
||||
_, status = stop_server
|
||||
|
||||
assert_match("Hello World", reply)
|
||||
end
|
||||
|
||||
def test_term_not_accepts_new_connections
|
||||
skip_unless_signal_exist? :TERM
|
||||
skip_on :jruby
|
||||
|
|
Loading…
Reference in a new issue