Skip to content

Commit 0a1f914

Browse files
Bump vendored uri to 1.0.2
1 parent 922db0a commit 0a1f914

File tree

10 files changed

+30
-26
lines changed

10 files changed

+30
-26
lines changed

bundler/lib/bundler/vendor/uri/lib/uri/common.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,10 @@ def self.parser=(parser = RFC3986_PARSER)
3131
if Parser == RFC2396_Parser
3232
const_set("REGEXP", Bundler::URI::RFC2396_REGEXP)
3333
const_set("PATTERN", Bundler::URI::RFC2396_REGEXP::PATTERN)
34-
Parser.new.pattern.each_pair do |sym, str|
35-
unless REGEXP::PATTERN.const_defined?(sym)
36-
REGEXP::PATTERN.const_set(sym, str)
37-
end
38-
end
3934
end
4035

4136
Parser.new.regexp.each_pair do |sym, str|
42-
remove_const(sym) if const_defined?(sym)
37+
remove_const(sym) if const_defined?(sym, false)
4338
const_set(sym, str)
4439
end
4540
end

bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,4 +536,11 @@ def convert_to_uri(uri)
536536
end
537537

538538
end # class Parser
539+
540+
# Backward compatibility for Bundler::URI::REGEXP::PATTERN::*
541+
RFC2396_Parser.new.pattern.each_pair do |sym, str|
542+
unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
543+
RFC2396_REGEXP::PATTERN.const_set(sym, str)
544+
end
545+
end
539546
end # module Bundler::URI

bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,25 +142,25 @@ def join(*uris) # :nodoc:
142142

143143
# Compatibility for RFC2396 parser
144144
def extract(str, schemes = nil, &block) # :nodoc:
145-
warn "Bundler::URI::RFC3986_PARSER.extract is obsoleted. Use Bundler::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
145+
warn "Bundler::URI::RFC3986_PARSER.extract is obsolete. Use Bundler::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
146146
RFC2396_PARSER.extract(str, schemes, &block)
147147
end
148148

149149
# Compatibility for RFC2396 parser
150150
def make_regexp(schemes = nil) # :nodoc:
151-
warn "Bundler::URI::RFC3986_PARSER.make_regexp is obsoleted. Use Bundler::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
151+
warn "Bundler::URI::RFC3986_PARSER.make_regexp is obsolete. Use Bundler::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
152152
RFC2396_PARSER.make_regexp(schemes)
153153
end
154154

155155
# Compatibility for RFC2396 parser
156156
def escape(str, unsafe = nil) # :nodoc:
157-
warn "Bundler::URI::RFC3986_PARSER.escape is obsoleted. Use Bundler::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
157+
warn "Bundler::URI::RFC3986_PARSER.escape is obsolete. Use Bundler::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
158158
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
159159
end
160160

161161
# Compatibility for RFC2396 parser
162162
def unescape(str, escaped = nil) # :nodoc:
163-
warn "Bundler::URI::RFC3986_PARSER.unescape is obsoleted. Use Bundler::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
163+
warn "Bundler::URI::RFC3986_PARSER.unescape is obsolete. Use Bundler::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
164164
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
165165
end
166166

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Bundler::URI
22
# :stopdoc:
3-
VERSION_CODE = '010001'.freeze
3+
VERSION_CODE = '010002'.freeze
44
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
55
# :startdoc:
66
end

lib/rubygems/vendor/uri/lib/uri/common.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,10 @@ def self.parser=(parser = RFC3986_PARSER)
3131
if Parser == RFC2396_Parser
3232
const_set("REGEXP", Gem::URI::RFC2396_REGEXP)
3333
const_set("PATTERN", Gem::URI::RFC2396_REGEXP::PATTERN)
34-
Parser.new.pattern.each_pair do |sym, str|
35-
unless REGEXP::PATTERN.const_defined?(sym)
36-
REGEXP::PATTERN.const_set(sym, str)
37-
end
38-
end
3934
end
4035

4136
Parser.new.regexp.each_pair do |sym, str|
42-
remove_const(sym) if const_defined?(sym)
37+
remove_const(sym) if const_defined?(sym, false)
4338
const_set(sym, str)
4439
end
4540
end

lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,4 +536,11 @@ def convert_to_uri(uri)
536536
end
537537

538538
end # class Parser
539+
540+
# Backward compatibility for Gem::URI::REGEXP::PATTERN::*
541+
RFC2396_Parser.new.pattern.each_pair do |sym, str|
542+
unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
543+
RFC2396_REGEXP::PATTERN.const_set(sym, str)
544+
end
545+
end
539546
end # module Gem::URI

lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,25 +142,25 @@ def join(*uris) # :nodoc:
142142

143143
# Compatibility for RFC2396 parser
144144
def extract(str, schemes = nil, &block) # :nodoc:
145-
warn "Gem::URI::RFC3986_PARSER.extract is obsoleted. Use Gem::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
145+
warn "Gem::URI::RFC3986_PARSER.extract is obsolete. Use Gem::URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
146146
RFC2396_PARSER.extract(str, schemes, &block)
147147
end
148148

149149
# Compatibility for RFC2396 parser
150150
def make_regexp(schemes = nil) # :nodoc:
151-
warn "Gem::URI::RFC3986_PARSER.make_regexp is obsoleted. Use Gem::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
151+
warn "Gem::URI::RFC3986_PARSER.make_regexp is obsolete. Use Gem::URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
152152
RFC2396_PARSER.make_regexp(schemes)
153153
end
154154

155155
# Compatibility for RFC2396 parser
156156
def escape(str, unsafe = nil) # :nodoc:
157-
warn "Gem::URI::RFC3986_PARSER.escape is obsoleted. Use Gem::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
157+
warn "Gem::URI::RFC3986_PARSER.escape is obsolete. Use Gem::URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
158158
unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
159159
end
160160

161161
# Compatibility for RFC2396 parser
162162
def unescape(str, escaped = nil) # :nodoc:
163-
warn "Gem::URI::RFC3986_PARSER.unescape is obsoleted. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
163+
warn "Gem::URI::RFC3986_PARSER.unescape is obsolete. Use Gem::URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
164164
escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
165165
end
166166

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Gem::URI
22
# :stopdoc:
3-
VERSION_CODE = '010001'.freeze
3+
VERSION_CODE = '010002'.freeze
44
VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
55
# :startdoc:
66
end

tool/bundler/vendor_gems.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
gem "timeout", "0.4.2"
1515
gem "thor", "1.3.2"
1616
gem "tsort", "0.2.0"
17-
gem "uri", "1.0.1"
17+
gem "uri", "1.0.2"

tool/bundler/vendor_gems.rb.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ GEM
2727
thor (1.3.2)
2828
timeout (0.4.2)
2929
tsort (0.2.0)
30-
uri (1.0.1)
30+
uri (1.0.2)
3131

3232
PLATFORMS
3333
java
@@ -50,7 +50,7 @@ DEPENDENCIES
5050
thor (= 1.3.2)
5151
timeout (= 0.4.2)
5252
tsort (= 0.2.0)
53-
uri (= 1.0.1)
53+
uri (= 1.0.2)
5454

5555
CHECKSUMS
5656
connection_pool (2.4.1) sha256=0f40cf997091f1f04ff66da67eabd61a9fe0d4928b9a3645228532512fab62f4
@@ -66,7 +66,7 @@ CHECKSUMS
6666
thor (1.3.2) sha256=eef0293b9e24158ccad7ab383ae83534b7ad4ed99c09f96f1a6b036550abbeda
6767
timeout (0.4.2) sha256=8aca2d5ff98eb2f7a501c03f8c3622065932cc58bc58f725cd50a09e63b4cc19
6868
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
69-
uri (1.0.1) sha256=3970958370c64d325f715e10fe7af77215d1a33a8a80cc7829e5309cf9c342f2
69+
uri (1.0.2) sha256=b303504ceb7e5905771fa7fa14b649652fa949df18b5880d69cfb12494791e27
7070

7171
BUNDLED WITH
7272
2.6.0.dev

0 commit comments

Comments
 (0)