diff options
author | Homu <homu@barosl.com> | 2016-04-29 22:43:39 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-04-29 22:43:39 +0900 |
commit | 9d39efdf67311a0a6da252e8ad70bd229858272e (patch) | |
tree | bab44764b6a7676a8858be2a7500c7425cac7ed1 /lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb | |
parent | a14a9cf5097c9e7a87309484a0673c78572ab225 (diff) | |
parent | 700a10b1f7ec9451999927504b01c077fa00f290 (diff) | |
download | bundler-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.rb | 2 |
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 |