1
0
Fork 0
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:
Artur Montenegro 2020-04-27 20:15:33 -03:00 committed by GitHub
parent 883b86112b
commit 5a4e744e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 1 deletions

View file

@ -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)

View file

@ -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)

View file

@ -0,0 +1 @@
rackup "test/rackup/hello-env.ru"

View file

@ -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