about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-27 09:47:50 +0000
committerEric Wong <normalperson@yhbt.net>2011-06-27 09:47:50 +0000
commita945985ad80cd8cccb2e73f8419a574ce6e9b49e (patch)
tree2ac021633fccad1007ef63bc730d0919166120a2
parent62fc74fb1234cba1b2c1db3014849584f52be040 (diff)
downloadzbatery-a945985ad80cd8cccb2e73f8419a574ce6e9b49e.tar.gz
remove Zbatery.run method
It's unnecessary making the stack deeper.  Stop it.
-rwxr-xr-xbin/zbatery2
-rw-r--r--lib/zbatery.rb9
2 files changed, 1 insertions, 10 deletions
diff --git a/bin/zbatery b/bin/zbatery
index 6d781b9..99ca46e 100755
--- a/bin/zbatery
+++ b/bin/zbatery
@@ -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
diff --git a/lib/zbatery.rb b/lib/zbatery.rb
index 48cf63e..71cf69b 100644
--- a/lib/zbatery.rb
+++ b/lib/zbatery.rb
@@ -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