about summary refs log tree commit homepage
path: root/lib/mongrel
diff options
context:
space:
mode:
authorevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-27 17:38:13 +0000
committerevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-27 17:38:13 +0000
commit00dc68a5a4eca4b27bb9456f0b7019bcb7551007 (patch)
tree37d80091b44b1a51e485ac5b5bd6c08dd8a83b35 /lib/mongrel
parent2a7f00e80a61b00ab1994cf162ff03a6a7998225 (diff)
downloadunicorn-00dc68a5a4eca4b27bb9456f0b7019bcb7551007.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@808 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel')
-rw-r--r--lib/mongrel/command.rb8
-rw-r--r--lib/mongrel/configurator.rb2
-rw-r--r--lib/mongrel/init.rb9
3 files changed, 14 insertions, 5 deletions
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