mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems Restored concurrent requires Fixed installing gems with extensions with --install-dir Fixed `gem fetch -v` to install the latest version Fixed installing gems with "./" in their files entries * test/rubygems/test_gem_package.rb: Tests for the above. * NEWS: Updated for RubyGems 2.1.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
85995e88d4
commit
1daa0b113d
110 changed files with 3493 additions and 4942 deletions
|
@ -63,7 +63,7 @@ class TestGemSource < Gem::TestCase
|
|||
|
||||
def test_cache_dir_escapes_windows_paths
|
||||
uri = URI.parse("file:///C:/WINDOWS/Temp/gem_repo")
|
||||
root = Gem.spec_cache_dir
|
||||
root = File.join Gem.user_home, '.gem', 'specs'
|
||||
cache_dir = @source.cache_dir(uri).gsub(root, '')
|
||||
assert cache_dir !~ /:/, "#{cache_dir} should not contain a :"
|
||||
end
|
||||
|
@ -123,7 +123,7 @@ class TestGemSource < Gem::TestCase
|
|||
expected = @released
|
||||
assert_equal expected, @source.load_specs(:released)
|
||||
|
||||
cache_dir = File.join Gem.spec_cache_dir, 'gems.example.com%80'
|
||||
cache_dir = File.join Gem.user_home, '.gem', 'specs', 'gems.example.com%80'
|
||||
assert File.exist?(cache_dir), "#{cache_dir} does not exist"
|
||||
|
||||
cache_file = File.join cache_dir, "specs.#{Gem.marshal_version}"
|
||||
|
@ -138,7 +138,7 @@ class TestGemSource < Gem::TestCase
|
|||
@fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}"] =
|
||||
' ' * Marshal.dump(@latest_specs).length
|
||||
|
||||
cache_dir = File.join Gem.spec_cache_dir, 'gems.example.com%80'
|
||||
cache_dir = File.join Gem.user_home, '.gem', 'specs', 'gems.example.com%80'
|
||||
|
||||
FileUtils.mkdir_p cache_dir
|
||||
|
||||
|
@ -160,7 +160,7 @@ class TestGemSource < Gem::TestCase
|
|||
@fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}.gz"] =
|
||||
util_gzip(Marshal.dump(@latest_specs))
|
||||
|
||||
cache_dir = File.join Gem.spec_cache_dir, 'gems.example.com%80'
|
||||
cache_dir = File.join Gem.user_home, '.gem', 'specs', 'gems.example.com%80'
|
||||
|
||||
FileUtils.mkdir_p cache_dir
|
||||
|
||||
|
@ -184,28 +184,5 @@ class TestGemSource < Gem::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_spaceship
|
||||
remote = @source
|
||||
specific = Gem::Source::SpecificFile.new(@a1.cache_file)
|
||||
installed = Gem::Source::Installed.new
|
||||
local = Gem::Source::Local.new
|
||||
|
||||
assert_equal( 0, remote. <=>(remote), 'remote <=> remote')
|
||||
|
||||
assert_equal(-1, remote. <=>(specific), 'remote <=> specific')
|
||||
assert_equal( 1, specific. <=>(remote), 'specific <=> remote')
|
||||
|
||||
assert_equal(-1, remote. <=>(local), 'remote <=> local')
|
||||
assert_equal( 1, local. <=>(remote), 'local <=> remote')
|
||||
|
||||
assert_equal(-1, remote. <=>(installed), 'remote <=> installed')
|
||||
assert_equal( 1, installed.<=>(remote), 'installed <=> remote')
|
||||
|
||||
no_uri = @source.dup
|
||||
no_uri.instance_variable_set :@uri, nil
|
||||
|
||||
assert_equal(-1, remote. <=>(no_uri), 'remote <=> no_uri')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue