summaryrefslogtreecommitdiff
path: root/spec/bundler/commands
diff options
context:
space:
mode:
authorMatt Larraz <mlarraz@users.noreply.github.com>2021-08-19 16:12:04 -0400
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit2aed061384f68b10d8a4a973009512cb57999c63 (patch)
treef1998566e5a0031a4f30e4884f76b6a2d243b687 /spec/bundler/commands
parentf212b9d4f2eb7f94359778d0ec5f3e38f2d90461 (diff)
[rubygems/rubygems] Correctly redact credentials when using x-oauth-basic
https://github.com/rubygems/rubygems/commit/290b6ab078
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r--spec/bundler/commands/config_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/bundler/commands/config_spec.rb b/spec/bundler/commands/config_spec.rb
index 48f0ceab78..2d0a7dc989 100644
--- a/spec/bundler/commands/config_spec.rb
+++ b/spec/bundler/commands/config_spec.rb
@@ -440,6 +440,14 @@ E
expect(out).to eq "gems.myserver.com=user:password\nspec_run=true"
end
+ it "list with API token credentials" do
+ bundle "config list", :env => { "BUNDLE_GEMS__MYSERVER__COM" => "api_token:x-oauth-basic" }
+ expect(out).to eq "Settings are listed in order of priority. The top value will be used.\ngems.myserver.com\nSet via BUNDLE_GEMS__MYSERVER__COM: \"[REDACTED]:x-oauth-basic\"\n\nspec_run\nSet via BUNDLE_SPEC_RUN: \"true\""
+
+ bundle "config list", :parseable => true, :env => { "BUNDLE_GEMS__MYSERVER__COM" => "api_token:x-oauth-basic" }
+ expect(out).to eq "gems.myserver.com=api_token:x-oauth-basic\nspec_run=true"
+ end
+
it "get" do
ENV["BUNDLE_BAR"] = "bar_val"