Merge pull request #13724 from Homebrew/dependabot/bundler/Library/Homebrew/addressable-2.8.1

build(deps): bump addressable from 2.8.0 to 2.8.1 in /Library/Homebrew
This commit is contained in:
Rylan Polster 2022-08-20 23:00:08 -04:00 committed by GitHub
commit d81bd6ab3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 126 additions and 96 deletions

View File

@ -7,8 +7,8 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
bindata (2.4.10)
bootsnap (1.13.0)
@ -82,7 +82,7 @@ GEM
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.7)
public_suffix (5.0.0)
racc (1.6.0)
rack (2.2.4)
rainbow (3.1.1)

View File

@ -9,8 +9,8 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.3/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.5/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.6.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-4.0.7/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-5.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/addressable-2.8.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ast-2.4.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/bindata-2.4.10/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/extensions/x86_64-darwin-15/2.6.0-static/msgpack-1.5.4"

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true
# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
@ -657,12 +656,12 @@ module Addressable
def ordered_variable_defaults
@ordered_variable_defaults ||= begin
expansions, _ = parse_template_pattern(pattern)
expansions.map do |capture|
expansions.flat_map do |capture|
_, _, varlist = *capture.match(EXPRESSION)
varlist.split(',').map do |varspec|
varspec[VARSPEC, 1]
end
end.flatten
end
end
end
@ -1023,7 +1022,7 @@ module Addressable
end
# Ensure that the regular expression matches the whole URI.
regexp_string = "^#{regexp_string}$"
regexp_string = "\\A#{regexp_string}\\z"
return expansions, Regexp.new(regexp_string)
end

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true
# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
@ -38,20 +37,26 @@ module Addressable
##
# Container for the character classes specified in
# <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
#
# Note: Concatenated and interpolated `String`s are not affected by the
# `frozen_string_literal` directive and must be frozen explicitly.
#
# Interpolated `String`s *were* frozen this way before Ruby 3.0:
# https://bugs.ruby-lang.org/issues/17104
module CharacterClasses
ALPHA = "a-zA-Z"
DIGIT = "0-9"
GEN_DELIMS = "\\:\\/\\?\\#\\[\\]\\@"
SUB_DELIMS = "\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\="
RESERVED = GEN_DELIMS + SUB_DELIMS
UNRESERVED = ALPHA + DIGIT + "\\-\\.\\_\\~"
PCHAR = UNRESERVED + SUB_DELIMS + "\\:\\@"
SCHEME = ALPHA + DIGIT + "\\-\\+\\."
HOST = UNRESERVED + SUB_DELIMS + "\\[\\:\\]"
AUTHORITY = PCHAR + "\\[\\:\\]"
PATH = PCHAR + "\\/"
QUERY = PCHAR + "\\/\\?"
FRAGMENT = PCHAR + "\\/\\?"
RESERVED = (GEN_DELIMS + SUB_DELIMS).freeze
UNRESERVED = (ALPHA + DIGIT + "\\-\\.\\_\\~").freeze
PCHAR = (UNRESERVED + SUB_DELIMS + "\\:\\@").freeze
SCHEME = (ALPHA + DIGIT + "\\-\\+\\.").freeze
HOST = (UNRESERVED + SUB_DELIMS + "\\[\\:\\]").freeze
AUTHORITY = (PCHAR + "\\[\\:\\]").freeze
PATH = (PCHAR + "\\/").freeze
QUERY = (PCHAR + "\\/\\?").freeze
FRAGMENT = (PCHAR + "\\/\\?").freeze
end
module NormalizeCharacterClasses
@ -469,19 +474,13 @@ module Addressable
"Expected Class (String or Addressable::URI), " +
"got #{return_type.inspect}"
end
uri = uri.dup
# Seriously, only use UTF-8. I'm really not kidding!
uri.force_encoding("utf-8")
unless leave_encoded.empty?
leave_encoded = leave_encoded.dup.force_encoding("utf-8")
end
result = uri.gsub(/%[0-9a-f]{2}/iu) do |sequence|
result = uri.gsub(/%[0-9a-f]{2}/i) do |sequence|
c = sequence[1..3].to_i(16).chr
c.force_encoding("utf-8")
c.force_encoding(sequence.encoding)
leave_encoded.include?(c) ? sequence : c
end
result.force_encoding("utf-8")
if return_type == String
return result
@ -561,10 +560,10 @@ module Addressable
leave_re = if leave_encoded.length > 0
character_class = "#{character_class}%" unless character_class.include?('%')
"|%(?!#{leave_encoded.chars.map do |char|
"|%(?!#{leave_encoded.chars.flat_map do |char|
seq = SEQUENCE_ENCODING_TABLE[char]
[seq.upcase, seq.downcase]
end.flatten.join('|')})"
end.join('|')})"
end
character_class = if leave_re
@ -900,7 +899,7 @@ module Addressable
end
end
# All normalized values should be UTF-8
@normalized_scheme.force_encoding(Encoding::UTF_8) if @normalized_scheme
force_utf8_encoding_if_needed(@normalized_scheme)
@normalized_scheme
end
@ -955,7 +954,7 @@ module Addressable
end
end
# All normalized values should be UTF-8
@normalized_user.force_encoding(Encoding::UTF_8) if @normalized_user
force_utf8_encoding_if_needed(@normalized_user)
@normalized_user
end
@ -1012,9 +1011,7 @@ module Addressable
end
end
# All normalized values should be UTF-8
if @normalized_password
@normalized_password.force_encoding(Encoding::UTF_8)
end
force_utf8_encoding_if_needed(@normalized_password)
@normalized_password
end
@ -1082,9 +1079,7 @@ module Addressable
end
end
# All normalized values should be UTF-8
if @normalized_userinfo
@normalized_userinfo.force_encoding(Encoding::UTF_8)
end
force_utf8_encoding_if_needed(@normalized_userinfo)
@normalized_userinfo
end
@ -1151,9 +1146,7 @@ module Addressable
end
end
# All normalized values should be UTF-8
if @normalized_host && !@normalized_host.empty?
@normalized_host.force_encoding(Encoding::UTF_8)
end
force_utf8_encoding_if_needed(@normalized_host)
@normalized_host
end
@ -1271,9 +1264,7 @@ module Addressable
authority
end
# All normalized values should be UTF-8
if @normalized_authority
@normalized_authority.force_encoding(Encoding::UTF_8)
end
force_utf8_encoding_if_needed(@normalized_authority)
@normalized_authority
end
@ -1507,7 +1498,7 @@ module Addressable
site_string
end
# All normalized values should be UTF-8
@normalized_site.force_encoding(Encoding::UTF_8) if @normalized_site
force_utf8_encoding_if_needed(@normalized_site)
@normalized_site
end
@ -1570,7 +1561,7 @@ module Addressable
result
end
# All normalized values should be UTF-8
@normalized_path.force_encoding(Encoding::UTF_8) if @normalized_path
force_utf8_encoding_if_needed(@normalized_path)
@normalized_path
end
@ -1646,7 +1637,7 @@ module Addressable
component == "" ? nil : component
end
# All normalized values should be UTF-8
@normalized_query.force_encoding(Encoding::UTF_8) if @normalized_query
force_utf8_encoding_if_needed(@normalized_query)
@normalized_query
end
@ -1842,9 +1833,7 @@ module Addressable
component == "" ? nil : component
end
# All normalized values should be UTF-8
if @normalized_fragment
@normalized_fragment.force_encoding(Encoding::UTF_8)
end
force_utf8_encoding_if_needed(@normalized_fragment)
@normalized_fragment
end
@ -2440,30 +2429,35 @@ module Addressable
def self.normalize_path(path)
# Section 5.2.4 of RFC 3986
return nil if path.nil?
return if path.nil?
normalized_path = path.dup
begin
mod = nil
loop do
mod ||= normalized_path.gsub!(RULE_2A, SLASH)
pair = normalized_path.match(RULE_2B_2C)
parent, current = pair[1], pair[2] if pair
if pair
parent = pair[1]
current = pair[2]
else
parent = nil
current = nil
end
regexp = "/#{Regexp.escape(parent.to_s)}/\\.\\./|"
regexp += "(/#{Regexp.escape(current.to_s)}/\\.\\.$)"
if pair && ((parent != SELF_REF && parent != PARENT) ||
(current != SELF_REF && current != PARENT))
mod ||= normalized_path.gsub!(
Regexp.new(
"/#{Regexp.escape(parent.to_s)}/\\.\\./|" +
"(/#{Regexp.escape(current.to_s)}/\\.\\.$)"
), SLASH
)
mod ||= normalized_path.gsub!(Regexp.new(regexp), SLASH)
end
mod ||= normalized_path.gsub!(RULE_2D, EMPTY_STR)
# Non-standard, removes prefixed dotted segments from path.
mod ||= normalized_path.gsub!(RULE_PREFIXED_PARENT, SLASH)
end until mod.nil?
break if mod.nil?
end
return normalized_path
normalized_path
end
##
@ -2552,5 +2546,15 @@ module Addressable
remove_instance_variable(:@uri_string) if defined?(@uri_string)
remove_instance_variable(:@hash) if defined?(@hash)
end
##
# Converts the string to be UTF-8 if it is not already UTF-8
#
# @api private
def force_utf8_encoding_if_needed(str)
if str && str.encoding != Encoding::UTF_8
str.force_encoding(Encoding::UTF_8)
end
end
end
end

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true
# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
@ -24,7 +23,7 @@ if !defined?(Addressable::VERSION)
module VERSION
MAJOR = 2
MINOR = 8
TINY = 0
TINY = 1
STRING = [MAJOR, MINOR, TINY].join('.')
end

