rubygems-update 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

Files changed (53) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.document +1 -1
  3. data/ChangeLog +19 -0
  4. data/History.txt +799 -0
  5. data/Manifest.txt +1 -30
  6. data/README +29 -10
  7. data/Rakefile +71 -315
  8. data/lib/rubygems.rb +3 -2
  9. data/lib/rubygems/commands/setup_command.rb +27 -17
  10. data/lib/rubygems/commands/which_command.rb +1 -1
  11. data/lib/rubygems/config_file.rb +11 -4
  12. data/lib/rubygems/indexer.rb +6 -6
  13. data/lib/rubygems/source_index.rb +25 -19
  14. data/lib/rubygems/spec_fetcher.rb +14 -7
  15. data/lib/rubygems/specification.rb +1 -1
  16. data/test/test_gem.rb +0 -8
  17. data/test/test_gem_commands_dependency_command.rb +4 -0
  18. data/test/test_gem_commands_uninstall_command.rb +20 -0
  19. data/test/test_gem_indexer.rb +63 -24
  20. data/test/test_gem_source_index.rb +4 -3
  21. data/test/test_gem_spec_fetcher.rb +16 -2
  22. metadata +163 -47
  23. metadata.gz.sig +0 -0
  24. data/doc/release_notes/docs-rubygems-announce.rdoc +0 -29
  25. data/doc/release_notes/rel_0_2_0.rdoc +0 -4
  26. data/doc/release_notes/rel_0_3_0.rdoc +0 -21
  27. data/doc/release_notes/rel_0_4_0.rdoc +0 -4
  28. data/doc/release_notes/rel_0_5_0.rdoc +0 -26
  29. data/doc/release_notes/rel_0_6_0.rdoc +0 -16
  30. data/doc/release_notes/rel_0_7_0.rdoc +0 -4
  31. data/doc/release_notes/rel_0_8_0.rdoc +0 -23
  32. data/doc/release_notes/rel_0_8_1.rdoc +0 -4
  33. data/doc/release_notes/rel_0_8_10.rdoc +0 -70
  34. data/doc/release_notes/rel_0_8_11.rdoc +0 -102
  35. data/doc/release_notes/rel_0_8_3.rdoc +0 -113
  36. data/doc/release_notes/rel_0_8_4.rdoc +0 -51
  37. data/doc/release_notes/rel_0_8_5.rdoc +0 -117
  38. data/doc/release_notes/rel_0_8_7.rdoc +0 -135
  39. data/doc/release_notes/rel_0_9_0.rdoc +0 -109
  40. data/doc/release_notes/rel_0_9_2.rdoc +0 -69
  41. data/doc/release_notes/rel_0_9_3.rdoc +0 -66
  42. data/doc/release_notes/rel_0_9_4.rdoc +0 -67
  43. data/doc/release_notes/rel_0_9_5.rdoc +0 -108
  44. data/doc/release_notes/rel_1_0_0.rdoc +0 -67
  45. data/doc/release_notes/rel_1_0_1.rdoc +0 -56
  46. data/doc/release_notes/rel_1_1_0.rdoc +0 -85
  47. data/doc/release_notes/rel_1_1_1.rdoc +0 -64
  48. data/doc/release_notes/rel_1_2_0.rdoc +0 -105
  49. data/doc/release_notes/rel_1_3_0.rdoc +0 -125
  50. data/doc/release_notes/rel_1_3_1.rdoc +0 -75
  51. data/doc/release_notes/rel_1_3_2.rdoc +0 -119
  52. data/doc/release_notes/rel_1_3_3.rdoc +0 -95
  53. data/lib/rubygems/rubygems_version.rb +0 -19
@@ -5,13 +5,14 @@
5
5
  # See LICENSE.txt for permissions.
6
6
  #++
7
7
 
8
- require 'rubygems/rubygems_version'
9
8
  require 'rubygems/defaults'
10
9
  require 'thread'
11
10
  require 'etc'
12
11
 
13
12
  module Gem
14
13
 
14
+ RubyGemsVersion = VERSION = '1.3.5'
15
+
15
16
  ##
16
17
  # Raised when RubyGems is unable to load or activate a gem. Contains the
17
18
  # name and version requirements of the gem that either conflicts with
