1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Fix bad rebase

This commit is contained in:
schneems 2016-02-04 09:49:01 -06:00
parent d6df5cec22
commit 232bb6b17e
3 changed files with 8 additions and 12 deletions

View file

@ -26,11 +26,7 @@ module Puma
# Handles invoke a Puma::Server in a command line style.
#
class CLI
KEYS_NOT_TO_PERSIST_IN_STATE = [
:logger, :lowlevel_error_handler,
:before_worker_shutdown, :before_worker_boot, :before_worker_fork,
:after_worker_boot, :before_fork, :on_restart
]
KEYS_NOT_TO_PERSIST_IN_STATE = Launcher::KEYS_NOT_TO_PERSIST_IN_STATE
# Create a new CLI object using +argv+ as the command line
# arguments.

View file

@ -8,6 +8,11 @@ module Puma
# It is responsible for either launching a cluster of Puma workers or a single
# puma server.
class Launcher
KEYS_NOT_TO_PERSIST_IN_STATE = [
:logger, :lowlevel_error_handler,
:before_worker_shutdown, :before_worker_boot, :before_worker_fork,
:after_worker_boot, :before_fork, :on_restart
]
# Returns an instance of Launcher
#
# +input_options+ A Hash of options that is supplied by a user, typically through
@ -127,12 +132,7 @@ module Puma
state = { 'pid' => Process.pid }
cfg = @config.dup
[
:logger,
:before_worker_shutdown, :before_worker_boot, :before_worker_fork,
:after_worker_boot,
:on_restart, :lowlevel_error_handler
].each { |k| cfg.options.delete(k) }
KEYS_NOT_TO_PERSIST_IN_STATE.each { |k| cfg.options.delete(k) }
state['config'] = cfg
require 'yaml'

View file

@ -137,7 +137,7 @@ class TestCLI < Test::Unit::TestCase
end
def test_state_file_callback_filtering
cli = Puma::CLI.new [ "--config", "test/config/state_file_testing_config.rb",
cli = Puma::CLI.new [ "--config", "test/config/state_file_testing_config.rb",
"--state", @tmp_path ]
cli.send( :parse_options )
cli.write_state