summaryrefslogtreecommitdiff
path: root/spec/bundler/support/artifice/compact_index.rb
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 /spec/bundler/support/artifice/compact_index.rb
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 'spec/bundler/support/artifice/compact_index.rb')
-rw-r--r--spec/bundler/support/artifice/compact_index.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/bundler/support/artifice/compact_index.rb b/spec/bundler/support/artifice/compact_index.rb
index 9111ed8211..123efe3c58 100644
--- a/spec/bundler/support/artifice/compact_index.rb
+++ b/spec/bundler/support/artifice/compact_index.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require File.expand_path("../endpoint", __FILE__)
$LOAD_PATH.unshift Dir[base_system_gems.join("gems/compact_index*/lib")].first.to_s
@@ -14,7 +15,7 @@ class CompactIndexAPI < Endpoint
def etag_response
response_body = yield
- checksum = Digest::MD5.hexdigest(response_body)
+ checksum = Digest(:MD5).hexdigest(response_body)
return if not_modified?(checksum)
headers "ETag" => quote(checksum)
headers "Surrogate-Control" => "max-age=2592000, stale-while-revalidate=60"
@@ -67,7 +68,7 @@ class CompactIndexAPI < Endpoint
@gems ||= {}
@gems[gem_repo] ||= begin
specs = Bundler::Deprecate.skip_during do
- %w(specs.4.8 prerelease_specs.4.8).map do |filename|
+ %w[specs.4.8 prerelease_specs.4.8].map do |filename|
Marshal.load(File.open(gem_repo.join(filename)).read).map do |name, version, platform|
load_spec(name, version, platform, gem_repo)
end