about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-05-25 23:04:27 -0700
committerEric Wong <normalperson@yhbt.net>2009-05-25 23:04:27 -0700
commit9889b08360abf22f6dc71b3748e4b0387b3122f6 (patch)
tree334c5315e3b51a55dc5e0b044a41dd9749b17677 /lib/unicorn.rb
parent792064a4aeeab887d7ffcc9dda3fbd8f22488c82 (diff)
downloadunicorn-9889b08360abf22f6dc71b3748e4b0387b3122f6.tar.gz
This should prevent Rack from being required too early
on so "-I" being passed through the unicorn command-line
can modify $LOAD_PATH for Rack
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index da41399..cb36fc8 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -1,16 +1,17 @@
 require 'fcntl'
-
 require 'unicorn/socket_helper'
-require 'unicorn/const'
-require 'unicorn/http_request'
-require 'unicorn/http_response'
-require 'unicorn/configurator'
-require 'unicorn/util'
+autoload :Rack, 'rack'
 
 # Unicorn module containing all of the classes (include C extensions) for running
 # a Unicorn web server.  It contains a minimalist HTTP server with just enough
 # functionality to service web application requests fast as possible.
 module Unicorn
+  autoload :Const, 'unicorn/const'
+  autoload :HttpRequest, 'unicorn/http_request'
+  autoload :HttpResponse, 'unicorn/http_response'
+  autoload :Configurator, 'unicorn/configurator'
+  autoload :Util, 'unicorn/util'
+
   class << self
     def run(app, options = {})
       HttpServer.new(app, options).start.join