lib/rubygems/indexer.rb in rubygems-update-1.3.4 vs lib/rubygems/indexer.rb in rubygems-update-1.3.5

- old
+ new

@@ -139,11 +139,11 @@ progress = ui.progress_reporter index.size, "Generating YAML quick index gemspecs for #{index.size} gems", "Complete" Gem.time 'Generated YAML quick index gemspecs' do - index.each do |original_name, spec| + index.released_gems.each do |original_name, spec| spec_file_name = "#{original_name}.gemspec.rz" yaml_name = File.join @quick_dir, spec_file_name yaml_zipped = Gem.deflate spec.to_yaml open yaml_name, 'wb' do |io| io.write yaml_zipped end @@ -219,11 +219,11 @@ "Complete" files = [] Gem.time 'Generated Marshal quick index gemspecs' do - (index.gems.merge(index.prerelease_gems)).each do |original_name, spec| + index.gems.each do |original_name, spec| spec_file_name = "#{original_name}.gemspec.rz" marshal_name = File.join @quick_marshal_dir, spec_file_name marshal_zipped = Gem.deflate Marshal.dump(spec) open marshal_name, 'wb' do |io| io.write marshal_zipped end @@ -273,11 +273,11 @@ ## # Builds indicies for RubyGems 1.2 and newer. Handles full, latest, prerelease def build_modern_indicies(index) - build_modern_index(index.sort, @specs_index, 'specs') + build_modern_index(index.released_specs.sort, @specs_index, 'specs') build_modern_index(index.latest_specs.sort, @latest_specs_index, 'latest specs') build_modern_index(index.prerelease_specs.sort, @prerelease_specs_index, @@ -532,11 +532,11 @@ rescue SignalException ensure FileUtils.rm_rf @directory end - ## + ## # Zlib::GzipWriter wrapper that gzips +filename+ on disk. def gzip(filename) Zlib::GzipWriter.open "#{filename}.gz" do |io| io.write Gem.read_binary(filename) @@ -652,11 +652,11 @@ index = collect_specs updated_gems files = build_marshal_gemspecs index Gem.time 'Updated indexes' do - update_specs_index index, @dest_specs_index, @specs_index - update_specs_index index, @dest_latest_specs_index, @latest_specs_index + update_specs_index index.released_gems, @dest_specs_index, @specs_index + update_specs_index index.released_gems, @dest_latest_specs_index, @latest_specs_index update_specs_index(index.prerelease_gems, @dest_prerelease_specs_index, @prerelease_specs_index) end compress_indicies