about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-04-13 08:05:51 +0000
committerEric Wong <normalperson@yhbt.net>2011-04-13 08:05:51 +0000
commit3c8f21a4257578e9cdc4781dd21a6a572e25ca54 (patch)
tree78c4ba49cddb12459f71a84aad72e706ff419ddd /bin
parent1355d262288352c2ced67cefc2301cee79bec0dd (diff)
downloadunicorn-3c8f21a4257578e9cdc4781dd21a6a572e25ca54.tar.gz
Diffstat (limited to 'bin')
-rwxr-xr-xbin/unicorn4
-rwxr-xr-xbin/unicorn_rails12
2 files changed, 8 insertions, 8 deletions
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'