* lib/rubygems: update to 1.3.5.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-12-08 07:19:09 +00:00
parent 6c0f2b097e
commit ed5d5c5829
34 changed files with 6650 additions and 136 deletions

View file

@ -9,7 +9,7 @@ require_relative 'gemutilities'
require 'rubygems/indexer'
unless ''.respond_to? :to_xs then
warn "Gem::Indexer tests are being skipped. Install builder gem."
warn "Gem::Indexer tests are being skipped. Install builder gem." if $VERBOSE
end
class TestGemIndexer < RubyGemTestCase
@ -118,10 +118,13 @@ class TestGemIndexer < RubyGemTestCase
expected = <<-EOF
a-1
a-2
a-3.a
a_evil-9
b-2
c-1.2
d-2.0
d-2.0.a
d-2.0.b
pl-1-i386-linux
EOF
@ -163,13 +166,13 @@ pl-1-i386-linux
assert_indexed @tempdir, "latest_specs.#{@marshal_version}.gz"
expected = <<-EOF
<?xml version="1.0"?>
<rss version="2.0">
<?xml version=\"1.0\"?>
<rss version=\"2.0\">
<channel>
<title>ExampleForge gems</title>
<link>http://example.com</link>
<description>Recently released gems from http://example.com</description>
<generator>RubyGems v#{Gem::RubyGemsVersion}</generator>
<generator>RubyGems v1.3.4</generator>
<docs>http://cyber.law.harvard.edu/rss/rss.html</docs>
<item>
<title>a-2</title>
@ -178,9 +181,21 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>a-2</guid>
<enclosure url="http://gems.example.com/gems/a-2.gem"
length="3072" type="application/octet-stream" />
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
<enclosure url=\"http://gems.example.com/gems/a-2.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@a2.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
<title>a-3.a</title>
<description>
&lt;pre&gt;This is a test description&lt;/pre&gt;
</description>
<author>example@example.com (A User)</author>
<guid>a-3.a</guid>
<enclosure url=\"http://gems.example.com/gems/a-3.a.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@a3a.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@ -190,9 +205,9 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>a_evil-9</guid>
<enclosure url="http://gems.example.com/gems/a_evil-9.gem"
length="3072" type="application/octet-stream" />
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
<enclosure url=\"http://gems.example.com/gems/a_evil-9.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@a_evil9.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@ -202,9 +217,9 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>b-2</guid>
<enclosure url="http://gems.example.com/gems/b-2.gem"
length="3072" type="application/octet-stream" />
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
<enclosure url=\"http://gems.example.com/gems/b-2.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@b2.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@ -214,9 +229,33 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>c-1.2</guid>
<enclosure url="http://gems.example.com/gems/c-1.2.gem"
length="3072" type="application/octet-stream" />
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
<enclosure url=\"http://gems.example.com/gems/c-1.2.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@c1_2.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
<title>d-2.0.a</title>
<description>
&lt;pre&gt;This is a test description&lt;/pre&gt;
</description>
<author>example@example.com (A User)</author>
<guid>d-2.0.a</guid>
<enclosure url=\"http://gems.example.com/gems/d-2.0.a.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@d2_0_a.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
<title>d-2.0.b</title>
<description>
&lt;pre&gt;This is a test description&lt;/pre&gt;
</description>
<author>example@example.com (A User)</author>
<guid>d-2.0.b</guid>
<enclosure url=\"http://gems.example.com/gems/d-2.0.b.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@d2_0_b.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@ -226,9 +265,9 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>pl-1-x86-linux</guid>
<enclosure url="http://gems.example.com/gems/pl-1-x86-linux.gem"
length="3072" type="application/octet-stream" />
<pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
<enclosure url=\"http://gems.example.com/gems/pl-1-x86-linux.gem\"
length=\"3072\" type=\"application/octet-stream\" />
<pubDate>#{@pl1.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@ -247,9 +286,9 @@ eighty characters.&lt;/pre&gt;
</description>
<author>example@example.com (Example), example2@example.com (Example2)</author>
<guid>a-1</guid>
<enclosure url="http://gems.example.com/gems/a-1.gem"
length="3584" type="application/octet-stream" />
<pubDate>#{(Gem::Specification::TODAY - 86400).rfc2822}</pubDate>
<enclosure url=\"http://gems.example.com/gems/a-1.gem\"
length=\"3584\" type=\"application/octet-stream\" />
<pubDate>#{@a1.date.rfc2822}</pubDate>
<link>http://a.example.com</link>
</item>
</channel>
@ -462,9 +501,9 @@ eighty characters.&lt;/pre&gt;
@ui.output
assert_match %r%^\.\.\.\.\.\.\.\.\.\.$%, @ui.output
assert_match %r%^Loaded all gems$%, @ui.output
assert_match %r%^Generating Marshal quick index gemspecs for 7 gems$%,
assert_match %r%^Generating Marshal quick index gemspecs for 10 gems$%,
@ui.output
assert_match %r%^Generating YAML quick index gemspecs for 7 gems$%,
assert_match %r%^Generating YAML quick index gemspecs for 10 gems$%,
@ui.output
assert_match %r%^Complete$%, @ui.output
assert_match %r%^Generating specs index$%, @ui.output
@ -473,7 +512,7 @@ eighty characters.&lt;/pre&gt;
assert_match %r%^Generating latest index$%, @ui.output
assert_match %r%^Generating prerelease specs index$%, @ui.output
assert_match %r%^Generating Marshal master index$%, @ui.output
assert_match %r%^Generating YAML master index for 7 gems \(this may take a while\)$%, @ui.output
assert_match %r%^Generating YAML master index for 10 gems \(this may take a while\)$%, @ui.output
assert_match %r%^Complete$%, @ui.output
assert_match %r%^Compressing indicies$%, @ui.output