lib/conf/argv.rb in rsence-pre-2.2.0.4 vs lib/conf/argv.rb in rsence-pre-2.2.0.5
- old
+ new
@@ -108,10 +108,11 @@
:server => nil, # --server
:reset_ses => false, # -r --reset-sessions
:autoupdate => false, # -a --auto-update
:latency => 0, # --latency
:say => false, # -S --say
+ :http_delayed_start => nil, # --http-delayed-start
# client_pkg (not supported yet)
:client_pkg_no_gzip => false, # --build-no-gzip
:client_pkg_no_obfuscation => false, # --build-no-obfuscation
:client_pkg_no_whitespace_removal => false, # --build-keep-whitespace
@@ -126,20 +127,22 @@
expect_option = false
option_name = false
if @argv.length >= 2
@argv[1..-1].each_with_index do |arg,i|
if expect_option
- if [:port,:latency].include?(option_name) and arg.to_i.to_s != arg
+ if [ :port, :latency, :http_delayed_start ].include?(option_name) and arg.to_i.to_s != arg
puts ERB.new( @@strs[:messages][:invalid_option_expected_number] ).result( binding )
exit
elsif option_name == :conf_files
if not File.exists?( arg ) or not File.file?( arg )
puts ERB.new( @@strs[:messages][:no_such_configuration_file] ).result( binding )
exit
else
@args[:conf_files].push( arg )
end
+ elsif option_name == :http_delayed_start
+ @args[:http_delayed_start] = arg.to_i
else
arg = arg.to_i if option_name == :latency
@args[option_name] = arg
end
expect_option = false
@@ -161,10 +164,13 @@
expect_option = true
option_name = :port
elsif arg == '--addr'
expect_option = true
option_name = :addr
+ elsif arg == '--http-delayed-start'
+ expect_option = true
+ option_name = :http_delayed_start
elsif arg == '--server'
expect_option = true
option_name = :server
elsif arg == '--conf' or arg == '--config'
expect_option = true
@@ -791,15 +797,19 @@
parse_help_argv
elsif cmd == :version
puts version
exit
elsif [:run,:start,:stop,:restart].include? cmd
+ puts "RSence #{@@version} -- Ruby #{RUBY_VERSION}"
parse_startup_argv
elsif cmd == :status
+ puts "RSence #{@@version} -- Ruby #{RUBY_VERSION}"
parse_status_argv
elsif cmd == :save
+ puts "RSence #{@@version} -- Ruby #{RUBY_VERSION}"
parse_save_argv
elsif cmd == :initenv or cmd == :init
+ puts "RSence #{@@version} -- Ruby #{RUBY_VERSION}"
parse_initenv_argv
end
else
puts @@strs[:help][:unknown] + cmd.to_s.inspect
puts @@strs[:help][:help_help]