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

Fix JRuby restart args, bump 2.2.1

This commit is contained in:
Evan Phoenix 2013-07-02 11:23:37 -07:00
parent 03c5853bed
commit 01877c30f5
3 changed files with 13 additions and 9 deletions

View file

@ -96,6 +96,14 @@ module Puma
end end
end end
def restart_args
if cmd = @options[:restart_cmd]
cmd.split(' ') + @original_argv
else
@restart_argv
end
end
def restart! def restart!
@options[:on_restart].each do |blk| @options[:on_restart].each do |blk|
blk.call self blk.call self
@ -114,7 +122,7 @@ module Puma
end end
require 'puma/jruby_restart' require 'puma/jruby_restart'
JRubyRestart.chdir_exec(@restart_dir, @restart_argv) JRubyRestart.chdir_exec(@restart_dir, restart_args)
else else
redirects = {:close_others => true} redirects = {:close_others => true}
@binder.listeners.each_with_index do |(l,io),i| @binder.listeners.each_with_index do |(l,io),i|
@ -122,11 +130,7 @@ module Puma
redirects[io.to_i] = io.to_i redirects[io.to_i] = io.to_i
end end
if cmd = @options[:restart_cmd] argv = restart_args
argv = cmd.split(' ') + @original_argv
else
argv = @restart_argv
end
Dir.chdir @restart_dir Dir.chdir @restart_dir
@ -508,7 +512,7 @@ module Puma
exit exit
end end
pid = JRubyRestart.daemon_start(@restart_dir, @restart_argv) pid = JRubyRestart.daemon_start(@restart_dir, restart_args)
sleep sleep
end end
else else

View file

@ -28,7 +28,7 @@ module Puma
# too taxing on performance. # too taxing on performance.
module Const module Const
PUMA_VERSION = VERSION = "2.2.0".freeze PUMA_VERSION = VERSION = "2.2.1".freeze
FAST_TRACK_KA_TIMEOUT = 0.2 FAST_TRACK_KA_TIMEOUT = 0.2

View file

@ -2,7 +2,7 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "puma" 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.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Evan Phoenix"] s.authors = ["Evan Phoenix"]