diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-01 03:45:05 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-01 03:45:05 +0000 |
commit | d22130922e7842226d38d59680e4bbb48a28a5f0 (patch) | |
tree | 39594d3a14641dd5488a99a5e633239296fa5742 /test/rubygems/test_gem_commands_sources_command.rb | |
parent | 4752539e3f3e563d559732c52424206bd6f12dbd (diff) | |
download | ruby-d22130922e7842226d38d59680e4bbb48a28a5f0.tar.gz |
Import rubygems 1.8.5 (released @ 137c80f)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_sources_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_sources_command.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/rubygems/test_gem_commands_sources_command.rb b/test/rubygems/test_gem_commands_sources_command.rb index 40449bec22..7dea7971d2 100644 --- a/test/rubygems/test_gem_commands_sources_command.rb +++ b/test/rubygems/test_gem_commands_sources_command.rb @@ -42,12 +42,11 @@ class TestGemCommandsSourcesCommand < Gem::TestCase def test_execute_add util_setup_fake_fetcher - si = Gem::SourceIndex.new - si.add_spec @a1 + install_specs @a1 - specs = si.map do |_, spec| + specs = Gem::Specification.map { |spec| [spec.name, spec.version, spec.original_platform] - end + } specs_dump_gz = StringIO.new Zlib::GzipWriter.wrap specs_dump_gz do |io| @@ -187,18 +186,18 @@ beta-gems.example.com is not a URI @cmd.handle_options %w[--update] util_setup_fake_fetcher - source_index = util_setup_spec_fetcher @a1 + util_setup_spec_fetcher @a1 - specs = source_index.map do |name, spec| + specs = Gem::Specification.map { |spec| [spec.name, spec.version, spec.original_platform] - end + } @fetcher.data["#{@gem_repo}specs.#{Gem.marshal_version}.gz"] = util_gzip Marshal.dump(specs) - latest_specs = source_index.latest_specs.map do |spec| + latest_specs = Gem::Specification.latest_specs.map { |spec| [spec.name, spec.version, spec.original_platform] - end + } @fetcher.data["#{@gem_repo}latest_specs.#{Gem.marshal_version}.gz"] = util_gzip Marshal.dump(latest_specs) |