summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-12-16 23:24:20 -0800
committerAndre Arko <andre@arko.net>2013-12-18 15:32:36 -0800
commit297cd8ba779fdd8827bf3061106ab0d6655a6b30 (patch)
tree47ab27755c90fe5092b7fec00fc993553317bb03
parent88f572ca937eadafb9e411bff14b4f83acde05cd (diff)
downloadbundler-297cd8ba779fdd8827bf3061106ab0d6655a6b30.tar.gz
readability
-rw-r--r--lib/bundler/installer.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 38e11f431e..956b11087b 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -212,10 +212,12 @@ module Bundler
sizes = cached_gems.group_by { |f| File.size(f) }
gems_with_same_size = sizes.select { |i, ns| ns.size > 1}
- sha1_gems = gems_with_same_size.values.flatten.group_by { |f| Digest::SHA1.hexdigest(File.read(f)) }
+ sha1_gems = gems_with_same_size.values.flatten.group_by do |f|
+ Digest::SHA1.hexdigest(File.read(f))
+ end
corrupted_gems = sha1_gems.select { |i, ns| ns.size > 1 }
- unless corrupted_gems.empty?
+ if corrupted_gems.any?
Bundler.ui.warn "Following gems are corrupted #{corrupted_gems.values.flatten}\n"\
"Please report this issue with the .bundle/install.log logfile"
end