mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[ruby/rubygems] Bump up vendored uri to 1.0.4
https://github.com/ruby/rubygems/commit/bc77ec0bf2
This commit is contained in:
parent
3afa38d0ee
commit
7fa4d58ef2
29
lib/bundler/vendor/uri/lib/uri/generic.rb
vendored
29
lib/bundler/vendor/uri/lib/uri/generic.rb
vendored
@ -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))
|
||||
|
||||
2
lib/bundler/vendor/uri/lib/uri/version.rb
vendored
2
lib/bundler/vendor/uri/lib/uri/version.rb
vendored
@ -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
|
||||
|
||||
29
lib/rubygems/vendor/uri/lib/uri/generic.rb
vendored
29
lib/rubygems/vendor/uri/lib/uri/generic.rb
vendored
@ -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))
|
||||
|
||||
2
lib/rubygems/vendor/uri/lib/uri/version.rb
vendored
2
lib/rubygems/vendor/uri/lib/uri/version.rb
vendored
@ -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
|
||||
|
||||
@ -14,4 +14,4 @@ gem "securerandom", "0.4.1"
|
||||
gem "timeout", "0.4.3"
|
||||
gem "thor", "1.3.2"
|
||||
gem "tsort", "0.2.0"
|
||||
gem "uri", "1.0.2"
|
||||
gem "uri", "1.0.4"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user