about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/unicorn4
-rwxr-xr-xbin/unicorn_rails12
-rw-r--r--test/unit/test_http_parser.rb1
3 files changed, 8 insertions, 9 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'
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 7e2b024..dc1aab7 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -302,7 +302,6 @@ class HttpParserTest < Test::Unit::TestCase
              "Host: hello\r\n" \
              "\r\n"
     parser.buf << header
-    req = parser.env
     assert_raises(HttpParserError) { parser.parse }
   end