@@ -383,7 +384,7 @@ module Gem
383
384
  raise Gem::Exception, msg
384
385
  end
385
386
 
386
- File.join(spec.full_gem_path, spec.bindir, exec_name).sub(/.*\s.*/m, '"\&"')
387
+ File.join(spec.full_gem_path, spec.bindir, exec_name)
387
388
  end
388
389
 
389
390
  ##
@@ -88,6 +88,8 @@ By default, this RubyGems will install gem as:
88
88
  end
89
89
 
90
90
  def execute
91
+ @verbose = Gem.configuration.really_verbose
92
+
91
93
  install_destdir = options[:destdir]
92
94
 
93
95
  unless install_destdir.empty? then
@@ -113,21 +115,29 @@ By default, this RubyGems will install gem as:
113
115
 
114
116
  remove_source_caches install_destdir
115
117
 
118
+ say "RubyGems #{Gem::VERSION} installed"
119
+
116
120
  install_rdoc
117
121
 
118
122
  say
119
- say "-" * 78
120
- say
123
+ if @verbose then
124
+ say "-" * 78
125
+ say
126
+ end
121
127
 
122
- release_notes = File.join Dir.pwd, 'doc', 'release_notes',
123
- "rel_#{Gem::RubyGemsVersion.gsub '.', '_'}.rdoc"
128
+ release_notes = File.join Dir.pwd, 'History.txt'
124
129
 
125
- if File.exist? release_notes then
126
- say File.read(release_notes)
127
- else
128
- say "Oh-no! Unable to find release notes!"
129
- say "Looked in: #{release_notes}" if Gem.configuration.really_verbose
130
- end
130
+ release_notes = if File.exist? release_notes then
131
+ open release_notes do |io|
132
+ text = io.gets '==='
133
+ text << io.gets('===')
134
+ text[0...-3]
135
+ end
136
+ else
137
+ "Oh-no! Unable to find release notes!"
138
+ end
139
+
140
+ say release_notes
131
141
 
132
142
  say
133
143
  say "-" * 78
@@ -145,7 +155,7 @@ By default, this RubyGems will install gem as:
145
155
  end
146
156
 
147
157
  def install_executables(bin_dir)
148
- say "Installing gem executable"
158
+ say "Installing gem executable" if @verbose
149
159
 
150
160
  @bin_file_names = []
151
161
 
@@ -203,7 +213,7 @@ TEXT
203
213
  end
204
214
 
205
215
  def install_lib(lib_dir)
206
- say "Installing RubyGems"
216
+ say "Installing RubyGems" if @verbose
207
217
 
208
218
  Dir.chdir 'lib' do
209
219
  lib_files = Dir[File.join('**', '*rb')]
@@ -226,23 +236,23 @@ TEXT
226
236
  if File.writable? gem_doc_dir and
227
237
  (not File.exist? rubygems_doc_dir or
228
238
  File.writable? rubygems_doc_dir) then
229
- say "Removing old RubyGems RDoc and ri"
239
+ say "Removing old RubyGems RDoc and ri" if @verbose
230
240
  Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
231
241
  rm_rf dir
232
242
  end
233
243
 
234
244
  if options[:ri] then
235
245
  ri_dir = File.join rubygems_doc_dir, 'ri'
236
- say "Installing #{rubygems_name} ri into #{ri_dir}"
246
+ say "Installing #{rubygems_name} ri into #{ri_dir}" if @verbose
237
247
  run_rdoc '--ri', '--op', ri_dir
238
248
  end
239
249
 
240
250
  if options[:rdoc] then
241
251
  rdoc_dir = File.join rubygems_doc_dir, 'rdoc'
242
- say "Installing #{rubygems_name} rdoc into #{rdoc_dir}"
252
+ say "Installing #{rubygems_name} rdoc into #{rdoc_dir}" if @verbose
243
253
  run_rdoc '--op', rdoc_dir
244
254
  end
245
- else
255
+ elsif @verbose then
246
256
  say "Skipping RDoc generation, #{gem_doc_dir} not writable"
247
257
  say "Set the GEM_HOME environment variable if you want RDoc generated"
248
258
  end
@@ -327,7 +337,7 @@ abort "#{deprecation_message}"
327
337
  system_cache_file = File.join(install_destdir,
328
338
  Gem::SourceInfoCache.system_cache_file)
