summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher/compact_index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/fetcher/compact_index.rb')
-rw-r--r--lib/bundler/fetcher/compact_index.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index 97de88101b..cfc74d642c 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require "bundler/fetcher/base"
require "bundler/worker"
@@ -61,7 +62,7 @@ module Bundler
compact_index_request :fetch_spec
def available?
- return nil unless md5_available?
+ return nil unless SharedHelpers.md5_available?
user_home = Bundler.user_home
return nil unless user_home.directory? && user_home.writable?
# Read info file checksums out of /versions, so we can know if gems are up to date
@@ -120,16 +121,6 @@ module Bundler
Net::HTTPNotModified.new(nil, nil, nil)
end
end
-
- def md5_available?
- require "openssl"
- OpenSSL::Digest::MD5.digest("")
- true
- rescue LoadError
- true
- rescue OpenSSL::Digest::DigestError
- false
- end
end
end
end