diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-03 13:24:26 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-03 13:24:26 -0700 |
commit | 8edb6c7e5aeed022f224f163dddf02bc4468da91 (patch) | |
tree | 7458e070fa0922fefa06a4cd5ee1b18cc072548b /lib/rainbows.rb | |
parent | 05e96fe3a3487eac65721dde3655269226269d9b (diff) | |
download | rainbows-8edb6c7e5aeed022f224f163dddf02bc4468da91.tar.gz |
This allows the server to be configured by doing something like this inside an existing Unicorn configuration file: Rainbows! do use :Revactor worker_connections 50 end This should make it obvious we're using Rainbows-only features.
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r-- | lib/rainbows.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb index cb08ca3..f79c1e8 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -1,10 +1,14 @@ # -*- encoding: binary -*- require 'unicorn' +def Rainbows!(&block) + block_given? or raise ArgumentError, "Rainbows! requires a block" + Rainbows::HttpServer.setup(block) +end + module Rainbows require 'rainbows/const' - require 'rainbows/configurator' require 'rainbows/http_server' require 'rainbows/http_response' |