329
339
 
330
- say "Removing old source_cache files"
340
+ say "Removing old source_cache files" if Gem.configuration.really_verbose
331
341
  rm_f user_cache_file if File.writable? File.dirname(user_cache_file)
332
342
  rm_f system_cache_file if File.writable? File.dirname(system_cache_file)
333
343
  end
@@ -46,7 +46,7 @@ class Gem::Commands::WhichCommand < Gem::Command
46
46
  end
47
47
 
48
48
  say "(checking gem #{spec.full_name} for #{arg})" if
49
- Gem.configuration.verbose
49
+ Gem.configuration.verbose and $stdout.tty?
50
50
  end
51
51
 
52
52
  paths = find_paths arg, dirs
@@ -29,14 +29,21 @@ class Gem::ConfigFile
29
29
 
30
30
  PLATFORM_DEFAULTS = {}
31
31
 
32
- system_config_path =
32
+ system_config_path =
33
33
  begin
34
34
  require 'Win32API'
35
35
 
36
36
  CSIDL_COMMON_APPDATA = 0x0023
37
37
  path = 0.chr * 260
38
- SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP', 'L'
39
- SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path
38
+ if RUBY_VERSION > '1.9' then
39
+ SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP',
40
+ 'L', :stdcall
41
+ SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path
42
+ else
43
+ SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP',
44
+ 'L'
45
+ SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path
46
+ end
40
47
 
41
48
  path.strip
42
49
  rescue LoadError
@@ -44,7 +51,7 @@ class Gem::ConfigFile
44
51
  end
45
52
 
46
53
  SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc'
47
-
54
+
48
55
  # List of arguments supplied to the config file object.
49
56
  attr_reader :args
50
57
 
@@ -141,7 +141,7 @@ class Gem::Indexer
141
141
  "Complete"
142
142
 
143
143
  Gem.time 'Generated YAML quick index gemspecs' do
144
- index.each do |original_name, spec|
144
+ index.released_gems.each do |original_name, spec|
145
145
  spec_file_name = "#{original_name}.gemspec.rz"
146
146
  yaml_name = File.join @quick_dir, spec_file_name
147
147
 
@@ -221,7 +221,7 @@ class Gem::Indexer
221
221
  files = []
222
222
 
223
223
  Gem.time 'Generated Marshal quick index gemspecs' do
224
- (index.gems.merge(index.prerelease_gems)).each do |original_name, spec|
224
+ index.gems.each do |original_name, spec|
225
225
  spec_file_name = "#{original_name}.gemspec.rz"
226
226
  marshal_name = File.join @quick_marshal_dir, spec_file_name
227
227
 
@@ -275,7 +275,7 @@ class Gem::Indexer
275
275
  # Builds indicies for RubyGems 1.2 and newer. Handles full, latest, prerelease
276
276
 
277
277
  def build_modern_indicies(index)
278
- build_modern_index(index.sort, @specs_index, 'specs')
278
+ build_modern_index(index.released_specs.sort, @specs_index, 'specs')
279
279
  build_modern_index(index.latest_specs.sort,
280
280
  @latest_specs_index,
281
281
  'latest specs')
@@ -534,7 +534,7 @@ class Gem::Indexer
534
534
  FileUtils.rm_rf @directory
535
535
  end
536
536
 
537
- ##
537
+ ##
538
538
  # Zlib::GzipWriter wrapper that gzips +filename+ on disk.
539
539
 
540
540
  def gzip(filename)
@@ -654,8 +654,8 @@ class Gem::Indexer
654
654
  files = build_marshal_gemspecs index
655
655
 
656
656
  Gem.time 'Updated indexes' do
657
- update_specs_index index, @dest_specs_index, @specs_index
658
- update_specs_index index, @dest_latest_specs_index, @latest_specs_index
657
+ update_specs_index index.released_gems, @dest_specs_index, @specs_index
658
+ update_specs_index index.released_gems, @dest_latest_specs_index, @latest_specs_index
659
659
  update_specs_index(index.prerelease_gems, @dest_prerelease_specs_index,
660
660
  @prerelease_specs_index)
661
661
  end
