From 00dc68a5a4eca4b27bb9456f0b7019bcb7551007 Mon Sep 17 00:00:00 2001 From: evanweaver Date: Sat, 27 Oct 2007 17:38:13 +0000 Subject: use rubygems a little less aggressively git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@808 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel/command.rb | 8 ++++++-- lib/mongrel/configurator.rb | 2 ++ lib/mongrel/init.rb | 9 ++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'lib/mongrel') 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 -- cgit v1.2.3-24-ge0c7