summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler/source/rubygems
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/bundler/source/rubygems
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/bundler/source/rubygems')
-rw-r--r--spec/bundler/bundler/source/rubygems/remote_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/bundler/bundler/source/rubygems/remote_spec.rb b/spec/bundler/bundler/source/rubygems/remote_spec.rb
index 54394fc0ca..9a7ab42128 100644
--- a/spec/bundler/bundler/source/rubygems/remote_spec.rb
+++ b/spec/bundler/bundler/source/rubygems/remote_spec.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-require "spec_helper"
+
require "bundler/source/rubygems/remote"
RSpec.describe Bundler::Source::Rubygems::Remote do
@@ -8,7 +8,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
before do
- allow(Digest::MD5).to receive(:hexdigest).with(duck_type(:to_s)) {|string| "MD5HEX(#{string})" }
+ allow(Digest(:MD5)).to receive(:hexdigest).with(duck_type(:to_s)) {|string| "MD5HEX(#{string})" }
end
let(:uri_no_auth) { URI("https://gems.example.com") }
@@ -22,7 +22,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
it "applies configured credentials" do
- Bundler.settings[uri_no_auth.to_s] = credentials
+ Bundler.settings.temporary(uri_no_auth.to_s => credentials)
expect(remote(uri_no_auth).uri).to eq(uri_with_auth)
end
end
@@ -33,7 +33,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
it "does not apply given credentials" do
- Bundler.settings[uri_no_auth.to_s] = credentials
+ Bundler.settings.temporary(uri_no_auth.to_s => credentials)
expect(remote(uri_no_auth).anonymized_uri).to eq(uri_no_auth)
end
end
@@ -44,7 +44,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
it "only applies the given user" do
- Bundler.settings[uri_no_auth.to_s] = credentials
+ Bundler.settings.temporary(uri_no_auth.to_s => credentials)
expect(remote(uri_no_auth).cache_slug).to eq("gems.example.com.username.443.MD5HEX(gems.example.com.username.443./)")
end
end
@@ -57,7 +57,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
it "does not apply configured credentials" do
- Bundler.settings[uri_no_auth.to_s] = "other:stuff"
+ Bundler.settings.temporary(uri_no_auth.to_s => "other:stuff")
expect(remote(uri_with_auth).uri).to eq(uri_with_auth)
end
end
@@ -68,7 +68,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
it "does not apply given credentials" do
- Bundler.settings[uri_no_auth.to_s] = "other:stuff"
+ Bundler.settings.temporary(uri_no_auth.to_s => "other:stuff")
expect(remote(uri_with_auth).anonymized_uri).to eq(uri_no_auth)
end
end
@@ -79,7 +79,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
end
it "does not apply given credentials" do
- Bundler.settings[uri_with_auth.to_s] = credentials
+ Bundler.settings.temporary(uri_with_auth.to_s => credentials)
expect(remote(uri_with_auth).cache_slug).to eq("gems.example.com.username.443.MD5HEX(gems.example.com.username.443./)")
end
end
@@ -106,7 +106,7 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
let(:mirror_uri_with_auth) { URI("https://username:password@rubygems-mirror.org/") }
let(:mirror_uri_no_auth) { URI("https://rubygems-mirror.org/") }
- before { Bundler.settings["mirror.https://rubygems.org/"] = mirror_uri_with_auth.to_s }
+ before { Bundler.settings.set_local("mirror.https://rubygems.org/", mirror_uri_with_auth.to_s) }
specify "#uri returns the mirror URI with credentials" do
expect(remote(uri).uri).to eq(mirror_uri_with_auth)
@@ -131,8 +131,8 @@ RSpec.describe Bundler::Source::Rubygems::Remote do
let(:mirror_uri_no_auth) { URI("https://rubygems-mirror.org/") }
before do
- Bundler.settings["mirror.https://rubygems.org/"] = mirror_uri_no_auth.to_s
- Bundler.settings[mirror_uri_no_auth.to_s] = credentials
+ Bundler.settings.temporary("mirror.https://rubygems.org/" => mirror_uri_no_auth.to_s)
+ Bundler.settings.temporary(mirror_uri_no_auth.to_s => credentials)
end
specify "#uri returns the mirror URI with credentials" do