@@ -30,7 +30,7 @@ class Gem::SourceIndex
30
30
 
31
31
  include Gem::UserInteraction
32
32
 
33
- attr_reader :gems, :prerelease_gems # :nodoc:
33
+ attr_reader :gems # :nodoc:
34
34
 
35
35
  ##
36
36
  # Directories to use to refresh this SourceIndex when calling refresh!
@@ -122,16 +122,22 @@ class Gem::SourceIndex
122
122
  # #prerelease_gems
123
123
 
124
124
  def initialize(specifications={})
125
- @gems, @prerelease_gems = [{}, {}]
125
+ @gems = {}
126
126
  specifications.each{ |full_name, spec| add_spec spec }
127
127
  @spec_dirs = nil
128
128
  end
129
129
 
130
- ##
131
- # Both regular and prerelease gems
132
-
130
+ # TODO: remove method
133
131
  def all_gems
134
- @gems.merge @prerelease_gems
132
+ @gems
133
+ end
134
+
135
+ def prerelease_gems
136
+ @gems.reject{ |name, gem| !gem.version.prerelease? }
137
+ end
138
+
139
+ def released_gems
140
+ @gems.reject{ |name, gem| gem.version.prerelease? }
135
141
  end
136
142
 
137
143
  ##
@@ -153,8 +159,8 @@ class Gem::SourceIndex
153
159
  end
154
160
 
155
161
  ##
156
- # Returns an Array specifications for the latest versions of each gem in
157
- # this index.
162
+ # Returns an Array specifications for the latest released versions
163
+ # of each gem in this index.
158
164
 
159
165
  def latest_specs
160
166
  result = Hash.new { |h,k| h[k] = [] }
@@ -165,6 +171,7 @@ class Gem::SourceIndex
165
171
  curr_ver = spec.version
166
172
  prev_ver = latest.key?(name) ? latest[name].version : nil
167
173
 
174
+ next if curr_ver.prerelease?
168
175
  next unless prev_ver.nil? or curr_ver >= prev_ver or
169
176
  latest[name].platform != Gem::Platform::RUBY
170
177
 
@@ -192,7 +199,14 @@ class Gem::SourceIndex
192
199
  # An array including only the prerelease gemspecs
193
200
 
194
201
  def prerelease_specs
195
- @prerelease_gems.values
202
+ prerelease_gems.values
203
+ end
204
+
205
+ ##
206
+ # An array including only the released gemspecs
207
+
208
+ def released_specs
209
+ released_gems.values
196
210
  end
197
211
 
198
212
  ##
@@ -201,11 +215,7 @@ class Gem::SourceIndex
201
215
  def add_spec(gem_spec, name = gem_spec.full_name)
202
216
  # No idea why, but the Indexer wants to insert them using original_name
203
217
  # instead of full_name. So we make it an optional arg.
204
- if gem_spec.version.prerelease?
205
- @prerelease_gems[name] = gem_spec
206
- else
207
- @gems[name] = gem_spec
208
- end
218
+ @gems[name] = gem_spec
209
219
  end
210
220
 
211
221
  ##
@@ -221,11 +231,7 @@ class Gem::SourceIndex
221
231
  # Remove a gem specification named +full_name+.
222
232
 
223
233
  def remove_spec(full_name)
224
- if @gems.key? full_name then
225
- @gems.delete full_name
226
- else
227
- @prerelease_gems.delete full_name
228
- end
234
+ @gems.delete full_name
229
235
  end
230
236
 
231
237
  ##
@@ -22,7 +22,7 @@ class Gem::SpecFetcher
22
22
  attr_reader :latest_specs # :nodoc:
23
23
 
24
24
  ##
25
- # Cache of all spces
25
+ # Cache of all released specs
26
26
 
27
27
  attr_reader :specs # :nodoc:
28
28
 
@@ -61,8 +61,9 @@ class Gem::SpecFetcher
61
61
 
62
62
  ##
63
63
  # Fetch specs matching +dependency+. If +all+ is true, all matching
64
- # versions are returned. If +matching_platform+ is false, all platforms are
65
- # returned. If +prerelease+ is true, prerelease versions are included.
64
+ # (released) versions are returned. If +matching_platform+ is
65
+ # false, all platforms are returned. If +prerelease+ is true,
66
+ # prerelease versions are included.
66
67
 
