diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-12-10 00:19:35 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-12-10 00:48:41 -0800 |
commit | 50187c319bc5dcfe0f6f3ff7c96826f23716b8ae (patch) | |
tree | d4198d37ebe268bb02eb673a213fd910b1209bff /lib/zbatery.rb | |
parent | a8ef8c7f1156e2624d3cc3a37a72ff82bbc6a159 (diff) | |
download | zbatery-50187c319bc5dcfe0f6f3ff7c96826f23716b8ae.tar.gz |
prep for release v0.0.0
Diffstat (limited to 'lib/zbatery.rb')
-rw-r--r-- | lib/zbatery.rb | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lib/zbatery.rb b/lib/zbatery.rb index 6ed9134..6b69e6d 100644 --- a/lib/zbatery.rb +++ b/lib/zbatery.rb @@ -3,7 +3,21 @@ require 'rainbows' module Zbatery - # check if our Ruby implementation supports unlinked files + # current version of Zbatery + VERSION = "0.0.0" + + class << self + + # runs the Zbatery HttpServer with +app+ and +options+ and does + # not return until the server has exited. + def run(app, options = {}) + HttpServer.new(app, options).start.join + end + end + + Rainbows::Const::RACK_DEFAULTS["SERVER_SOFTWARE"] = "Zbatery #{VERSION}" + + # true if our Ruby implementation supports unlinked files UnlinkedIO = begin tmp = Unicorn::Util.tmpio tmp.chmod(0) @@ -18,15 +32,6 @@ module Zbatery # config files... FORK_HOOK = lambda { |_,_| } - class << self - - # runs the Rainbows! HttpServer with +app+ and +options+ and does - # not return until the server has exited. - def run(app, options = {}) - HttpServer.new(app, options).start.join - end - end - class HttpServer < Rainbows::HttpServer # only used if no concurrency model is specified |