From 6bde32081338ce8075854f4c47ce8ca5347df919 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jan 2011 17:06:20 -0800 Subject: eliminate G constant and just use the Rainbows! module Code organization is hard :< --- lib/rainbows/http_server.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/rainbows/http_server.rb') diff --git a/lib/rainbows/http_server.rb b/lib/rainbows/http_server.rb index 13b731b..84d5a32 100644 --- a/lib/rainbows/http_server.rb +++ b/lib/rainbows/http_server.rb @@ -2,14 +2,12 @@ # :enddoc: class Rainbows::HttpServer < Unicorn::HttpServer - G = Rainbows::G - def self.setup(block) - G.server.instance_eval(&block) + Rainbows.server.instance_eval(&block) end def initialize(app, options) - G.server = self + Rainbows.server = self @logger = Unicorn::Configurator::DEFAULTS[:logger] rv = super(app, options) defined?(@use) or use(:Base) @@ -21,7 +19,7 @@ class Rainbows::HttpServer < Unicorn::HttpServer Unicorn::Util.reopen_logs logger.info "worker=#{worker_nr} done reopening logs" rescue - G.quit! # let the master reopen and refork us + Rainbows.quit! # let the master reopen and refork us end # Add one second to the timeout since our fchmod heartbeat is less -- cgit v1.2.3-24-ge0c7