67
68
  def fetch(dependency, all = false, matching_platform = true, prerelease = false)
68
69
  specs_and_sources = find_matching dependency, all, matching_platform, prerelease
@@ -112,9 +113,9 @@ class Gem::SpecFetcher
112
113
  end
113
114
 
114
115
  ##
115
- # Find spec names that match +dependency+. If +all+ is true, all matching
116
- # versions are returned. If +matching_platform+ is false, gems for all
117
- # platforms are returned.
116
+ # Find spec names that match +dependency+. If +all+ is true, all
117
+ # matching released versions are returned. If +matching_platform+
118
+ # is false, gems for all platforms are returned.
118
119
 
119
120
  def find_matching(dependency, all = false, matching_platform = true, prerelease = false)
120
121
  found = {}
@@ -161,7 +162,7 @@ class Gem::SpecFetcher
161
162
 
162
163
  ##
163
164
  # Returns a list of gems available for each source in Gem::sources. If
164
- # +all+ is true, all versions are returned instead of only latest
165
+ # +all+ is true, all released versions are returned instead of only latest
165
166
  # versions. If +prerelease+ is true, include prerelease versions.
166
167
 
167
168
  def list(all = false, prerelease = false)
@@ -194,6 +195,12 @@ class Gem::SpecFetcher
194
195
  list[source_uri] = cache[source_uri]
195
196
  end
196
197
 
198
+ if type == :all
199
+ list.values.map do |gems|
200
+ gems.reject! { |g| g[1].prerelease? }
201
+ end
202
+ end
203
+
197
204
  list
198
205
  end
199
206
 
@@ -847,7 +847,7 @@ class Gem::Specification
847
847
  'authors must be Array of Strings'
848
848
  end
849
849
 
