about summary refs log tree commit homepage
path: root/lib/zbatery.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zbatery.rb')
-rw-r--r--lib/zbatery.rb25
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