View File

@ -1340,7 +1340,7 @@ tt.im
tv.im
// in : https://en.wikipedia.org/wiki/.in
// see also: https://registry.in/Policies
// see also: https://registry.in/policies
// Please note, that nic.in is not an official eTLD, but used by most
// government institutions.
in
@ -7130,7 +7130,7 @@ org.zw
// newGTLDs
// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-03-27T15:13:38Z
// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-07-03T15:13:53Z
// This list is auto-generated, don't edit it manually.
// aaa : 2015-02-26 American Automobile Association, Inc.
aaa
@ -7471,7 +7471,7 @@ bio
// black : 2014-01-16 Afilias Limited
black
// blackfriday : 2014-01-16 UNR Corp.
// blackfriday : 2014-01-16 Registry Services, LLC
blackfriday
// blockbuster : 2015-07-30 Dish DBS Corporation
@ -7687,7 +7687,7 @@ chanel
// channel : 2014-05-08 Charleston Road Registry Inc.
channel
// charity : 2018-04-11 Binky Moon, LLC
// charity : 2018-04-11 Public Interest Registry
charity
// chase : 2015-04-30 JPMorgan Chase Bank, National Association
@ -7834,7 +7834,7 @@ coupon
// coupons : 2015-03-26 Binky Moon, LLC
coupons
// courses : 2014-12-04 OPEN UNIVERSITIES AUSTRALIA PTY LTD
// courses : 2014-12-04 Registry Services, LLC
courses
// cpa : 2019-06-10 American Institute of Certified Public Accountants
@ -8020,7 +8020,7 @@ dvag
// dvr : 2016-05-26 DISH Technologies L.L.C.
dvr
// earth : 2014-12-04 Interlink Co., Ltd.
// earth : 2014-12-04 Interlink Systems Innovation Institute K.K.
earth
// eat : 2014-01-23 Charleston Road Registry Inc.
@ -8227,7 +8227,7 @@ forsale
// forum : 2015-04-02 Fegistry, LLC
forum
// foundation : 2013-12-05 Binky Moon, LLC
// foundation : 2013-12-05 Public Interest Registry
foundation
// fox : 2015-09-11 FOX Registry, LLC
@ -8308,7 +8308,7 @@ gdn
// gea : 2014-12-04 GEA Group Aktiengesellschaft
gea
// gent : 2014-01-23 COMBELL NV
// gent : 2014-01-23 Easyhost BV
gent
// genting : 2015-03-12 Resorts World Inc Pte. Ltd.
@ -8326,7 +8326,7 @@ gift
// gifts : 2014-07-03 Binky Moon, LLC
gifts
// gives : 2014-03-06 Dog Beach, LLC
// gives : 2014-03-06 Public Interest Registry
gives
// giving : 2014-11-13 Giving Limited
@ -8452,7 +8452,7 @@ health
// healthcare : 2014-06-12 Binky Moon, LLC
healthcare
// help : 2014-06-26 UNR Corp.
// help : 2014-06-26 Innovation service Limited
help
// helsinki : 2015-02-05 City of Helsinki
@ -8851,7 +8851,7 @@ lincoln
// linde : 2014-12-04 Linde Aktiengesellschaft
linde
// link : 2013-11-14 UNR Corp.
// link : 2013-11-14 Nova Registry Ltd
link
// lipsy : 2015-06-25 Lipsy Ltd
@ -8866,7 +8866,7 @@ living
// llc : 2017-12-14 Afilias Limited
llc
// llp : 2019-08-26 UNR Corp.
// llp : 2019-08-26 Intercap Registry Inc.
llp
// loan : 2014-11-20 dot Loan Limited
@ -9034,7 +9034,7 @@ mobile
// moda : 2013-11-07 Dog Beach, LLC
moda
// moe : 2013-11-13 Interlink Co., Ltd.
// moe : 2013-11-13 Interlink Systems Innovation Institute K.K.
moe
// moi : 2014-12-18 Amazon Registry Services, Inc.
@ -9307,7 +9307,7 @@ philips
// phone : 2016-06-02 Dish DBS Corporation
phone
// photo : 2013-11-14 UNR Corp.
// photo : 2013-11-14 Registry Services, LLC
photo
// photography : 2013-09-20 Binky Moon, LLC
@ -9550,7 +9550,7 @@ rsvp
// rugby : 2016-12-15 World Rugby Strategic Developments Limited
rugby
// ruhr : 2013-10-02 regiodot GmbH & Co. KG
// ruhr : 2013-10-02 dotSaarland GmbH
ruhr
// run : 2015-03-19 Binky Moon, LLC
@ -9841,7 +9841,7 @@ stream
// studio : 2015-02-11 Dog Beach, LLC
studio
// study : 2014-12-11 OPEN UNIVERSITIES AUSTRALIA PTY LTD
// study : 2014-12-11 Registry Services, LLC
study
// style : 2014-12-04 Binky Moon, LLC
@ -9901,7 +9901,7 @@ tatamotors
// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic"
tatar
// tattoo : 2013-08-30 UNR Corp.
// tattoo : 2013-08-30 Top Level Design, LLC
tattoo
// tax : 2014-03-20 Binky Moon, LLC
@ -12111,6 +12111,7 @@ kill.jp
kilo.jp
kuron.jp
littlestar.jp
lolipopmc.jp
lolitapunk.jp
lomo.jp
lovepop.jp
@ -12281,6 +12282,10 @@ blogspot.vn
// Submitted by Niels Martignene <hello@goupile.fr>
goupile.fr
// Government of the Netherlands: https://www.government.nl
// Submitted by <domeinnaam@minaz.nl>
gov.nl
// Group 53, LLC : https://www.group53.com
// Submitted by Tyler Todd <noc@nova53.net>
awsmppl.com
@ -12357,7 +12362,6 @@ ltd.ng
ngo.ng
edu.scot
sch.so
org.yt
// HostyHosting (hostyhosting.com)
hostyhosting.io
@ -12375,6 +12379,11 @@ moonscale.net
// Submitted by Hannu Aronsson <haa@iki.fi>
iki.fi
// iliad italia: https://www.iliad.it
// Submitted by Marios Makassikis <mmakassikis@freebox.fr>
ibxos.it
iliadboxos.it
// Impertrix Solutions : <https://impertrixcdn.com>
// Submitted by Zhixiang Zhao <csuite@impertrix.com>
impertrixcdn.com
@ -12455,9 +12464,11 @@ iopsys.se
// Submitted by Matthew Hardeman <mhardeman@ipifony.com>
ipifony.net
// IServ GmbH : https://iserv.eu
// Submitted by Kim-Alexander Brodowski <info@iserv.eu>
// IServ GmbH : https://iserv.de
// Submitted by Mario Hoberg <info@iserv.de>
iservschule.de
mein-iserv.de
schulplattform.de
schulserver.de
test-iserv.de
iserv.dev
@ -12779,6 +12790,10 @@ hra.health
miniserver.com
memset.net
// Messerli Informatik AG : https://www.messerli.ch/
// Submitted by Ruben Schmidmeister <psl-maintainers@messerli.ch>
messerli.app
// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/
// Submitted by Zdeněk Šustr <zdenek.sustr@cesnet.cz>
*.cloud.metacentrum.cz
@ -12798,12 +12813,13 @@ eu.meteorapp.com
co.pl
// Microsoft Corporation : http://microsoft.com
// Submitted by Mitch Webster <miwebst@microsoft.com>
// Submitted by Public Suffix List Admin <msftpsladmin@microsoft.com>
*.azurecontainer.io
azurewebsites.net
azure-mobile.net
cloudapp.net
azurestaticapps.net
1.azurestaticapps.net
centralus.azurestaticapps.net
eastasia.azurestaticapps.net
eastus2.azurestaticapps.net
@ -13388,6 +13404,12 @@ rocky.page
спб.рус
я.рус
// Salesforce.com, Inc. https://salesforce.com/
// Submitted by Michael Biven <mbiven@salesforce.com>
*.builder.code.com
*.dev-builder.code.com
*.stg-builder.code.com
// Sandstorm Development Group, Inc. : https://sandcats.io/
// Submitted by Asheesh Laroia <asheesh@sandstorm.io>
sandcats.io
@ -13811,6 +13833,15 @@ hk.org
ltd.hk
inc.hk
// UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/
// see also: whois -h whois.udr.org.yt help
// Submitted by Atanunu Igbunuroghene <publicsuffixlist@udr.org.yt>
name.pm
sch.tf
biz.wf
sch.wf
org.yt
// United Gameserver GmbH : https://united-gameserver.de
// Submitted by Stefan Schwarz <sysadm@united-gameserver.de>
virtualuser.de

