1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update RubyGems to 1.1.1 r1778 (almost 1.2)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2008-06-17 22:04:18 +00:00
parent f98e6b91de
commit 9d4f37f51f
71 changed files with 3765 additions and 1127 deletions

View file

@ -14,14 +14,16 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
@a1_path = File.join @gemhome, 'cache', "#{@a1.full_name}.gem"
@a2_path = File.join @gemhome, 'cache', "#{@a2.full_name}.gem"
@fetcher.data["#{@gem_repo}/Marshal.#{@marshal_version}"] =
@source_index.dump
@fetcher.data["#{@gem_repo}/gems/#{@a1.full_name}.gem"] = read_binary @a1_path
@fetcher.data["#{@gem_repo}/gems/#{@a2.full_name}.gem"] = read_binary @a2_path
util_setup_spec_fetcher @a1, @a2
@fetcher.data["#{@gem_repo}gems/#{@a1.full_name}.gem"] =
read_binary @a1_path
@fetcher.data["#{@gem_repo}gems/#{@a2.full_name}.gem"] =
read_binary @a2_path
end
def test_execute
util_remove_gems
util_clear_gems
Gem::Installer.new(@a1_path).install
@ -33,7 +35,6 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
out = @ui.output.split "\n"
assert_equal "Updating installed gems", out.shift
assert_match %r|Bulk updating|, out.shift
assert_equal "Updating #{@a2.name}", out.shift
assert_equal "Successfully installed #{@a2.full_name}", out.shift
assert_equal "Gems updated: #{@a2.name}", out.shift
@ -73,16 +74,15 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
util_build_gem @a2
util_build_gem @c2
@fetcher.data["#{@gem_repo}/Marshal.#{@marshal_version}"] =
@source_index.dump
@fetcher.data["#{@gem_repo}/gems/#{@a1.full_name}.gem"] = read_binary @a1_path
@fetcher.data["#{@gem_repo}/gems/#{@a2.full_name}.gem"] = read_binary @a2_path
@fetcher.data["#{@gem_repo}/gems/#{@b2.full_name}.gem"] = read_binary @b2_path
@fetcher.data["#{@gem_repo}/gems/#{@c1_2.full_name}.gem"] =
@fetcher.data["#{@gem_repo}gems/#{@a1.full_name}.gem"] = read_binary @a1_path
@fetcher.data["#{@gem_repo}gems/#{@a2.full_name}.gem"] = read_binary @a2_path
@fetcher.data["#{@gem_repo}gems/#{@b2.full_name}.gem"] = read_binary @b2_path
@fetcher.data["#{@gem_repo}gems/#{@c1_2.full_name}.gem"] =
read_binary @c1_2_path
@fetcher.data["#{@gem_repo}/gems/#{@c2.full_name}.gem"] = read_binary @c2_path
@fetcher.data["#{@gem_repo}gems/#{@c2.full_name}.gem"] = read_binary @c2_path
util_remove_gems
util_setup_spec_fetcher @a1, @a2, @b2, @c1_2, @c2
util_clear_gems
Gem::Installer.new(@c1_2_path).install
Gem::Installer.new(@a1_path).install
@ -95,9 +95,7 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
out = @ui.output.split "\n"
assert_equal "Updating installed gems", out.shift
assert_match %r|Bulk updating|, out.shift
assert_equal "Updating #{@a2.name}", out.shift
assert_match %r|Bulk updating|, out.shift
assert_equal "Successfully installed #{@c2.full_name}", out.shift
assert_equal "Successfully installed #{@b2.full_name}", out.shift
assert_equal "Successfully installed #{@a2.full_name}", out.shift
@ -108,7 +106,7 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
end
def test_execute_named
util_remove_gems
util_clear_gems
Gem::Installer.new(@a1_path).install
@ -120,7 +118,6 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
out = @ui.output.split "\n"
assert_equal "Updating installed gems", out.shift
assert_match %r|Bulk updating|, out.shift
assert_equal "Updating #{@a2.name}", out.shift
assert_equal "Successfully installed #{@a2.full_name}", out.shift
assert_equal "Gems updated: #{@a2.name}", out.shift
@ -129,7 +126,7 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
end
def test_execute_named_up_to_date
util_remove_gems
util_clear_gems
Gem::Installer.new(@a2_path).install
@ -141,14 +138,13 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
out = @ui.output.split "\n"
assert_equal "Updating installed gems", out.shift
assert_match %r|Bulk updating|, out.shift
assert_equal "Nothing to update", out.shift
assert out.empty?, out.inspect
end
def test_execute_up_to_date
util_remove_gems
util_clear_gems
Gem::Installer.new(@a2_path).install
@ -160,16 +156,10 @@ class TestGemCommandsUpdateCommand < RubyGemTestCase
out = @ui.output.split "\n"
assert_equal "Updating installed gems", out.shift
assert_match %r|Bulk updating|, out.shift
assert_equal "Nothing to update", out.shift
assert out.empty?, out.inspect
end
def util_remove_gems
FileUtils.rm_r File.join(@gemhome, 'gems')
FileUtils.rm_r File.join(@gemhome, 'specifications')
end
end