summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-04-29 22:43:39 +0900
committerSamuel Giddins <segiddins@segiddins.me>2016-04-30 02:04:04 -0500
commit83dff707746e77123fb0736dab08260f8126db25 (patch)
treee5335eac5d47835ed7e88743f9bc0a793c45abc7
parent5f5b8e864893aec3ceeb9e340334abedd79f6cff (diff)
downloadbundler-83dff707746e77123fb0736dab08260f8126db25.tar.gz
Auto merge of #4479 - mwrock:windows, r=segiddins
fixes checksums of rubygems index on windows `Digest::MD5.file(path)` uses `File.open(path) { |f| f.read }` which will inject `\r\n` style newlines on windows. Using `IO.read(path)` avoids the carriage returns and produces matching checksums on windows.
-rw-r--r--lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
index 630318a9be..6142afb7c5 100644
--- a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
+++ b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
@@ -61,7 +61,7 @@ class Bundler::CompactIndexClient
def checksum_for_file(path)
return nil unless path.file?
- Digest::MD5.file(path).hexdigest
+ Digest::MD5.hexdigest(IO.read(path))
end
end
end