From 0792b37d5e28d3ea1585d5837682cde4d0319a8a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Apr 2010 17:37:42 -0700 Subject: bin/*: remove unnecessary listeners variable --- bin/unicorn | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bin/unicorn') diff --git a/bin/unicorn b/bin/unicorn index 658d27c..beece97 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -5,8 +5,7 @@ require 'optparse' ENV["RACK_ENV"] ||= "development" daemonize = false -listeners = [] -options = { :listeners => listeners } +options = { :listeners => [] } host, port = Unicorn::Const::DEFAULT_HOST, Unicorn::Const::DEFAULT_PORT set_listener = false @@ -81,7 +80,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| "listen on HOST:PORT or PATH", "this may be specified multiple times", "(default: #{Unicorn::Const::DEFAULT_LISTEN})") do |address| - listeners << address + options[:listeners] << address end opts.on("-c", "--config-file FILE", "Unicorn-specific config file") do |f| @@ -112,7 +111,7 @@ ru = ARGV[0] || "config.ru" abort "configuration file #{ru} not found" unless File.exist?(ru) app = Unicorn.builder(ru, opts) -listeners << "#{host}:#{port}" if set_listener +options[:listeners] << "#{host}:#{port}" if set_listener if $DEBUG require 'pp' -- cgit v1.2.3-24-ge0c7