Skip to content

Commit

Permalink
Merge pull request Homebrew#16311 from Homebrew/dependabot/bundler/Li…
Browse files Browse the repository at this point in the history
…brary/Homebrew/addressable-2.8.6

build(deps): bump addressable from 2.8.5 to 2.8.6 in /Library/Homebrew
  • Loading branch information
Bo98 authored Dec 12, 2023
2 parents 6938fb7 + 738839c commit b3064d1
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
bindata (2.4.15)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -6383,13 +6383,7 @@ Net::HTTPServerErrorCode = Net::HTTPServerError

Net::HTTPSession = Net::HTTP

class Net::HTTPSuccess
end

Net::HTTPSuccessCode::EXCEPTION_TYPE = Net::HTTPError

class Net::HTTPSuccess
end
Net::HTTPSuccessCode = Net::HTTPSuccess

class Net::HTTPURITooLong
HAS_BODY = ::T.let(nil, ::T.untyped)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/zeitwerk-2.6.12/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/activesupport-6.1.7.6/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/public_suffix-5.0.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/addressable-2.8.6/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}/extensions/x86_64-darwin-15/#{Gem.extension_api_version}/msgpack-1.7.2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module CharacterClasses
SUB_DELIMS = "\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\="
RESERVED = (GEN_DELIMS + SUB_DELIMS).freeze
UNRESERVED = (ALPHA + DIGIT + "\\-\\.\\_\\~").freeze
RESERVED_AND_UNRESERVED = RESERVED + UNRESERVED
PCHAR = (UNRESERVED + SUB_DELIMS + "\\:\\@").freeze
SCHEME = (ALPHA + DIGIT + "\\-\\+\\.").freeze
HOST = (UNRESERVED + SUB_DELIMS + "\\[\\:\\]").freeze
Expand All @@ -68,6 +69,18 @@ module NormalizeCharacterClasses
QUERY = %r{[^a-zA-Z0-9\-\.\_\~\!\$\'\(\)\*\+\,\=\:\@\/\?%]|%(?!2B|2b)}
end

module CharacterClassesRegexps
AUTHORITY = /[^#{CharacterClasses::AUTHORITY}]/
FRAGMENT = /[^#{CharacterClasses::FRAGMENT}]/
HOST = /[^#{CharacterClasses::HOST}]/
PATH = /[^#{CharacterClasses::PATH}]/
QUERY = /[^#{CharacterClasses::QUERY}]/
RESERVED = /[^#{CharacterClasses::RESERVED}]/
RESERVED_AND_UNRESERVED = /[^#{CharacterClasses::RESERVED_AND_UNRESERVED}]/
SCHEME = /[^#{CharacterClasses::SCHEME}]/
UNRESERVED = /[^#{CharacterClasses::UNRESERVED}]/
end

SLASH = '/'
EMPTY_STR = ''

Expand Down Expand Up @@ -387,9 +400,7 @@ def self.join(*uris)
# "simple/example", Addressable::URI::CharacterClasses::UNRESERVED
# )
# => "simple%2Fexample"
def self.encode_component(component, character_class=
CharacterClasses::RESERVED + CharacterClasses::UNRESERVED,
upcase_encoded='')
def self.encode_component(component, character_class=CharacterClassesRegexps::RESERVED_AND_UNRESERVED, upcase_encoded='')
return nil if component.nil?

begin
Expand Down Expand Up @@ -539,7 +550,7 @@ class << self
# )
# => "one two%2Fthree&four"
def self.normalize_component(component, character_class=
CharacterClasses::RESERVED + CharacterClasses::UNRESERVED,
CharacterClassesRegexps::RESERVED_AND_UNRESERVED,
leave_encoded='')
return nil if component.nil?

Expand Down Expand Up @@ -619,15 +630,15 @@ def self.encode(uri, return_type=String)
uri_object = uri.kind_of?(self) ? uri : self.parse(uri)
encoded_uri = Addressable::URI.new(
:scheme => self.encode_component(uri_object.scheme,
Addressable::URI::CharacterClasses::SCHEME),
Addressable::URI::CharacterClassesRegexps::SCHEME),
:authority => self.encode_component(uri_object.authority,
Addressable::URI::CharacterClasses::AUTHORITY),
Addressable::URI::CharacterClassesRegexps::AUTHORITY),
:path => self.encode_component(uri_object.path,
Addressable::URI::CharacterClasses::PATH),
Addressable::URI::CharacterClassesRegexps::PATH),
:query => self.encode_component(uri_object.query,
Addressable::URI::CharacterClasses::QUERY),
Addressable::URI::CharacterClassesRegexps::QUERY),
:fragment => self.encode_component(uri_object.fragment,
Addressable::URI::CharacterClasses::FRAGMENT)
Addressable::URI::CharacterClassesRegexps::FRAGMENT)
)
if return_type == String
return encoded_uri.to_s
Expand Down Expand Up @@ -692,19 +703,19 @@ def self.normalized_encode(uri, return_type=String)
end
encoded_uri = Addressable::URI.new(
:scheme => self.encode_component(components[:scheme],
Addressable::URI::CharacterClasses::SCHEME),
Addressable::URI::CharacterClassesRegexps::SCHEME),
:user => self.encode_component(components[:user],
Addressable::URI::CharacterClasses::UNRESERVED),
Addressable::URI::CharacterClassesRegexps::UNRESERVED),
:password => self.encode_component(components[:password],
Addressable::URI::CharacterClasses::UNRESERVED),
Addressable::URI::CharacterClassesRegexps::UNRESERVED),
:host => components[:host],
:port => components[:port],
:path => self.encode_component(components[:path],
Addressable::URI::CharacterClasses::PATH),
Addressable::URI::CharacterClassesRegexps::PATH),
:query => self.encode_component(components[:query],
Addressable::URI::CharacterClasses::QUERY),
Addressable::URI::CharacterClassesRegexps::QUERY),
:fragment => self.encode_component(components[:fragment],
Addressable::URI::CharacterClasses::FRAGMENT)
Addressable::URI::CharacterClassesRegexps::FRAGMENT)
)
if return_type == String
return encoded_uri.to_s
Expand Down Expand Up @@ -755,11 +766,11 @@ def self.form_encode(form_values, sort=false)
[
self.encode_component(
key.gsub(/(\r\n|\n|\r)/, "\r\n"),
CharacterClasses::UNRESERVED
CharacterClassesRegexps::UNRESERVED
).gsub("%20", "+"),
self.encode_component(
value.gsub(/(\r\n|\n|\r)/, "\r\n"),
CharacterClasses::UNRESERVED
CharacterClassesRegexps::UNRESERVED
).gsub("%20", "+")
]
end
Expand Down Expand Up @@ -1734,20 +1745,20 @@ def query_values=(new_query_values)
buffer = "".dup
new_query_values.each do |key, value|
encoded_key = URI.encode_component(
key, CharacterClasses::UNRESERVED
key, CharacterClassesRegexps::UNRESERVED
)
if value == nil
buffer << "#{encoded_key}&"
elsif value.kind_of?(Array)
value.each do |sub_value|
encoded_value = URI.encode_component(
sub_value, CharacterClasses::UNRESERVED
sub_value, CharacterClassesRegexps::UNRESERVED
)
buffer << "#{encoded_key}=#{encoded_value}&"
end
else
encoded_value = URI.encode_component(
value, CharacterClasses::UNRESERVED
value, CharacterClassesRegexps::UNRESERVED
)
buffer << "#{encoded_key}=#{encoded_value}&"
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Addressable
module VERSION
MAJOR = 2
MINOR = 8
TINY = 5
TINY = 6

STRING = [MAJOR, MINOR, TINY].join('.')
end
Expand Down

0 comments on commit b3064d1

Please sign in to comment.