Bump vendored uri to 1.0.1
This commit is contained in:
parent
1b137a94a4
commit
bb6a3edadf
18
lib/bundler/vendor/uri/lib/uri.rb
vendored
18
lib/bundler/vendor/uri/lib/uri.rb
vendored
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: false
|
||||
# Bundler::URI is a module providing classes to handle Uniform Resource Identifiers
|
||||
# (RFC2396[http://tools.ietf.org/html/rfc2396]).
|
||||
# (RFC2396[https://www.rfc-editor.org/rfc/rfc2396]).
|
||||
#
|
||||
# == Features
|
||||
#
|
||||
@ -47,14 +47,14 @@
|
||||
# A good place to view an RFC spec is http://www.ietf.org/rfc.html.
|
||||
#
|
||||
# Here is a list of all related RFC's:
|
||||
# - RFC822[http://tools.ietf.org/html/rfc822]
|
||||
# - RFC1738[http://tools.ietf.org/html/rfc1738]
|
||||
# - RFC2255[http://tools.ietf.org/html/rfc2255]
|
||||
# - RFC2368[http://tools.ietf.org/html/rfc2368]
|
||||
# - RFC2373[http://tools.ietf.org/html/rfc2373]
|
||||
# - RFC2396[http://tools.ietf.org/html/rfc2396]
|
||||
# - RFC2732[http://tools.ietf.org/html/rfc2732]
|
||||
# - RFC3986[http://tools.ietf.org/html/rfc3986]
|
||||
# - RFC822[https://www.rfc-editor.org/rfc/rfc822]
|
||||
# - RFC1738[https://www.rfc-editor.org/rfc/rfc1738]
|
||||
# - RFC2255[https://www.rfc-editor.org/rfc/rfc2255]
|
||||
# - RFC2368[https://www.rfc-editor.org/rfc/rfc2368]
|
||||
# - RFC2373[https://www.rfc-editor.org/rfc/rfc2373]
|
||||
# - RFC2396[https://www.rfc-editor.org/rfc/rfc2396]
|
||||
# - RFC2732[https://www.rfc-editor.org/rfc/rfc2732]
|
||||
# - RFC3986[https://www.rfc-editor.org/rfc/rfc3986]
|
||||
#
|
||||
# == Class tree
|
||||
#
|
||||
|
54
lib/bundler/vendor/uri/lib/uri/common.rb
vendored
54
lib/bundler/vendor/uri/lib/uri/common.rb
vendored
@ -13,26 +13,52 @@ require_relative "rfc2396_parser"
|
||||
require_relative "rfc3986_parser"
|
||||
|
||||
module Bundler::URI
|
||||
include RFC2396_REGEXP
|
||||
|
||||
REGEXP = RFC2396_REGEXP
|
||||
Parser = RFC2396_Parser
|
||||
RFC3986_PARSER = RFC3986_Parser.new
|
||||
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
||||
RFC2396_PARSER = RFC2396_Parser.new
|
||||
Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
|
||||
|
||||
# Bundler::URI::Parser.new
|
||||
DEFAULT_PARSER = Parser.new
|
||||
DEFAULT_PARSER.pattern.each_pair do |sym, str|
|
||||
RFC3986_PARSER = RFC3986_Parser.new
|
||||
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
||||
|
||||
DEFAULT_PARSER = RFC3986_PARSER
|
||||
Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
|
||||
|
||||
def self.parser=(parser = RFC3986_PARSER)
|
||||
remove_const(:Parser) if defined?(::Bundler::URI::Parser)
|
||||
const_set("Parser", parser.class)
|
||||
|
||||
remove_const(:REGEXP) if defined?(::Bundler::URI::REGEXP)
|
||||
remove_const(:PATTERN) if defined?(::Bundler::URI::PATTERN)
|
||||
if Parser == RFC2396_Parser
|
||||
const_set("REGEXP", Bundler::URI::RFC2396_REGEXP)
|
||||
const_set("PATTERN", Bundler::URI::RFC2396_REGEXP::PATTERN)
|
||||
Parser.new.pattern.each_pair do |sym, str|
|
||||
unless REGEXP::PATTERN.const_defined?(sym)
|
||||
REGEXP::PATTERN.const_set(sym, str)
|
||||
end
|
||||
end
|
||||
DEFAULT_PARSER.regexp.each_pair do |sym, str|
|
||||
end
|
||||
|
||||
Parser.new.regexp.each_pair do |sym, str|
|
||||
remove_const(sym) if const_defined?(sym)
|
||||
const_set(sym, str)
|
||||
end
|
||||
Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
|
||||
end
|
||||
self.parser = RFC3986_PARSER
|
||||
|
||||
def self.const_missing(const)
|
||||
if const == :REGEXP
|
||||
warn "Bundler::URI::REGEXP is obsolete. Use Bundler::URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
|
||||
Bundler::URI::RFC2396_REGEXP
|
||||
elsif value = RFC2396_PARSER.regexp[const]
|
||||
warn "Bundler::URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
|
||||
value
|
||||
elsif value = RFC2396_Parser.const_get(const)
|
||||
warn "Bundler::URI::#{const} is obsolete. Use RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
|
||||
value
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
module Util # :nodoc:
|
||||
def make_components_hash(klass, array_hash)
|
||||
@ -170,7 +196,7 @@ module Bundler::URI
|
||||
# ["fragment", "top"]]
|
||||
#
|
||||
def self.split(uri)
|
||||
RFC3986_PARSER.split(uri)
|
||||
DEFAULT_PARSER.split(uri)
|
||||
end
|
||||
|
||||
# Returns a new \Bundler::URI object constructed from the given string +uri+:
|
||||
@ -184,7 +210,7 @@ module Bundler::URI
|
||||
# if it may contain invalid Bundler::URI characters.
|
||||
#
|
||||
def self.parse(uri)
|
||||
RFC3986_PARSER.parse(uri)
|
||||
DEFAULT_PARSER.parse(uri)
|
||||
end
|
||||
|
||||
# Merges the given Bundler::URI strings +str+
|
||||
@ -211,7 +237,7 @@ module Bundler::URI
|
||||
# # => #<Bundler::URI::HTTP http://example.com/foo/bar>
|
||||
#
|
||||
def self.join(*str)
|
||||
RFC3986_PARSER.join(*str)
|
||||
DEFAULT_PARSER.join(*str)
|
||||
end
|
||||
|
||||
#
|
||||
|
2
lib/bundler/vendor/uri/lib/uri/ftp.rb
vendored
2
lib/bundler/vendor/uri/lib/uri/ftp.rb
vendored
@ -17,7 +17,7 @@ module Bundler::URI
|
||||
# This class will be redesigned because of difference of implementations;
|
||||
# the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it
|
||||
# is a good summary about the de facto spec.
|
||||
# http://tools.ietf.org/html/draft-hoffman-ftp-uri-04
|
||||
# https://datatracker.ietf.org/doc/html/draft-hoffman-ftp-uri-04
|
||||
#
|
||||
class FTP < Generic
|
||||
# A Default port of 21 for Bundler::URI::FTP.
|
||||
|
22
lib/bundler/vendor/uri/lib/uri/generic.rb
vendored
22
lib/bundler/vendor/uri/lib/uri/generic.rb
vendored
@ -82,7 +82,7 @@ module Bundler::URI
|
||||
if args.kind_of?(Array)
|
||||
return self.build(args.collect{|x|
|
||||
if x.is_a?(String)
|
||||
DEFAULT_PARSER.escape(x)
|
||||
Bundler::URI::RFC2396_PARSER.escape(x)
|
||||
else
|
||||
x
|
||||
end
|
||||
@ -91,7 +91,7 @@ module Bundler::URI
|
||||
tmp = {}
|
||||
args.each do |key, value|
|
||||
tmp[key] = if value
|
||||
DEFAULT_PARSER.escape(value)
|
||||
Bundler::URI::RFC2396_PARSER.escape(value)
|
||||
else
|
||||
value
|
||||
end
|
||||
@ -945,7 +945,7 @@ module Bundler::URI
|
||||
# == Description
|
||||
#
|
||||
# Bundler::URI has components listed in order of decreasing significance from left to right,
|
||||
# see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3.
|
||||
# see RFC3986 https://www.rfc-editor.org/rfc/rfc3986 1.2.3.
|
||||
#
|
||||
# == Usage
|
||||
#
|
||||
@ -1364,6 +1364,9 @@ module Bundler::URI
|
||||
str << ':'
|
||||
str << @port.to_s
|
||||
end
|
||||
if (@host || @port) && !@path.empty? && !@path.start_with?('/')
|
||||
str << '/'
|
||||
end
|
||||
str << @path
|
||||
if @query
|
||||
str << '?'
|
||||
@ -1399,19 +1402,6 @@ module Bundler::URI
|
||||
self.component_ary.eql?(oth.component_ary)
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
--- Bundler::URI::Generic#===(oth)
|
||||
|
||||
=end
|
||||
# def ===(oth)
|
||||
# raise NotImplementedError
|
||||
# end
|
||||
|
||||
=begin
|
||||
=end
|
||||
|
||||
|
||||
# Returns an Array of the components defined from the COMPONENT Array.
|
||||
def component_ary
|
||||
component.collect do |x|
|
||||
|
4
lib/bundler/vendor/uri/lib/uri/http.rb
vendored
4
lib/bundler/vendor/uri/lib/uri/http.rb
vendored
@ -85,7 +85,7 @@ module Bundler::URI
|
||||
# == Description
|
||||
#
|
||||
# Returns the authority for an HTTP uri, as defined in
|
||||
# https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.
|
||||
# https://www.rfc-editor.org/rfc/rfc3986#section-3.2.
|
||||
#
|
||||
#
|
||||
# Example:
|
||||
@ -106,7 +106,7 @@ module Bundler::URI
|
||||
# == Description
|
||||
#
|
||||
# Returns the origin for an HTTP uri, as defined in
|
||||
# https://datatracker.ietf.org/doc/html/rfc6454.
|
||||
# https://www.rfc-editor.org/rfc/rfc6454.
|
||||
#
|
||||
#
|
||||
# Example:
|
||||
|
25
lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
vendored
25
lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
vendored
@ -135,12 +135,35 @@ module Bundler::URI
|
||||
Bundler::URI.for(*self.split(uri), self)
|
||||
end
|
||||
|
||||
|
||||
def join(*uris) # :nodoc:
|
||||
uris[0] = convert_to_uri(uris[0])
|
||||
uris.inject :merge
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def extract(str, schemes = nil, &block) # :nodoc:
|
||||
warn "Bundler::URI::RFC3986_PARSER.extract is obsoleted. Use Bundler::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
|
||||
RFC2396_PARSER.extract(str, schemes, &block)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def make_regexp(schemes = nil) # :nodoc:
|
||||
warn "Bundler::URI::RFC3986_PARSER.make_regexp is obsoleted. Use Bundler::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
|
||||
RFC2396_PARSER.make_regexp(schemes)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def escape(str, unsafe = nil) # :nodoc:
|
||||
warn "Bundler::URI::RFC3986_PARSER.escape is obsoleted. Use Bundler::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
|
||||
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def unescape(str, escaped = nil) # :nodoc:
|
||||
warn "Bundler::URI::RFC3986_PARSER.unescape is obsoleted. Use Bundler::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
|
||||
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
|
||||
end
|
||||
|
||||
@@to_s = Kernel.instance_method(:to_s)
|
||||
if @@to_s.respond_to?(:bind_call)
|
||||
def inspect
|
||||
|
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 = '001301'.freeze
|
||||
VERSION_CODE = '010001'.freeze
|
||||
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
|
||||
# :startdoc:
|
||||
end
|
||||
|
18
lib/rubygems/vendor/uri/lib/uri.rb
vendored
18
lib/rubygems/vendor/uri/lib/uri.rb
vendored
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: false
|
||||
# Gem::URI is a module providing classes to handle Uniform Resource Identifiers
|
||||
# (RFC2396[http://tools.ietf.org/html/rfc2396]).
|
||||
# (RFC2396[https://www.rfc-editor.org/rfc/rfc2396]).
|
||||
#
|
||||
# == Features
|
||||
#
|
||||
@ -47,14 +47,14 @@
|
||||
# A good place to view an RFC spec is http://www.ietf.org/rfc.html.
|
||||
#
|
||||
# Here is a list of all related RFC's:
|
||||
# - RFC822[http://tools.ietf.org/html/rfc822]
|
||||
# - RFC1738[http://tools.ietf.org/html/rfc1738]
|
||||
# - RFC2255[http://tools.ietf.org/html/rfc2255]
|
||||
# - RFC2368[http://tools.ietf.org/html/rfc2368]
|
||||
# - RFC2373[http://tools.ietf.org/html/rfc2373]
|
||||
# - RFC2396[http://tools.ietf.org/html/rfc2396]
|
||||
# - RFC2732[http://tools.ietf.org/html/rfc2732]
|
||||
# - RFC3986[http://tools.ietf.org/html/rfc3986]
|
||||
# - RFC822[https://www.rfc-editor.org/rfc/rfc822]
|
||||
# - RFC1738[https://www.rfc-editor.org/rfc/rfc1738]
|
||||
# - RFC2255[https://www.rfc-editor.org/rfc/rfc2255]
|
||||
# - RFC2368[https://www.rfc-editor.org/rfc/rfc2368]
|
||||
# - RFC2373[https://www.rfc-editor.org/rfc/rfc2373]
|
||||
# - RFC2396[https://www.rfc-editor.org/rfc/rfc2396]
|
||||
# - RFC2732[https://www.rfc-editor.org/rfc/rfc2732]
|
||||
# - RFC3986[https://www.rfc-editor.org/rfc/rfc3986]
|
||||
#
|
||||
# == Class tree
|
||||
#
|
||||
|
54
lib/rubygems/vendor/uri/lib/uri/common.rb
vendored
54
lib/rubygems/vendor/uri/lib/uri/common.rb
vendored
@ -13,26 +13,52 @@ require_relative "rfc2396_parser"
|
||||
require_relative "rfc3986_parser"
|
||||
|
||||
module Gem::URI
|
||||
include RFC2396_REGEXP
|
||||
|
||||
REGEXP = RFC2396_REGEXP
|
||||
Parser = RFC2396_Parser
|
||||
RFC3986_PARSER = RFC3986_Parser.new
|
||||
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
||||
RFC2396_PARSER = RFC2396_Parser.new
|
||||
Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
|
||||
|
||||
# Gem::URI::Parser.new
|
||||
DEFAULT_PARSER = Parser.new
|
||||
DEFAULT_PARSER.pattern.each_pair do |sym, str|
|
||||
RFC3986_PARSER = RFC3986_Parser.new
|
||||
Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
|
||||
|
||||
DEFAULT_PARSER = RFC3986_PARSER
|
||||
Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
|
||||
|
||||
def self.parser=(parser = RFC3986_PARSER)
|
||||
remove_const(:Parser) if defined?(::Gem::URI::Parser)
|
||||
const_set("Parser", parser.class)
|
||||
|
||||
remove_const(:REGEXP) if defined?(::Gem::URI::REGEXP)
|
||||
remove_const(:PATTERN) if defined?(::Gem::URI::PATTERN)
|
||||
if Parser == RFC2396_Parser
|
||||
const_set("REGEXP", Gem::URI::RFC2396_REGEXP)
|
||||
const_set("PATTERN", Gem::URI::RFC2396_REGEXP::PATTERN)
|
||||
Parser.new.pattern.each_pair do |sym, str|
|
||||
unless REGEXP::PATTERN.const_defined?(sym)
|
||||
REGEXP::PATTERN.const_set(sym, str)
|
||||
end
|
||||
end
|
||||
DEFAULT_PARSER.regexp.each_pair do |sym, str|
|
||||
end
|
||||
|
||||
Parser.new.regexp.each_pair do |sym, str|
|
||||
remove_const(sym) if const_defined?(sym)
|
||||
const_set(sym, str)
|
||||
end
|
||||
Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
|
||||
end
|
||||
self.parser = RFC3986_PARSER
|
||||
|
||||
def self.const_missing(const)
|
||||
if const == :REGEXP
|
||||
warn "Gem::URI::REGEXP is obsolete. Use Gem::URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
|
||||
Gem::URI::RFC2396_REGEXP
|
||||
elsif value = RFC2396_PARSER.regexp[const]
|
||||
warn "Gem::URI::#{const} is obsolete. Use RFC2396_PARSER.regexp[#{const.inspect}] explicitly.", uplevel: 1 if $VERBOSE
|
||||
value
|
||||
elsif value = RFC2396_Parser.const_get(const)
|
||||
warn "Gem::URI::#{const} is obsolete. Use RFC2396_Parser::#{const} explicitly.", uplevel: 1 if $VERBOSE
|
||||
value
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
module Util # :nodoc:
|
||||
def make_components_hash(klass, array_hash)
|
||||
@ -170,7 +196,7 @@ module Gem::URI
|
||||
# ["fragment", "top"]]
|
||||
#
|
||||
def self.split(uri)
|
||||
RFC3986_PARSER.split(uri)
|
||||
DEFAULT_PARSER.split(uri)
|
||||
end
|
||||
|
||||
# Returns a new \Gem::URI object constructed from the given string +uri+:
|
||||
@ -184,7 +210,7 @@ module Gem::URI
|
||||
# if it may contain invalid Gem::URI characters.
|
||||
#
|
||||
def self.parse(uri)
|
||||
RFC3986_PARSER.parse(uri)
|
||||
DEFAULT_PARSER.parse(uri)
|
||||
end
|
||||
|
||||
# Merges the given Gem::URI strings +str+
|
||||
@ -211,7 +237,7 @@ module Gem::URI
|
||||
# # => #<Gem::URI::HTTP http://example.com/foo/bar>
|
||||
#
|
||||
def self.join(*str)
|
||||
RFC3986_PARSER.join(*str)
|
||||
DEFAULT_PARSER.join(*str)
|
||||
end
|
||||
|
||||
#
|
||||
|
2
lib/rubygems/vendor/uri/lib/uri/ftp.rb
vendored
2
lib/rubygems/vendor/uri/lib/uri/ftp.rb
vendored
@ -17,7 +17,7 @@ module Gem::URI
|
||||
# This class will be redesigned because of difference of implementations;
|
||||
# the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it
|
||||
# is a good summary about the de facto spec.
|
||||
# http://tools.ietf.org/html/draft-hoffman-ftp-uri-04
|
||||
# https://datatracker.ietf.org/doc/html/draft-hoffman-ftp-uri-04
|
||||
#
|
||||
class FTP < Generic
|
||||
# A Default port of 21 for Gem::URI::FTP.
|
||||
|
22
lib/rubygems/vendor/uri/lib/uri/generic.rb
vendored
22
lib/rubygems/vendor/uri/lib/uri/generic.rb
vendored
@ -82,7 +82,7 @@ module Gem::URI
|
||||
if args.kind_of?(Array)
|
||||
return self.build(args.collect{|x|
|
||||
if x.is_a?(String)
|
||||
DEFAULT_PARSER.escape(x)
|
||||
Gem::URI::RFC2396_PARSER.escape(x)
|
||||
else
|
||||
x
|
||||
end
|
||||
@ -91,7 +91,7 @@ module Gem::URI
|
||||
tmp = {}
|
||||
args.each do |key, value|
|
||||
tmp[key] = if value
|
||||
DEFAULT_PARSER.escape(value)
|
||||
Gem::URI::RFC2396_PARSER.escape(value)
|
||||
else
|
||||
value
|
||||
end
|
||||
@ -945,7 +945,7 @@ module Gem::URI
|
||||
# == Description
|
||||
#
|
||||
# Gem::URI has components listed in order of decreasing significance from left to right,
|
||||
# see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3.
|
||||
# see RFC3986 https://www.rfc-editor.org/rfc/rfc3986 1.2.3.
|
||||
#
|
||||
# == Usage
|
||||
#
|
||||
@ -1364,6 +1364,9 @@ module Gem::URI
|
||||
str << ':'
|
||||
str << @port.to_s
|
||||
end
|
||||
if (@host || @port) && !@path.empty? && !@path.start_with?('/')
|
||||
str << '/'
|
||||
end
|
||||
str << @path
|
||||
if @query
|
||||
str << '?'
|
||||
@ -1399,19 +1402,6 @@ module Gem::URI
|
||||
self.component_ary.eql?(oth.component_ary)
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
--- Gem::URI::Generic#===(oth)
|
||||
|
||||
=end
|
||||
# def ===(oth)
|
||||
# raise NotImplementedError
|
||||
# end
|
||||
|
||||
=begin
|
||||
=end
|
||||
|
||||
|
||||
# Returns an Array of the components defined from the COMPONENT Array.
|
||||
def component_ary
|
||||
component.collect do |x|
|
||||
|
4
lib/rubygems/vendor/uri/lib/uri/http.rb
vendored
4
lib/rubygems/vendor/uri/lib/uri/http.rb
vendored
@ -85,7 +85,7 @@ module Gem::URI
|
||||
# == Description
|
||||
#
|
||||
# Returns the authority for an HTTP uri, as defined in
|
||||
# https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.
|
||||
# https://www.rfc-editor.org/rfc/rfc3986#section-3.2.
|
||||
#
|
||||
#
|
||||
# Example:
|
||||
@ -106,7 +106,7 @@ module Gem::URI
|
||||
# == Description
|
||||
#
|
||||
# Returns the origin for an HTTP uri, as defined in
|
||||
# https://datatracker.ietf.org/doc/html/rfc6454.
|
||||
# https://www.rfc-editor.org/rfc/rfc6454.
|
||||
#
|
||||
#
|
||||
# Example:
|
||||
|
@ -135,12 +135,35 @@ module Gem::URI
|
||||
Gem::URI.for(*self.split(uri), self)
|
||||
end
|
||||
|
||||
|
||||
def join(*uris) # :nodoc:
|
||||
uris[0] = convert_to_uri(uris[0])
|
||||
uris.inject :merge
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def extract(str, schemes = nil, &block) # :nodoc:
|
||||
warn "Gem::URI::RFC3986_PARSER.extract is obsoleted. Use Gem::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
|
||||
RFC2396_PARSER.extract(str, schemes, &block)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def make_regexp(schemes = nil) # :nodoc:
|
||||
warn "Gem::URI::RFC3986_PARSER.make_regexp is obsoleted. Use Gem::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
|
||||
RFC2396_PARSER.make_regexp(schemes)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def escape(str, unsafe = nil) # :nodoc:
|
||||
warn "Gem::URI::RFC3986_PARSER.escape is obsoleted. Use Gem::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
|
||||
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
|
||||
end
|
||||
|
||||
# Compatibility for RFC2396 parser
|
||||
def unescape(str, escaped = nil) # :nodoc:
|
||||
warn "Gem::URI::RFC3986_PARSER.unescape is obsoleted. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
|
||||
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
|
||||
end
|
||||
|
||||
@@to_s = Kernel.instance_method(:to_s)
|
||||
if @@to_s.respond_to?(:bind_call)
|
||||
def inspect
|
||||
|
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 = '001301'.freeze
|
||||
VERSION_CODE = '010001'.freeze
|
||||
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
|
||||
# :startdoc:
|
||||
end
|
||||
|
@ -14,3 +14,4 @@ gem "securerandom", "0.3.1"
|
||||
gem "timeout", "0.4.1"
|
||||
gem "thor", "1.3.0"
|
||||
gem "tsort", "0.2.0"
|
||||
gem "uri", "1.0.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user