about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/mongrel.rb11
-rw-r--r--lib/mongrel/command.rb8
-rw-r--r--lib/mongrel/configurator.rb2
-rw-r--r--lib/mongrel/init.rb9
4 files changed, 21 insertions, 9 deletions
diff --git a/lib/mongrel.rb b/lib/mongrel.rb
index a55d425..8de2e97 100644
--- a/lib/mongrel.rb
+++ b/lib/mongrel.rb
@@ -10,14 +10,17 @@ require 'stringio'
 
 begin
   require 'fastthread'
-rescue RuntimeError => e
-  warn "fastthread not loaded: #{ e.message }"
-rescue LoadError
+rescue LoadError, RuntimeError
+  require 'rubygems' and retry
 ensure
   require 'thread'
 end
 
-require 'cgi_multipart_eof_fix'
+begin
+  require 'cgi_multipart_eof_fix'
+rescue LoadError
+  require 'rubygems' and retry
+end
 
 require 'mongrel/cgi'
 require 'mongrel/handlers'
diff --git a/lib/mongrel/command.rb b/lib/mongrel/command.rb
index 3a67d56..64d2509 100644
--- a/lib/mongrel/command.rb
+++ b/lib/mongrel/command.rb
@@ -4,10 +4,14 @@
 # Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
 # for more information.
 
-require 'rubygems'
 require 'singleton'
 require 'optparse'
-require 'gem_plugin'
+
+begin
+  require 'gem_plugin'
+rescue LoadError
+  require 'rubygems' and retry
+end
 
 module Mongrel
 
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb
index 334bdc4..beaf7d0 100644
--- a/lib/mongrel/configurator.rb
+++ b/lib/mongrel/configurator.rb
@@ -39,6 +39,8 @@ module Mongrel
 
     # You pass in initial defaults and then a block to continue configuring.
     def initialize(defaults={}, &block)
+      p defaults
+      p instance_variables
       @listener = nil
       @listener_name = nil
       @listeners = {}
diff --git a/lib/mongrel/init.rb b/lib/mongrel/init.rb
index 7199d0c..968f2cd 100644
--- a/lib/mongrel/init.rb
+++ b/lib/mongrel/init.rb
@@ -4,10 +4,13 @@
 # Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
 # for more information.
 
-require 'rubygems'
-require 'gem_plugin'
+begin
+  require 'gem_plugin'
+rescue LoadError
+  require 'rubygems' and retry
+end
 
-# file is just a stub that makes sure the mongrel_plugins gem is loaded and ready
+# File is just a stub that makes sure the mongrel_plugins gem is loaded and ready