diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-24 17:29:59 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-24 17:29:59 -0700 |
commit | 772a32a22d71f7a22108719d88c94959ae4942b6 (patch) | |
tree | 1ecf8e5c09516149806145a5d55c710316702ab8 /activesupport/lib/active_support/vendor | |
parent | 0039c0344c54423413728a92509b42fe7f37d90c (diff) | |
download | rails-772a32a22d71f7a22108719d88c94959ae4942b6.tar.gz rails-772a32a22d71f7a22108719d88c94959ae4942b6.tar.bz2 rails-772a32a22d71f7a22108719d88c94959ae4942b6.zip |
Convert the other vendored libs to avoid pulling in old gems. Works even if rubygems isn't loaded.
Diffstat (limited to 'activesupport/lib/active_support/vendor')
4 files changed, 16 insertions, 13 deletions
diff --git a/activesupport/lib/active_support/vendor/builder.rb b/activesupport/lib/active_support/vendor/builder.rb index ad89e6635d..349825f438 100644 --- a/activesupport/lib/active_support/vendor/builder.rb +++ b/activesupport/lib/active_support/vendor/builder.rb @@ -1,6 +1,7 @@ begin - require 'builder' -rescue LoadError - $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'builder-2.1.2', 'lib')) - retry + gem 'builder', '~> 2.1.2' +rescue LoadError, NoMethodError + $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/builder-2.1.2/lib") end + +require 'builder' diff --git a/activesupport/lib/active_support/vendor/i18n.rb b/activesupport/lib/active_support/vendor/i18n.rb index 6011253035..05c03277e3 100644 --- a/activesupport/lib/active_support/vendor/i18n.rb +++ b/activesupport/lib/active_support/vendor/i18n.rb @@ -1,6 +1,7 @@ begin - require 'i18n' -rescue LoadError - $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'i18n-0.1.3', 'lib')) - retry + gem 'i18n', '~> 0.1.3' +rescue LoadError, NoMethodError + $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/i18n-0.1.3/lib") end + +require 'i18n' diff --git a/activesupport/lib/active_support/vendor/memcache.rb b/activesupport/lib/active_support/vendor/memcache.rb index 442f50a817..878464f6db 100644 --- a/activesupport/lib/active_support/vendor/memcache.rb +++ b/activesupport/lib/active_support/vendor/memcache.rb @@ -1,6 +1,7 @@ begin - require 'memcache' -rescue LoadError - $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'memcache-client-1.7.5', 'lib')) - retry + gem 'memcache-client', '~> 1.7.5' +rescue LoadError, NoMethodError + $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/memcache-client-1.7.5/lib") end + +require 'memcache' diff --git a/activesupport/lib/active_support/vendor/tzinfo.rb b/activesupport/lib/active_support/vendor/tzinfo.rb index cc4f086edf..0d47361d97 100644 --- a/activesupport/lib/active_support/vendor/tzinfo.rb +++ b/activesupport/lib/active_support/vendor/tzinfo.rb @@ -1,6 +1,6 @@ begin gem 'tzinfo', '~> 0.3.13' -rescue Gem::LoadError +rescue LoadError, NoMethodError $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/tzinfo-0.3.13/lib") end |