From 3c8f21a4257578e9cdc4781dd21a6a572e25ca54 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 13 Apr 2011 08:05:51 +0000 Subject: fix some 1.9.3dev warnings --- bin/unicorn | 4 ++-- bin/unicorn_rails | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/unicorn b/bin/unicorn index 86c938b..f8c20dc 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -7,7 +7,7 @@ ENV["RACK_ENV"] ||= "development" rackup_opts = Unicorn::Configurator::RACKUP options = rackup_opts[:options] -opts = OptionParser.new("", 24, ' ') do |opts| +op = OptionParser.new("", 24, ' ') do |opts| cmd = File.basename($0) opts.banner = "Usage: #{cmd} " \ "[ruby options] [#{cmd} options] [rackup config file]" @@ -105,7 +105,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| opts.parse! ARGV end -app = Unicorn.builder(ARGV[0] || 'config.ru', opts) +app = Unicorn.builder(ARGV[0] || 'config.ru', op) if $DEBUG require 'pp' diff --git a/bin/unicorn_rails b/bin/unicorn_rails index 0294b59..58c232b 100755 --- a/bin/unicorn_rails +++ b/bin/unicorn_rails @@ -8,7 +8,7 @@ ENV['RAILS_ENV'] ||= "development" rackup_opts = Unicorn::Configurator::RACKUP options = rackup_opts[:options] -opts = OptionParser.new("", 24, ' ') do |opts| +op = OptionParser.new("", 24, ' ') do |opts| cmd = File.basename($0) opts.banner = "Usage: #{cmd} " \ "[ruby options] [#{cmd} options] [rackup config file]" @@ -124,11 +124,11 @@ def rails_dispatcher result || abort("Unable to locate the application dispatcher class") end -def rails_builder(ru, opts, daemonize) - return Unicorn.builder(ru, opts) if ru +def rails_builder(ru, op, daemonize) + return Unicorn.builder(ru, op) if ru # allow Configurator to parse cli switches embedded in the ru file - Unicorn::Configurator::RACKUP.update(:file => :rails, :optparse => opts) + Unicorn::Configurator::RACKUP.update(:file => :rails, :optparse => op) # this lambda won't run until after forking if preload_app is false # this runs after config file reloading @@ -136,7 +136,7 @@ def rails_builder(ru, opts, daemonize) # Rails 3 includes a config.ru, use it if we find it after # working_directory is bound. ::File.exist?('config.ru') and - return Unicorn.builder('config.ru', opts).call + return Unicorn.builder('config.ru', op).call # Load Rails and (possibly) the private version of Rack it bundles. begin @@ -185,7 +185,7 @@ def rails_builder(ru, opts, daemonize) end end -app = rails_builder(ARGV[0], opts, rackup_opts[:daemonize]) +app = rails_builder(ARGV[0], op, rackup_opts[:daemonize]) if $DEBUG require 'pp' -- cgit v1.2.3-24-ge0c7