summaryrefslogtreecommitdiff
path: root/lib/bundler/compact_index_client
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-01 23:29:38 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-01 23:29:38 +0000
commitbe7b5929126cb3e696ef222339237faba9b8fe5a (patch)
tree51eae376f93c09bc82dde5a657a91df2c89062e4 /lib/bundler/compact_index_client
parentae49dbd392083f69026f2a0fff4a1d5f42d172a7 (diff)
Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/bundler/compact_index_client')
-rw-r--r--lib/bundler/compact_index_client/cache.rb3
-rw-r--r--lib/bundler/compact_index_client/updater.rb7
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