diff options
author | David RodrÃguez <[email protected]> | 2021-08-24 12:02:29 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-08-31 19:06:14 +0900 |
commit | 1e290c31f4fdfd330b9cd1d5c7fe61efa4ab066c (patch) | |
tree | 0d3e58f3df45c7ab430375fe27550db6f6df6a65 /lib/rubygems/commands/install_command.rb | |
parent | f0c6cc14b10616a61d3113dd5a88291fe915461b (diff) |
[rubygems/rubygems] Merge `Gem::UriParser` and `Gem::PrintableUri` into a `Gem::Uri` class
The new class is a wrapper on top of an URI. And then, when you want
credentials redacted, you call `#redacted` that returns a copy of itself,
but with credentials redacted.
https://github.com/rubygems/rubygems/commit/9581c2740a
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib/rubygems/commands/install_command.rb')
-rw-r--r-- | lib/rubygems/commands/install_command.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb index ee50cba472..adf2cdba84 100644 --- a/lib/rubygems/commands/install_command.rb +++ b/lib/rubygems/commands/install_command.rb @@ -5,7 +5,6 @@ require_relative '../dependency_installer' require_relative '../local_remote_options' require_relative '../validator' require_relative '../version_option' -require_relative '../printable_uri' ## # Gem installer command line tool @@ -261,8 +260,8 @@ You can use `i` command instead of `install`. errors.each do |x| return unless Gem::SourceFetchProblem === x - printable_uri = Gem::PrintableUri.parse_uri(x.source.uri.clone) - msg = "Unable to pull data from '#{printable_uri}': #{x.error.message}" + require_relative "../uri" + msg = "Unable to pull data from '#{Gem::Uri.new(x.source.uri).redacted}': #{x.error.message}" alert_warning msg end |