about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-08-18 15:00:08 -0700
committerEric Wong <normalperson@yhbt.net>2009-08-18 15:00:08 -0700
commit82167684e868e4e501713d2c03b096db6daab0a0 (patch)
tree183e97c5ecbdcb4ae81d2d55ad84927150e66670 /lib/unicorn.rb
parent1aa156429fd926162a112d327dc394cb9772c79c (diff)
downloadunicorn-82167684e868e4e501713d2c03b096db6daab0a0.tar.gz
Allow the --rainbows/-R command-line option to be passed to
activate Rainbows!!!1
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index b185b25..1bd88d3 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -12,6 +12,7 @@ module Unicorn
   autoload :Configurator, 'unicorn/configurator'
   autoload :TeeInput, 'unicorn/tee_input'
   autoload :Util, 'unicorn/util'
+  autoload :Rainbows, 'unicorn/rainbows'
 
   Z = '' # the stock empty string we use everywhere...
   Z.force_encoding(Encoding::BINARY) if Z.respond_to?(:force_encoding)
@@ -19,7 +20,8 @@ module Unicorn
 
   class << self
     def run(app, options = {})
-      HttpServer.new(app, options).start.join
+      klass = options.delete(:rainbows) ? Rainbows : HttpServer
+      klass.new(app, options).start.join
     end
   end