diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-09-21 21:14:04 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-09-21 21:14:04 +0100 |
commit | 340be9bddd8e5902e0218a0101a40a17a4afd558 (patch) | |
tree | ef4de25f3f8eb610dc2235f0762b01cb1d464efd /activesupport/lib/active_support/vendor.rb | |
parent | b31cdb55422226cd45a2234a4b54986f1f611151 (diff) | |
parent | 1bbb9b2db05730194edfd7d2cef9f5fcb9d79e50 (diff) | |
download | rails-340be9bddd8e5902e0218a0101a40a17a4afd558.tar.gz rails-340be9bddd8e5902e0218a0101a40a17a4afd558.tar.bz2 rails-340be9bddd8e5902e0218a0101a40a17a4afd558.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'activesupport/lib/active_support/vendor.rb')
-rw-r--r-- | activesupport/lib/active_support/vendor.rb | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/activesupport/lib/active_support/vendor.rb b/activesupport/lib/active_support/vendor.rb index ca64c5ebe3..10dbfd9a77 100644 --- a/activesupport/lib/active_support/vendor.rb +++ b/activesupport/lib/active_support/vendor.rb @@ -1,27 +1,23 @@ -# Prefer gems to the bundled libs. -require 'rubygems' +# Fakes out gem optional dependencies until they are fully supported by gemspec. +# Activate any optional dependencies that are available. +if defined? Gem + begin + gem 'builder', '~> 2.1.2' + rescue Gem::LoadError + end -begin - gem 'builder', '~> 2.1.2' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/builder-2.1.2" -end - -begin - gem 'memcache-client', '>= 1.6.5' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/memcache-client-1.6.5" -end + begin + gem 'memcache-client', '>= 1.6.5' + rescue Gem::LoadError + end -begin - gem 'tzinfo', '~> 0.3.13' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/tzinfo-0.3.13" -end + begin + gem 'tzinfo', '~> 0.3.13' + rescue Gem::LoadError + end -begin - gem 'i18n', '~> 0.1.3' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/i18n-0.1.3/lib" - require 'i18n' + begin + gem 'i18n', '~> 0.1.3' + rescue Gem::LoadError + end end |