Vendor uri gem in RubyGems

This commit is contained in:
David Rodríguez 2024-01-15 20:51:02 +01:00 committed by Hiroshi SHIBATA
parent 6bbbfb4629
commit d64d0b5423
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
59 changed files with 4673 additions and 180 deletions

View file

@ -59,7 +59,7 @@ class Gem::Commands::SourcesCommand < Gem::Command
say "#{source_uri} added to sources"
end
rescue URI::Error, ArgumentError
rescue Gem::URI::Error, ArgumentError
say "#{source_uri} is not a URI"
terminate_interaction 1
rescue Gem::RemoteFetcher::FetchError => e
@ -81,7 +81,7 @@ Do you want to add this source?
end
def check_rubygems_https(source_uri) # :nodoc:
uri = URI source_uri
uri = Gem::URI source_uri
if uri.scheme && uri.scheme.casecmp("http").zero? &&
uri.host.casecmp("rubygems.org").zero?