aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/indexer.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-14 12:59:03 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-14 12:59:03 +0000
commit4ae3df42f723d25b0fe4ba6b2689d607b01c6f48 (patch)
tree26c5f5cf033f79373e63b10f684df07898b7cd8f /lib/rubygems/indexer.rb
parentd1e6304a891fc5e9cc63e50520bdc798fb95b829 (diff)
downloadruby-4ae3df42f723d25b0fe4ba6b2689d607b01c6f48.tar.gz
Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
This version contains the some style changes by RuboCop. * https://github.com/rubygems/rubygems/commit/9d810be0ede925fb2e3af535848582c3f8e0e72f * https://github.com/rubygems/rubygems/commit/61ea98a727fb1b76b6fac52d74107ee4b02aaef2 * https://github.com/rubygems/rubygems/commit/795893dce3c5f8540804fc08144cc6a90f086b13 * https://github.com/rubygems/rubygems/commit/9be7858f7f17eae3058204f3c03e4b798ba18b9c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/indexer.rb')
-rw-r--r--lib/rubygems/indexer.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb
index b97347177d..4d199868fb 100644
--- a/lib/rubygems/indexer.rb
+++ b/lib/rubygems/indexer.rb
@@ -131,7 +131,10 @@ class Gem::Indexer
marshal_name = File.join @quick_marshal_dir, spec_file_name
marshal_zipped = Gem.deflate Marshal.dump(spec)
- File.open marshal_name, 'wb' do |io| io.write marshal_zipped end
+
+ File.open marshal_name, 'wb' do |io|
+ io.write marshal_zipped
+ end
files << marshal_name
@@ -180,9 +183,9 @@ class Gem::Indexer
# Builds indices for RubyGems 1.2 and newer. Handles full, latest, prerelease
def build_modern_indices(specs)
- prerelease, released = specs.partition { |s|
+ prerelease, released = specs.partition do |s|
s.version.prerelease?
- }
+ end
latest_specs =
Gem::Specification._latest_specs specs
@@ -200,7 +203,7 @@ class Gem::Indexer
end
def map_gems_to_specs(gems)
- gems.map { |gemfile|
+ gems.map do |gemfile|
if File.size(gemfile) == 0
alert_warning "Skipping zero-length gem: #{gemfile}"
next
@@ -223,7 +226,7 @@ class Gem::Indexer
"\t#{e.backtrace.join "\n\t"}"].join("\n")
alert_error msg
end
- }.compact
+ end.compact
end
##
@@ -439,4 +442,5 @@ class Gem::Indexer
Marshal.dump specs_index, io
end
end
+
end