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

Move @argv from attr_accessor to initialize

This commit is contained in:
schneems 2016-02-03 14:15:15 -06:00
parent f646242821
commit ffae12c40f
2 changed files with 9 additions and 9 deletions

View file

@ -58,10 +58,9 @@ module Puma
exit 1
end
@launcher = Puma::Launcher.new(@cli_options, events: @events)
@launcher = Puma::Launcher.new(@cli_options, events: @events, argv: @argv)
@launcher.config = self.config
@launcher.argv = @argv
@launcher.setup(@options)

View file

@ -3,10 +3,13 @@ require 'puma/binder'
module Puma
class Launcher
def initialize(cli_options = {}, launcher_options = {})
@cli_options = cli_options
@runner = nil
@events = launcher_options[:events] or raise "must provide :events key"
@binder = Binder.new(@events)
@cli_options = cli_options
@runner = nil
@events = launcher_options[:events] or raise "must provide :events key"
@argv = launcher_options[:argv] || "puma"
@original_argv = @argv.dup
@binder = Binder.new(@events)
@binder.import_from_env
end
@ -87,7 +90,7 @@ module Puma
end
end
attr_accessor :options, :binder, :config, :argv
attr_accessor :options, :binder, :config
## THIS STUFF IS NEEDED FOR RUNNER
@ -347,8 +350,6 @@ module Puma
@restart_dir ||= Dir.pwd
@original_argv = @argv.nil? ? "puma" : @argv.dup
require 'rubygems'
# if $0 is a file in the current directory, then restart