remove Zbatery.run method
authorEric Wong <normalperson@yhbt.net>
Mon, 27 Jun 2011 09:47:50 +0000 (27 09:47 +0000)
committerEric Wong <normalperson@yhbt.net>
Mon, 27 Jun 2011 09:47:50 +0000 (27 09:47 +0000)
It's unnecessary making the stack deeper.  Stop it.

bin/zbatery
lib/zbatery.rb

index 6d781b9..99ca46e 100755 (executable)
@@ -118,4 +118,4 @@ if $DEBUG
 end
 
 Unicorn::Launcher.daemonize!(options) if rackup_opts[:daemonize]
-Zbatery.run(app, options)
+Rainbows::HttpServer.new(app, options).start.join
index 48cf63e..71cf69b 100644 (file)
@@ -6,15 +6,6 @@ module Zbatery
 
   VERSION = "3.4.0"
 
-  class << self
-
-    # runs the Zbatery HttpServer with +app+ and +options+ and does
-    # not return until the server has exited.
-    def run(app, options = {})
-      Rainbows::HttpServer.new(app, options).start.join
-    end
-  end
-
   Rainbows::Const::RACK_DEFAULTS["SERVER_SOFTWARE"] = "Zbatery #{VERSION}"
 
   # we don't actually fork workers, but allow using the