提交 c1f308f8 编写于 作者: M Mikel Lindsaar

Unvendor'd MemCache-Client. Now requires the MemCache Client gem as a...

Unvendor'd MemCache-Client.  Now requires the MemCache Client gem as a dependency - Don't forget to gem bundle buys and girls
上级 f1fe71d7
*Edge*
* Unvendor'd Builder. Now requires the Builder gem as a dependency
* Unvendor'd Memcach Client. Now requires the Builder gem as a dependency [Mikel Lindsaar]
* Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency
* Unvendor'd Builder. Now requires the Builder gem as a dependency [Mikel Lindsaar]
* Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency [Mikel Lindsaar]
* YAML serialization for OrderedHash. #3608 [Gregor Schmidt]
......
......@@ -41,7 +41,6 @@ Rake::RDocTask.new { |rdoc|
rdoc.rdoc_files.include('README', 'CHANGELOG')
rdoc.rdoc_files.include('lib/active_support.rb')
rdoc.rdoc_files.include('lib/active_support/**/*.rb')
rdoc.rdoc_files.exclude('lib/active_support/vendor/*')
}
spec = eval(File.read('activesupport.gemspec'))
......
......@@ -9,6 +9,7 @@
s.add_dependency('i18n', '~> 0.3.0')
s.add_dependency('tzinfo', '~> 0.3.16')
s.add_dependency('builder', '~> 2.1.2')
s.add_dependency('memcache-client', '~> 1.7.5')
s.files = Dir['CHANGELOG', 'README', 'lib/**/*']
s.require_path = 'lib'
......
......@@ -69,5 +69,3 @@ module ActiveSupport
autoload :TestCase
end
require 'active_support/vendor'
require 'pathname'
def ActiveSupport.requirable?(file)
$LOAD_PATH.any? { |p| Dir.glob("#{p}/#{file}.*").any? }
end
[%w(builder 2.1.2), %w(memcache-client 1.7.5)].each do |lib, version|
# If the lib is not already requirable
unless ActiveSupport.requirable? lib
# Try to activate a gem ~> satisfying the requested version first.
begin
gem lib, ">= #{version}"
# Use the vendored lib if the gem's missing or we aren't using RubyGems.
rescue LoadError, NoMethodError
# There could be symlinks
$LOAD_PATH.unshift Pathname.new(__FILE__).dirname.join("vendor/#{lib}-#{version}/lib").realpath.to_s
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册