brew vendor-gems: commit updates.
This commit is contained in:
parent
783d30855b
commit
b281f51c25
@ -30,7 +30,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
|||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/zeitwerk-2.6.10/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/zeitwerk-2.6.10/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/activesupport-6.1.7.4/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/activesupport-6.1.7.4/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/public_suffix-5.0.3/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/public_suffix-5.0.3/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/addressable-2.8.4/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/addressable-2.8.5/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ast-2.4.2/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ast-2.4.2/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.4.15/lib")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.4.15/lib")
|
||||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-22/#{Gem.extension_api_version}/msgpack-1.7.2")
|
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/universal-darwin-22/#{Gem.extension_api_version}/msgpack-1.7.2")
|
||||||
|
|||||||
@ -344,17 +344,13 @@ module Addressable
|
|||||||
##
|
##
|
||||||
# Tables used to optimize encoding operations in `self.encode_component`
|
# Tables used to optimize encoding operations in `self.encode_component`
|
||||||
# and `self.normalize_component`
|
# and `self.normalize_component`
|
||||||
SEQUENCE_ENCODING_TABLE = Hash.new do |hash, sequence|
|
SEQUENCE_ENCODING_TABLE = (0..255).map do |byte|
|
||||||
hash[sequence] = sequence.unpack("C*").map do |c|
|
format("%02x", byte).freeze
|
||||||
format("%02x", c)
|
end.freeze
|
||||||
end.join
|
|
||||||
end
|
|
||||||
|
|
||||||
SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = Hash.new do |hash, sequence|
|
SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = (0..255).map do |byte|
|
||||||
hash[sequence] = sequence.unpack("C*").map do |c|
|
format("%%%02X", byte).freeze
|
||||||
format("%%%02X", c)
|
end.freeze
|
||||||
end.join
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Percent encodes a URI component.
|
# Percent encodes a URI component.
|
||||||
@ -421,16 +417,17 @@ module Addressable
|
|||||||
component = component.dup
|
component = component.dup
|
||||||
component.force_encoding(Encoding::ASCII_8BIT)
|
component.force_encoding(Encoding::ASCII_8BIT)
|
||||||
# Avoiding gsub! because there are edge cases with frozen strings
|
# Avoiding gsub! because there are edge cases with frozen strings
|
||||||
component = component.gsub(character_class) do |sequence|
|
component = component.gsub(character_class) do |char|
|
||||||
SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE[sequence]
|
SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE[char.ord]
|
||||||
end
|
end
|
||||||
if upcase_encoded.length > 0
|
if upcase_encoded.length > 0
|
||||||
upcase_encoded_chars = upcase_encoded.chars.map do |char|
|
upcase_encoded_chars = upcase_encoded.bytes.map do |byte|
|
||||||
SEQUENCE_ENCODING_TABLE[char]
|
SEQUENCE_ENCODING_TABLE[byte]
|
||||||
end
|
end
|
||||||
component = component.gsub(/%(#{upcase_encoded_chars.join('|')})/,
|
component = component.gsub(/%(#{upcase_encoded_chars.join('|')})/,
|
||||||
&:upcase)
|
&:upcase)
|
||||||
end
|
end
|
||||||
|
|
||||||
return component
|
return component
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -560,10 +557,9 @@ module Addressable
|
|||||||
leave_re = if leave_encoded.length > 0
|
leave_re = if leave_encoded.length > 0
|
||||||
character_class = "#{character_class}%" unless character_class.include?('%')
|
character_class = "#{character_class}%" unless character_class.include?('%')
|
||||||
|
|
||||||
"|%(?!#{leave_encoded.chars.flat_map do |char|
|
bytes = leave_encoded.bytes
|
||||||
seq = SEQUENCE_ENCODING_TABLE[char]
|
leave_encoded_pattern = bytes.map { |b| SEQUENCE_ENCODING_TABLE[b] }.join('|')
|
||||||
[seq.upcase, seq.downcase]
|
"|%(?!#{leave_encoded_pattern}|#{leave_encoded_pattern.upcase})"
|
||||||
end.join('|')})"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
character_class = if leave_re
|
character_class = if leave_re
|
||||||
@ -2396,6 +2392,25 @@ module Addressable
|
|||||||
@validation_deferred = false
|
@validation_deferred = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def encode_with(coder)
|
||||||
|
instance_variables.each do |ivar|
|
||||||
|
value = instance_variable_get(ivar)
|
||||||
|
if value != NONE
|
||||||
|
key = ivar.to_s.slice(1..-1)
|
||||||
|
coder[key] = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
|
def init_with(coder)
|
||||||
|
reset_ivs
|
||||||
|
coder.map.each do |key, value|
|
||||||
|
instance_variable_set("@#{key}", value)
|
||||||
|
end
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
SELF_REF = '.'
|
SELF_REF = '.'
|
||||||
PARENT = '..'
|
PARENT = '..'
|
||||||
@ -2569,7 +2584,7 @@ module Addressable
|
|||||||
@query = nil
|
@query = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
NONE = Object.new.freeze
|
NONE = Module.new.freeze
|
||||||
|
|
||||||
private_constant :NONE
|
private_constant :NONE
|
||||||
end
|
end
|
||||||
@ -23,7 +23,7 @@ if !defined?(Addressable::VERSION)
|
|||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 2
|
MAJOR = 2
|
||||||
MINOR = 8
|
MINOR = 8
|
||||||
TINY = 4
|
TINY = 5
|
||||||
|
|
||||||
STRING = [MAJOR, MINOR, TINY].join('.')
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user