View File

@ -169,7 +169,7 @@ module PublicSuffix
return DomainInvalid.new("Name is blank") if name.empty?
return DomainInvalid.new("Name starts with a dot") if name.start_with?(DOT)
return DomainInvalid.new("%s is not expected to contain a scheme" % name) if name.include?("://")
return DomainInvalid.new(format("%s is not expected to contain a scheme", name)) if name.include?("://")
name
end

View File

@ -87,7 +87,7 @@ module PublicSuffix
section = 2
# skip comments
when line.start_with?(comment_token)
when line.start_with?(comment_token) # rubocop:disable Lint/DuplicateBranch
next
else

View File

@ -125,7 +125,7 @@ module PublicSuffix
# @param private [Boolean]
def initialize(value:, length: nil, private: false)
@value = value.to_s
@length = length || @value.count(DOT) + 1
@length = length || (@value.count(DOT) + 1)
@private = private
end
@ -161,7 +161,7 @@ module PublicSuffix
# @param name [String] the domain name to check
# @return [Boolean]
def match?(name)
# Note: it works because of the assumption there are no
# NOTE: it works because of the assumption there are no
# rules like foo.*.com. If the assumption is incorrect,
# we need to properly walk the input and skip parts according
# to wildcard component.
@ -221,7 +221,7 @@ module PublicSuffix
# @param content [String] the content of the rule
# @param private [Boolean]
def self.build(content, private: false)
new(value: content.to_s[2..-1], private: private)
new(value: content.to_s[2..], private: private)
end
# Initializes a new rule.
@ -269,7 +269,7 @@ module PublicSuffix
# @param content [#to_s] the content of the rule
# @param private [Boolean]
def self.build(content, private: false)
new(value: content.to_s[1..-1], private: private)
new(value: content.to_s[1..], private: private)
end
# Gets the original rule definition.
@ -299,7 +299,7 @@ module PublicSuffix
#
# @return [Array<String>]
def parts
@value.split(DOT)[1..-1]
@value.split(DOT)[1..]
end
end

View File

@ -10,6 +10,6 @@
module PublicSuffix
# @return [String] The current library version.
VERSION = "4.0.7"
VERSION = "5.0.0"
end