diff --git a/lib/puma/cli.rb b/lib/puma/cli.rb index 9750bc1e..b58fa728 100644 --- a/lib/puma/cli.rb +++ b/lib/puma/cli.rb @@ -96,6 +96,14 @@ module Puma end end + def restart_args + if cmd = @options[:restart_cmd] + cmd.split(' ') + @original_argv + else + @restart_argv + end + end + def restart! @options[:on_restart].each do |blk| blk.call self @@ -114,7 +122,7 @@ module Puma end require 'puma/jruby_restart' - JRubyRestart.chdir_exec(@restart_dir, @restart_argv) + JRubyRestart.chdir_exec(@restart_dir, restart_args) else redirects = {:close_others => true} @binder.listeners.each_with_index do |(l,io),i| @@ -122,11 +130,7 @@ module Puma redirects[io.to_i] = io.to_i end - if cmd = @options[:restart_cmd] - argv = cmd.split(' ') + @original_argv - else - argv = @restart_argv - end + argv = restart_args Dir.chdir @restart_dir @@ -508,7 +512,7 @@ module Puma exit end - pid = JRubyRestart.daemon_start(@restart_dir, @restart_argv) + pid = JRubyRestart.daemon_start(@restart_dir, restart_args) sleep end else diff --git a/lib/puma/const.rb b/lib/puma/const.rb index f14b04e1..bb68661d 100644 --- a/lib/puma/const.rb +++ b/lib/puma/const.rb @@ -28,7 +28,7 @@ module Puma # too taxing on performance. module Const - PUMA_VERSION = VERSION = "2.2.0".freeze + PUMA_VERSION = VERSION = "2.2.1".freeze FAST_TRACK_KA_TIMEOUT = 0.2 diff --git a/puma.gemspec b/puma.gemspec index bbd042c3..b6ec2895 100644 --- a/puma.gemspec +++ b/puma.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "puma" - s.version = "2.2.0" + s.version = "2.2.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Evan Phoenix"]