850
- licenses.each{ |license|
850
+ licenses.each { |license|
851
851
  if license.length > 64
852
852
  raise Gem::InvalidSpecificationException,
853
853
  "each license must be 64 characters or less"
@@ -78,14 +78,6 @@ class TestGem < RubyGemTestCase
78
78
  end
79
79
  end
80
80
 
81
- def test_self_bin_path_with_spaces
82
- quick_gem 'sp ace', '3' do |s|
83
- s.executables = ['exec']
84
- end
85
- path = Gem.bin_path('sp ace', 'exec')
86
- assert_equal %w(" "), [path[0,1], path[-1,1]], "Path should be escaped"
87
- end
88
-
89
81
  def test_self_bin_path_not_found
90
82
  assert_raises(Gem::GemNotFoundException) do
91
83
  Gem.bin_path('non-existent')
@@ -43,6 +43,8 @@ Gem a-1
43
43
 
44
44
  Gem a-2
45
45
 
46
+ Gem a-3.a
47
+
46
48
  Gem a_evil-9
47
49
 
48
50
  Gem b-2
@@ -100,6 +102,8 @@ Gem a-1
100
102
 
101
103
  Gem a-2
102
104
 
105
+ Gem a-3.a
106
+
103
107
  Gem a_evil-9
104
108
 
105
109
  Gem b-2
@@ -58,5 +58,25 @@ class TestGemCommandsUninstallCommand < GemInstallerTestCase
58
58
  assert_empty output, "UI output should be empty after an uninstall error"
59
59
  end
60
60
 
61
+ def test_execute_prerelease
62
+ @spec = quick_gem "pre", "2.b"
63
+ @gem = File.join @tempdir, "#{@spec.full_name}.gem"
64
+ FileUtils.touch @gem
65
+
66
+ util_setup_gem
67
+
68
+ use_ui @ui do
69
+ @installer.install
70
+ end
71
+
72
+ @cmd.options[:args] = ["pre"]
73
+
74
+ use_ui @ui do
75
+ @cmd.execute
76
+ end
77
+
78
+ output = @ui.output
79
+ assert_match(/Successfully uninstalled/, output)
80
+ end
61
81
  end
62
82
 
@@ -118,10 +118,13 @@ class TestGemIndexer < RubyGemTestCase
118
118
  expected = <<-EOF
119
119
  a-1
120
120
  a-2
121
+ a-3.a
121
122
  a_evil-9
122
123
  b-2
123
124
  c-1.2
124
125
  d-2.0
126
+ d-2.0.a
127
+ d-2.0.b
125
128
  pl-1-i386-linux
126
129
  EOF
127
130
 
@@ -163,13 +166,13 @@ pl-1-i386-linux
163
166
  assert_indexed @tempdir, "latest_specs.#{@marshal_version}.gz"
164
167
 
165
168
  expected = <<-EOF
166
- <?xml version="1.0"?>
167
- <rss version="2.0">
169
+ <?xml version=\"1.0\"?>
170
+ <rss version=\"2.0\">
168
171
  <channel>
169
172
  <title>ExampleForge gems</title>
170
173
  <link>http://example.com</link>
171
174
  <description>Recently released gems from http://example.com</description>
172
- <generator>RubyGems v#{Gem::RubyGemsVersion}</generator>
175
+ <generator>RubyGems v1.3.4</generator>
173
176
  <docs>http://cyber.law.harvard.edu/rss/rss.html</docs>
174
177
  <item>
175
178
  <title>a-2</title>
@@ -178,9 +181,21 @@ pl-1-i386-linux
178
181
  </description>
179
182
  <author>example@example.com (A User)</author>
180
183
  <guid>a-2</guid>
181
- <enclosure url="http://gems.example.com/gems/a-2.gem"
182
- length="3072" type="application/octet-stream" />
183
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
184
+ <enclosure url=\"http://gems.example.com/gems/a-2.gem\"
185
+ length=\"3072\" type=\"application/octet-stream\" />
186
+ <pubDate>#{@a2.date.rfc2822}</pubDate>
187
+ <link>http://example.com</link>
188
+ </item>
189
+ <item>
190
+ <title>a-3.a</title>
191
+ <description>
192
+ &lt;pre&gt;This is a test description&lt;/pre&gt;
193
+ </description>
194
+ <author>example@example.com (A User)</author>
195
+ <guid>a-3.a</guid>
196
+ <enclosure url=\"http://gems.example.com/gems/a-3.a.gem\"
197
+ length=\"3072\" type=\"application/octet-stream\" />
198
+ <pubDate>#{@a3a.date.rfc2822}</pubDate>
184
199
  <link>http://example.com</link>
185
200
  </item>
186
201
  <item>
@@ -190,9 +205,9 @@ pl-1-i386-linux
190
205
  </description>
191
206
  <author>example@example.com (A User)</author>
192
207
  <guid>a_evil-9</guid>
193
- <enclosure url="http://gems.example.com/gems/a_evil-9.gem"
194
- length="3072" type="application/octet-stream" />
195
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
208
+ <enclosure url=\"http://gems.example.com/gems/a_evil-9.gem\"
209
+ length=\"3072\" type=\"application/octet-stream\" />
210
+ <pubDate>#{@a_evil9.date.rfc2822}</pubDate>
196
211
  <link>http://example.com</link>
197
212
  </item>
198
213
  <item>
@@ -202,9 +217,9 @@ pl-1-i386-linux
202
217
  </description>
203
218
  <author>example@example.com (A User)</author>
204
219
  <guid>b-2</guid>
205
- <enclosure url="http://gems.example.com/gems/b-2.gem"
206
- length="3072" type="application/octet-stream" />
207
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
220
+ <enclosure url=\"http://gems.example.com/gems/b-2.gem\"
221
+ length=\"3072\" type=\"application/octet-stream\" />
222
+ <pubDate>#{@b2.date.rfc2822}</pubDate>
208
223
  <link>http://example.com</link>
209
224
  </item>
210
225
  <item>
@@ -214,9 +229,33 @@ pl-1-i386-linux
214
229
  </description>
215
230
  <author>example@example.com (A User)</author>
216
231
  <guid>c-1.2</guid>
217
- <enclosure url="http://gems.example.com/gems/c-1.2.gem"
218
- length="3072" type="application/octet-stream" />
219
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
232
+ <enclosure url=\"http://gems.example.com/gems/c-1.2.gem\"
233
+ length=\"3072\" type=\"application/octet-stream\" />
234
+ <pubDate>#{@c1_2.date.rfc2822}</pubDate>
235
+ <link>http://example.com</link>
236
+ </item>
237
+ <item>
238
+ <title>d-2.0.a</title>
239
+ <description>
240
+ &lt;pre&gt;This is a test description&lt;/pre&gt;
241
+ </description>
242
+ <author>example@example.com (A User)</author>
243
+ <guid>d-2.0.a</guid>
244
+ <enclosure url=\"http://gems.example.com/gems/d-2.0.a.gem\"
245
+ length=\"3072\" type=\"application/octet-stream\" />
246
+ <pubDate>#{@d2_0_a.date.rfc2822}</pubDate>
247
+ <link>http://example.com</link>
248
+ </item>
249
+ <item>
250
+ <title>d-2.0.b</title>
251
+ <description>
252
+ &lt;pre&gt;This is a test description&lt;/pre&gt;
253
+ </description>
254
+ <author>example@example.com (A User)</author>
255
+ <guid>d-2.0.b</guid>
256
+ <enclosure url=\"http://gems.example.com/gems/d-2.0.b.gem\"
257
+ length=\"3072\" type=\"application/octet-stream\" />
258
+ <pubDate>#{@d2_0_b.date.rfc2822}</pubDate>
220
259
  <link>http://example.com</link>
221
260
  </item>
222
261
  <item>
@@ -226,9 +265,9 @@ pl-1-i386-linux
226
265
  </description>
227
266
  <author>example@example.com (A User)</author>
228
267
  <guid>pl-1-x86-linux</guid>
229
- <enclosure url="http://gems.example.com/gems/pl-1-x86-linux.gem"
230
- length="3072" type="application/octet-stream" />
231
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
268
+ <enclosure url=\"http://gems.example.com/gems/pl-1-x86-linux.gem\"
269
+ length=\"3072\" type=\"application/octet-stream\" />
270
+ <pubDate>#{@pl1.date.rfc2822}</pubDate>
232
271
  <link>http://example.com</link>
233
272
  </item>
234
273
  <item>
@@ -247,9 +286,9 @@ eighty characters.&lt;/pre&gt;
247
286
  </description>
248
287
  <author>example@example.com (Example), example2@example.com (Example2)</author>
249
288
  <guid>a-1</guid>
250
- <enclosure url="http://gems.example.com/gems/a-1.gem"
251
- length="3584" type="application/octet-stream" />
252
- <pubDate>#{(Gem::Specification::TODAY - 86400).rfc2822}</pubDate>
289
+ <enclosure url=\"http://gems.example.com/gems/a-1.gem\"
290
+ length=\"3584\" type=\"application/octet-stream\" />
291
+ <pubDate>#{@a1.date.rfc2822}</pubDate>
253
292
  <link>http://a.example.com</link>
254
293
  </item>
255
294
  </channel>
@@ -462,9 +501,9 @@ eighty characters.&lt;/pre&gt;
462
501
  @ui.output
463
502
  assert_match %r%^\.\.\.\.\.\.\.\.\.\.$%, @ui.output
464
503
  assert_match %r%^Loaded all gems$%, @ui.output
465
- assert_match %r%^Generating Marshal quick index gemspecs for 7 gems$%,
504
+ assert_match %r%^Generating Marshal quick index gemspecs for 10 gems$%,
466
505
  @ui.output
467
- assert_match %r%^Generating YAML quick index gemspecs for 7 gems$%,
506
+ assert_match %r%^Generating YAML quick index gemspecs for 10 gems$%,
468
507
  @ui.output
469
508
  assert_match %r%^Complete$%, @ui.output
470
509
  assert_match %r%^Generating specs index$%, @ui.output
@@ -473,7 +512,7 @@ eighty characters.&lt;/pre&gt;
473
512
  assert_match %r%^Generating latest index$%, @ui.output
474
513
  assert_match %r%^Generating prerelease specs index$%, @ui.output
475
514
  assert_match %r%^Generating Marshal master index$%, @ui.output
476
- assert_match %r%^Generating YAML master index for 7 gems \(this may take a while\)$%, @ui.output
515
+ assert_match %r%^Generating YAML master index for 10 gems \(this may take a while\)$%, @ui.output
477
516
  assert_match %r%^Complete$%, @ui.output
478
517
  assert_match %r%^Compressing indicies$%, @ui.output
479
518