summaryrefslogtreecommitdiff
path: root/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-04-29 22:43:39 +0900
committerHomu <homu@barosl.com>2016-04-29 22:43:39 +0900
commit9d39efdf67311a0a6da252e8ad70bd229858272e (patch)
treebab44764b6a7676a8858be2a7500c7425cac7ed1 /lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
parenta14a9cf5097c9e7a87309484a0673c78572ab225 (diff)
parent700a10b1f7ec9451999927504b01c077fa00f290 (diff)
downloadbundler-9d39efdf67311a0a6da252e8ad70bd229858272e.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.
Diffstat (limited to 'lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb')
-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