summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-10-09 22:54:45 +1100
committerColby Swandale <colby@taplaboratories.com>2017-10-14 09:40:25 +1100
commit957447cdda34d088081b446618b911be9fa4dc1e (patch)
tree06a285a9d9f0c8b2e53fb0cd050f53257154ad20
parent4a53b530dd05e6288157e644e0ef30869e23dee3 (diff)
downloadbundler-colby/flaky-test.tar.gz
Load Digest::SHA2 using Digest()colby/flaky-test
-rw-r--r--lib/bundler/rubygems_gem_installer.rb2
-rw-r--r--spec/support/artifice/compact_index.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb
index e7e1a7e940..6737c937b8 100644
--- a/lib/bundler/rubygems_gem_installer.rb
+++ b/lib/bundler/rubygems_gem_installer.rb
@@ -48,7 +48,7 @@ module Bundler
return true unless source = @package.instance_variable_get(:@gem)
return true unless source.respond_to?(:with_read_io)
digest = source.with_read_io do |io|
- digest = Digest::SHA256.new
+ digest = Digest(:SHA256).new
digest << io.read(16_384) until io.eof?
io.rewind
send(checksum_type(checksum), digest)
diff --git a/spec/support/artifice/compact_index.rb b/spec/support/artifice/compact_index.rb
index bfb6cfd7f0..64f7dc903a 100644
--- a/spec/support/artifice/compact_index.rb
+++ b/spec/support/artifice/compact_index.rb
@@ -82,7 +82,7 @@ class CompactIndexAPI < Endpoint
CompactIndex::Dependency.new(d.name, reqs)
end
checksum = begin
- Digest::SHA256.file("#{GEM_REPO}/gems/#{spec.original_name}.gem").base64digest
+ Digest(:SHA256).file("#{GEM_REPO}/gems/#{spec.original_name}.gem").base64digest
rescue
nil
end