[ruby/rubygems] Bump up vendored uri to 1.0.4

https://github.com/ruby/rubygems/commit/bc77ec0bf2
This commit is contained in:
Hiroshi SHIBATA 2025-10-23 07:54:45 +09:00 committed by git
parent 36e7db00c9
commit 8b014b1bbf
6 changed files with 48 additions and 22 deletions

View File

@ -186,18 +186,18 @@ module Bundler::URI
if arg_check
self.scheme = scheme
self.userinfo = userinfo
self.hostname = host
self.port = port
self.userinfo = userinfo
self.path = path
self.query = query
self.opaque = opaque
self.fragment = fragment
else
self.set_scheme(scheme)
self.set_userinfo(userinfo)
self.set_host(host)
self.set_port(port)
self.set_userinfo(userinfo)
self.set_path(path)
self.query = query
self.set_opaque(opaque)
@ -511,7 +511,7 @@ module Bundler::URI
user, password = split_userinfo(user)
end
@user = user
@password = password if password
@password = password
[@user, @password]
end
@ -522,7 +522,7 @@ module Bundler::URI
# See also Bundler::URI::Generic.user=.
#
def set_user(v)
set_userinfo(v, @password)
set_userinfo(v, nil)
v
end
protected :set_user
@ -574,6 +574,12 @@ module Bundler::URI
@password
end
# Returns the authority info (array of user, password, host and
# port), if any is set. Or returns +nil+.
def authority
return @user, @password, @host, @port if @user || @password || @host || @port
end
# Returns the user component after Bundler::URI decoding.
def decoded_user
Bundler::URI.decode_uri_component(@user) if @user
@ -615,6 +621,13 @@ module Bundler::URI
end
protected :set_host
# Protected setter for the authority info (+user+, +password+, +host+
# and +port+). If +port+ is +nil+, +default_port+ will be set.
#
protected def set_authority(user, password, host, port = nil)
@user, @password, @host, @port = user, password, host, port || self.default_port
end
#
# == Args
#
@ -639,6 +652,7 @@ module Bundler::URI
def host=(v)
check_host(v)
set_host(v)
set_userinfo(nil)
v
end
@ -729,6 +743,7 @@ module Bundler::URI
def port=(v)
check_port(v)
set_port(v)
set_userinfo(nil)
port
end
@ -1121,7 +1136,7 @@ module Bundler::URI
base = self.dup
authority = rel.userinfo || rel.host || rel.port
authority = rel.authority
# RFC2396, Section 5.2, 2)
if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query
@ -1134,9 +1149,7 @@ module Bundler::URI
# RFC2396, Section 5.2, 4)
if authority
base.set_userinfo(rel.userinfo)
base.set_host(rel.host)
base.set_port(rel.port || base.default_port)
base.set_authority(*authority)
base.set_path(rel.path)
elsif base.path && rel.path
base.set_path(merge_path(base.path, rel.path))

View File

@ -1,6 +1,6 @@
module Bundler::URI
# :stopdoc:
VERSION_CODE = '010003'.freeze
VERSION_CODE = '010004'.freeze
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
# :startdoc:
end

View File

@ -186,18 +186,18 @@ module Gem::URI
if arg_check
self.scheme = scheme
self.userinfo = userinfo
self.hostname = host
self.port = port
self.userinfo = userinfo
self.path = path
self.query = query
self.opaque = opaque
self.fragment = fragment
else
self.set_scheme(scheme)
self.set_userinfo(userinfo)
self.set_host(host)
self.set_port(port)
self.set_userinfo(userinfo)
self.set_path(path)
self.query = query
self.set_opaque(opaque)
@ -511,7 +511,7 @@ module Gem::URI
user, password = split_userinfo(user)
end
@user = user
@password = password if password
@password = password
[@user, @password]
end
@ -522,7 +522,7 @@ module Gem::URI
# See also Gem::URI::Generic.user=.
#
def set_user(v)
set_userinfo(v, @password)
set_userinfo(v, nil)
v
end
protected :set_user
@ -574,6 +574,12 @@ module Gem::URI
@password
end
# Returns the authority info (array of user, password, host and
# port), if any is set. Or returns +nil+.
def authority
return @user, @password, @host, @port if @user || @password || @host || @port
end
# Returns the user component after Gem::URI decoding.
def decoded_user
Gem::URI.decode_uri_component(@user) if @user
@ -615,6 +621,13 @@ module Gem::URI
end
protected :set_host
# Protected setter for the authority info (+user+, +password+, +host+
# and +port+). If +port+ is +nil+, +default_port+ will be set.
#
protected def set_authority(user, password, host, port = nil)
@user, @password, @host, @port = user, password, host, port || self.default_port
end
#
# == Args
#
@ -639,6 +652,7 @@ module Gem::URI
def host=(v)
check_host(v)
set_host(v)
set_userinfo(nil)
v
end
@ -729,6 +743,7 @@ module Gem::URI
def port=(v)
check_port(v)
set_port(v)
set_userinfo(nil)
port
end
@ -1121,7 +1136,7 @@ module Gem::URI
base = self.dup
authority = rel.userinfo || rel.host || rel.port
authority = rel.authority
# RFC2396, Section 5.2, 2)
if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query
@ -1134,9 +1149,7 @@ module Gem::URI
# RFC2396, Section 5.2, 4)
if authority
base.set_userinfo(rel.userinfo)
base.set_host(rel.host)
base.set_port(rel.port || base.default_port)
base.set_authority(*authority)
base.set_path(rel.path)
elsif base.path && rel.path
base.set_path(merge_path(base.path, rel.path))

View File

@ -1,6 +1,6 @@
module Gem::URI
# :stopdoc:
VERSION_CODE = '010003'.freeze
VERSION_CODE = '010004'.freeze
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
# :startdoc:
end

View File

@ -14,4 +14,4 @@ gem "securerandom", "0.4.1"
gem "timeout", "0.4.3"
gem "thor", "1.4.0"
gem "tsort", "0.2.0"
gem "uri", "1.0.3"
gem "uri", "1.0.4"

View File

@ -40,7 +40,7 @@ GEM
thor (1.4.0)
timeout (0.4.3)
tsort (0.2.0)
uri (1.0.3)
uri (1.0.4)
PLATFORMS
java
@ -64,7 +64,7 @@ DEPENDENCIES
thor (= 1.4.0)
timeout (= 0.4.3)
tsort (= 0.2.0)
uri (= 1.0.3)
uri (= 1.0.4)
CHECKSUMS
connection_pool (2.4.1) sha256=0f40cf997091f1f04ff66da67eabd61a9fe0d4928b9a3645228532512fab62f4
@ -80,7 +80,7 @@ CHECKSUMS
thor (1.4.0) sha256=8763e822ccb0f1d7bee88cde131b19a65606657b847cc7b7b4b82e772bcd8a3d
timeout (0.4.3) sha256=9509f079b2b55fe4236d79633bd75e34c1c1e7e3fb4b56cb5fda61f80a0fe30e
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
uri (1.0.3) sha256=e9f2244608eea2f7bc357d954c65c910ce0399ca5e18a7a29207ac22d8767011
uri (1.0.4) sha256=34485d137c079f8753a0ca1d883841a7ba2e5fae556e3c30c2aab0dde616344b
BUNDLED WITH
4.0.0.dev