diff options
Diffstat (limited to 'lib/bundler/compact_index_client')
-rw-r--r-- | lib/bundler/compact_index_client/cache.rb | 3 | ||||
-rw-r--r-- | lib/bundler/compact_index_client/updater.rb | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/compact_index_client/cache.rb b/lib/bundler/compact_index_client/cache.rb index e44f05dc7e..f6105d3bb3 100644 --- a/lib/bundler/compact_index_client/cache.rb +++ b/lib/bundler/compact_index_client/cache.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require "digest/md5" module Bundler class CompactIndexClient @@ -68,7 +67,7 @@ module Bundler def info_path(name) name = name.to_s if name =~ /[^a-z0-9_-]/ - name += "-#{Digest::MD5.hexdigest(name).downcase}" + name += "-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}" info_roots.last.join(name) else info_roots.first.join(name) diff --git a/lib/bundler/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb index dc26095040..3a4e4441ca 100644 --- a/lib/bundler/compact_index_client/updater.rb +++ b/lib/bundler/compact_index_client/updater.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require "fileutils" + +require "bundler/vendored_fileutils" require "stringio" -require "tmpdir" require "zlib" module Bundler @@ -22,6 +22,7 @@ module Bundler def initialize(fetcher) @fetcher = fetcher + require "tmpdir" end def update(local_path, remote_path, retrying = nil) @@ -98,7 +99,7 @@ module Bundler # because we need to preserve \n line endings on windows when calculating # the checksum SharedHelpers.filesystem_access(path, :read) do - Digest::MD5.hexdigest(IO.read(path)) + SharedHelpers.digest(:MD5).hexdigest(IO.read(path)) end end end |