summaryrefslogtreecommitdiff
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-01-15 20:51:35 +0100
committerHiroshi SHIBATA <[email protected]>2024-01-29 12:15:10 +0900
commitf3123f8af2c79d3e40719865fc3700277fe1ae72 ()
tree121a8540d2155879504bad535afc1c415740d022 /lib/bundler/source
parentd64d0b54231208c7bec899a7fe8c3b98ec2e9a1b (diff)
[rubygems/rubygems] Use rubygems vendored uri from Bundler when available
https://.com/rubygems/rubygems/commit/5d6a8f2fb4
-rw-r--r--lib/bundler/source/git.rb2
-rw-r--r--lib/bundler/source/git/git_proxy.rb2
-rw-r--r--lib/bundler/source/rubygems.rb4
-rw-r--r--lib/bundler/source/rubygems/remote.rb2
4 files changed, 5 insertions, 5 deletions
@@ -326,7 +326,7 @@ module Bundler
if %r{^\w+://(\w+@)?}.match?(uri)
# Downcase the domain component of the URI
# and strip off a trailing slash, if one is present
- input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "")
else
# If there is no URI scheme, assume it is an ssh/git URI
input = uri
@@ -320,7 +320,7 @@ module Bundler
# Adds credentials to the URI
def configured_uri
if /https?:/.match?(uri)
- remote = Bundler::URI(uri)
config_auth = Bundler.settings[remote.to_s] || Bundler.settings[remote.host]
remote.userinfo ||= config_auth
remote.to_s
@@ -349,9 +349,9 @@ module Bundler
def normalize_uri(uri)
uri = URINormalizer.normalize_suffix(uri.to_s)
require_relative "../vendored_uri"
- uri = Bundler::URI(uri)
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
- "source 'https://rubygems.org'" if !uri.absolute? || (uri.is_a?(Bundler::URI::HTTP) && uri.host.nil?)
uri
end
@@ -48,7 +48,7 @@ module Bundler
end
uri
- rescue Bundler::URI::InvalidComponentError
error_message = "Please CGI escape your usernames and passwords before " \
"setting them for authentication."
raise HTTPError.new(error_message)