Bump vendored uri to 1.0.2

This commit is contained in:
David Rodríguez 2024-12-11 19:25:45 +01:00 committed by Hiroshi SHIBATA
parent 57f222c182
commit 71bebcf658
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
9 changed files with 27 additions and 23 deletions

View File

@ -31,15 +31,10 @@ module Bundler::URI
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
end
Parser.new.regexp.each_pair do |sym, str|
remove_const(sym) if const_defined?(sym)
remove_const(sym) if const_defined?(sym, false)
const_set(sym, str)
end
end

View File

@ -536,4 +536,11 @@ module Bundler::URI
end
end # class Parser
# Backward compatibility for Bundler::URI::REGEXP::PATTERN::*
RFC2396_Parser.new.pattern.each_pair do |sym, str|
unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
RFC2396_REGEXP::PATTERN.const_set(sym, str)
end
end
end # module Bundler::URI

View File

@ -142,25 +142,25 @@ module Bundler::URI
# 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
warn "Bundler::URI::RFC3986_PARSER.extract is obsolete. 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
warn "Bundler::URI::RFC3986_PARSER.make_regexp is obsolete. 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
warn "Bundler::URI::RFC3986_PARSER.escape is obsolete. 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
warn "Bundler::URI::RFC3986_PARSER.unescape is obsolete. Use Bundler::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
end

View File

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

View File

@ -31,15 +31,10 @@ module Gem::URI
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
end
Parser.new.regexp.each_pair do |sym, str|
remove_const(sym) if const_defined?(sym)
remove_const(sym) if const_defined?(sym, false)
const_set(sym, str)
end
end

View File

@ -536,4 +536,11 @@ module Gem::URI
end
end # class Parser
# Backward compatibility for Gem::URI::REGEXP::PATTERN::*
RFC2396_Parser.new.pattern.each_pair do |sym, str|
unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
RFC2396_REGEXP::PATTERN.const_set(sym, str)
end
end
end # module Gem::URI

View File

@ -142,25 +142,25 @@ module Gem::URI
# 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
warn "Gem::URI::RFC3986_PARSER.extract is obsolete. 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
warn "Gem::URI::RFC3986_PARSER.make_regexp is obsolete. 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
warn "Gem::URI::RFC3986_PARSER.escape is obsolete. 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
warn "Gem::URI::RFC3986_PARSER.unescape is obsolete. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
end

View File

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

View File

@ -14,4 +14,4 @@ gem "securerandom", "0.4.0"
gem "timeout", "0.4.2"
gem "thor", "1.3.2"
gem "tsort", "0.2.0"
gem "uri", "1.0.1"
gem "uri", "1.0.2"