* lib/rubygems: Update to RubyGems 1.8.6.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-07-27 01:40:07 +00:00
parent b9c485aa0d
commit 035ef0a347
172 changed files with 190 additions and 1075 deletions

View file

@ -1,9 +1,3 @@
######################################################################
# This file is imported from the rubygems project.
# DO NOT make modifications in this repo. They _will_ be reverted!
# File a patch instead and assign it to Ryan Davis or Eric Hodel.
######################################################################
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/gem_openssl'
@ -718,7 +712,7 @@ class TestGem < Gem::TestCase
def test_self_path_default
util_path
if defined? APPLE_GEM_HOME
if defined?(APPLE_GEM_HOME)
orig_APPLE_GEM_HOME = APPLE_GEM_HOME
Object.send :remove_const, :APPLE_GEM_HOME
end
@ -727,7 +721,7 @@ class TestGem < Gem::TestCase
assert_equal [Gem.default_path, Gem.dir].flatten.uniq, Gem.path
ensure
Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME
Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME if orig_APPLE_GEM_HOME
end
unless win_platform?
@ -736,11 +730,14 @@ class TestGem < Gem::TestCase
Gem.clear_paths
apple_gem_home = File.join @tempdir, 'apple_gem_home'
Gem.const_set :APPLE_GEM_HOME, apple_gem_home
old, $-w = $-w, nil
Object.const_set :APPLE_GEM_HOME, apple_gem_home
$-w = old
assert_includes Gem.path, apple_gem_home
ensure
Gem.send :remove_const, :APPLE_GEM_HOME
Object.send :remove_const, :APPLE_GEM_HOME
end
def test_self_path_APPLE_GEM_HOME_GEM_PATH
@ -1074,6 +1071,23 @@ class TestGem < Gem::TestCase
assert_equal :loaded, TEST_PLUGIN_EXCEPTION rescue nil
end
def test_latest_load_paths
spec = quick_spec 'a', '4' do |s|
s.require_paths = ["lib"]
end
install_gem spec
# @exec_path = File.join spec.full_gem_path, spec.bindir, 'exec'
# @abin_path = File.join spec.full_gem_path, spec.bindir, 'abin'
# FileUtils.mkdir_p File.join(stem, "gems", "test-3")
Deprecate.skip_during do
expected = [File.join(@gemhome, "gems", "a-4", "lib")]
assert_equal expected, Gem.latest_load_paths
end
end
def with_plugin(path)
test_plugin_path = File.expand_path("test/rubygems/plugin/#{path}",
@@project_dir)