Projects
Mega:23.09
rubygem-addressable
Sign Up
Log In
Username
Password
Sorry, you are not authorized to perform this action.
×
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:rubygem-addressable.spec
Changed
@@ -1,6 +1,6 @@ %global gem_name addressable Name: rubygem-%{gem_name} -Version: 2.8.0 +Version: 2.8.5 Release: 1 Summary: URI Implementation License: ASL 2.0 @@ -61,6 +61,9 @@ %{gem_instdir}/%{gem_name}.gemspec %changelog +* Mon Nov 13 2023 Ge Wang <wang__Ge@126.com> - 2.8.5-1 +- Upgrade to 2.8.5 + * Thu Jun 30 2022 wulei <wulei80@h-partners.com> - 2.8.0-1 - Upgrade to 2.8.0
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="url">git@gitee.com:src-openeuler/rubygem-addressable.git</param> <param name="scm">git</param> - <param name="revision">openEuler-23.09</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:addressable-2.8.0.gem/checksums.yaml.gz -> _service:tar_scm:addressable-2.8.5.gem/checksums.yaml.gz
Changed
@@ -1,7 +1,7 @@ --- SHA256: - metadata.gz: 03a21b1eab156a16e90bd7963af85980edfbddc8f3dbe052766303dba76cc000 - data.tar.gz: 03eca5d86f4c70f9320000f36e3cff4fd8023342a4e0ac855d0ef1ec89ee6183 + metadata.gz: 5b7d4ea3b683b3b7c719ae54919505e8e98823b39e54cd68d3579319b61d9824 + data.tar.gz: d09b61eba34544826aec64909b848b53549ae64059e09cc5f462991a59fd2465 SHA512: - metadata.gz: d504f9475ad823f5bb077b9c039a2c91c83e52c20896247a7289b61725c61b1ddefe8ae06155fb018fc67087cf04276081b42105a18394b45e2374ad0b2fadb0 - data.tar.gz: b81766fbcb9335d5ca94403b62d3b2a6fae31b66cd3c05f48e1885eaf07883bfa1321b6930271fe1415135aec687af51312a26ce27bd4b83b2ac6424dec597c9 + metadata.gz: 37927e878581e256a98ac619723a90f7b7a2d5b655ef613872a4f963ffdccabc6f0b761b65673fc6929509b0f783b48460b2643ac33c2d076bc5234e4126573b + data.tar.gz: 3afd1d272e41f97959bc8b34188b8d9fc419fcc01af9ea8a955d3ee2e6f57e3417d5ec6c58378e6b29fedb15e948ace7c080cd2c3739d6e24a4dd04eb3fa3f70
View file
_service:tar_scm:addressable-2.8.0.gem/data/CHANGELOG.md -> _service:tar_scm:addressable-2.8.5.gem/data/CHANGELOG.md
Changed
@@ -1,3 +1,48 @@ +# Addressable 2.8.5 +- Fix thread safety issue with encoding tables (#515) +- Define URI::NONE as a module to avoid serialization issues (#509) +- Fix YAML serialization (#508) + +#508: https://github.com/sporkmonger/addressable/pull/508 +#509: https://github.com/sporkmonger/addressable/pull/509 +#515: https://github.com/sporkmonger/addressable/pull/515 + +# Addressable 2.8.4 +- Restore `Addressable::IDNA.unicode_normalize_kc` as a deprecated method (#504) + +#504: https://github.com/sporkmonger/addressable/pull/504 + +# Addressable 2.8.3 +- Fix template expand level 2 hash support for non-string objects (#499, #498) + +#499: https://github.com/sporkmonger/addressable/pull/499 +#498: https://github.com/sporkmonger/addressable/pull/498 + +# Addressable 2.8.2 +- Improve cache hits and JIT friendliness (#486(https://github.com/sporkmonger/addressable/pull/486)) +- Improve code style and test coverage (#482(https://github.com/sporkmonger/addressable/pull/482)) +- Ensure reset of deferred validation (#481(https://github.com/sporkmonger/addressable/pull/481)) +- Resolve normalization differences between `IDNA::Native` and `IDNA::Pure` (#408(https://github.com/sporkmonger/addressable/issues/408), #492) +- Remove redundant colon in `Addressable::URI::CharacterClasses::AUTHORITY` regex (#438(https://github.com/sporkmonger/addressable/pull/438)) (accidentally reverted by #449 merge but added back(https://github.com/sporkmonger/addressable/pull/492#discussion_r1105125280) in #492) + +#492: https://github.com/sporkmonger/addressable/pull/492 + +# Addressable 2.8.1 +- refactor `Addressable::URI.normalize_path` to address linter offenses (#430(https://github.com/sporkmonger/addressable/pull/430)) +- update gemspec to reflect supported Ruby versions (#466, #464, #463) +- compatibility w/ public_suffix 5.x (#466, #465, #460) +- fixes "invalid byte sequence in UTF-8" exception when unencoding URLs containing non UTF-8 characters (#459(https://github.com/sporkmonger/addressable/pull/459)) +- `Ractor` compatibility (#449) +- use the whole string instead of a single line for template match (#431(https://github.com/sporkmonger/addressable/pull/431)) +- force UTF-8 encoding only if needed (#341(https://github.com/sporkmonger/addressable/pull/341)) + +#449: https://github.com/sporkmonger/addressable/pull/449 +#460: https://github.com/sporkmonger/addressable/pull/460 +#463: https://github.com/sporkmonger/addressable/pull/463 +#464: https://github.com/sporkmonger/addressable/pull/464 +#465: https://github.com/sporkmonger/addressable/pull/465 +#466: https://github.com/sporkmonger/addressable/pull/466 + # Addressable 2.8.0 - fixes ReDoS vulnerability in Addressable::Template#match - no longer replaces `+` with spaces in queries for non-http(s) schemes
View file
_service:tar_scm:addressable-2.8.0.gem/data/Gemfile -> _service:tar_scm:addressable-2.8.5.gem/data/Gemfile
Changed
@@ -2,7 +2,7 @@ source 'https://rubygems.org' -gemspec(path: __FILE__ == "(eval)" ? ".." : ".") +gemspec group :test do gem 'rspec', '~> 3.8' @@ -25,4 +25,6 @@ gem "rake", ">= 12.3.3" end -gem "idn-ruby", platform: :mri +unless ENV"IDNA_MODE" == "pure" + gem "idn-ruby", platform: :mri +end
View file
_service:tar_scm:addressable-2.8.0.gem/data/Rakefile -> _service:tar_scm:addressable-2.8.5.gem/data/Rakefile
Changed
@@ -20,11 +20,17 @@ TEXT PKG_FILES = FileList - "lib/**/*", "spec/**/*", "vendor/**/*", "data/**/*", - "tasks/**/*", - "A-Z*", "Rakefile" -.exclude(/pkg/).exclude(/database\.yml/). - exclude(/Gemfile\.lock/).exclude(/_\.git$/) + "data/**/*", + "lib/**/*.rb", + "spec/**/*.rb", + "tasks/**/*.rake", + "addressable.gemspec", + "CHANGELOG.md", + "Gemfile", + "LICENSE.txt", + "README.md", + "Rakefile", + task :default => "spec"
View file
_service:tar_scm:addressable-2.8.0.gem/data/addressable.gemspec -> _service:tar_scm:addressable-2.8.5.gem/data/addressable.gemspec
Changed
@@ -1,14 +1,15 @@ # -*- encoding: utf-8 -*- -# stub: addressable 2.8.0 ruby lib +# stub: addressable 2.8.5 ruby lib Gem::Specification.new do |s| s.name = "addressable".freeze - s.version = "2.8.0" + s.version = "2.8.5" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= + s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md" } if s.respond_to? :metadata= s.require_paths = "lib".freeze s.authors = "Bob Aman".freeze - s.date = "2021-07-03" + s.date = "2023-08-03" s.description = "Addressable is an alternative implementation to the URI implementation that is\npart of Ruby's standard library. It is flexible, offers heuristic parsing, and\nadditionally provides extensive support for IRIs and URI templates.\n".freeze s.email = "bob@sporkmonger.com".freeze s.extra_rdoc_files = "README.md".freeze @@ -16,22 +17,12 @@ s.homepage = "https://github.com/sporkmonger/addressable".freeze s.licenses = "Apache-2.0".freeze s.rdoc_options = "--main".freeze, "README.md".freeze - s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze) - s.rubygems_version = "3.0.3".freeze + s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze) + s.rubygems_version = "3.4.18".freeze s.summary = "URI Implementation".freeze - if s.respond_to? :specification_version then - s.specification_version = 4 + s.specification_version = 4 - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q<public_suffix>.freeze, ">= 2.0.2", "< 5.0") - s.add_development_dependency(%q<bundler>.freeze, ">= 1.0", "< 3.0") - else - s.add_dependency(%q<public_suffix>.freeze, ">= 2.0.2", "< 5.0") - s.add_dependency(%q<bundler>.freeze, ">= 1.0", "< 3.0") - end - else - s.add_dependency(%q<public_suffix>.freeze, ">= 2.0.2", "< 5.0") - s.add_dependency(%q<bundler>.freeze, ">= 1.0", "< 3.0") - end + s.add_runtime_dependency(%q<public_suffix>.freeze, ">= 2.0.2", "< 6.0") + s.add_development_dependency(%q<bundler>.freeze, ">= 1.0", "< 3.0") end
View file
_service:tar_scm:addressable-2.8.0.gem/data/lib/addressable/idna.rb -> _service:tar_scm:addressable-2.8.5.gem/data/lib/addressable/idna.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# encoding:utf-8 #-- # Copyright (C) Bob Aman #
View file
_service:tar_scm:addressable-2.8.0.gem/data/lib/addressable/idna/native.rb -> _service:tar_scm:addressable-2.8.5.gem/data/lib/addressable/idna/native.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# encoding:utf-8 #-- # Copyright (C) Bob Aman # @@ -30,8 +29,14 @@ IDN::Punycode.decode(value.to_s) end - def self.unicode_normalize_kc(value) - IDN::Stringprep.nfkc_normalize(value.to_s) + class << self + # @deprecated Use {String#unicode_normalize(:nfkc)} instead + def unicode_normalize_kc(value) + value.to_s.unicode_normalize(:nfkc) + end + + extend Gem::Deprecate + deprecate :unicode_normalize_kc, "String#unicode_normalize(:nfkc)", 2023, 4 end def self.to_ascii(value)
View file
_service:tar_scm:addressable-2.8.0.gem/data/lib/addressable/idna/pure.rb -> _service:tar_scm:addressable-2.8.5.gem/data/lib/addressable/idna/pure.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# encoding:utf-8 #-- # Copyright (C) Bob Aman # @@ -67,7 +66,7 @@ # domain name as described in RFC 3490. def self.to_ascii(input) input = input.to_s unless input.is_a?(String) - input = input.dup + input = input.dup.force_encoding(Encoding::UTF_8).unicode_normalize(:nfkc) if input.respond_to?(:force_encoding) input.force_encoding(Encoding::ASCII_8BIT) end @@ -78,7 +77,7 @@ part.force_encoding(Encoding::ASCII_8BIT) end if part =~ UTF8_REGEX && part =~ UTF8_REGEX_MULTIBYTE - ACE_PREFIX + punycode_encode(unicode_normalize_kc(part)) + ACE_PREFIX + punycode_encode(part) else part end @@ -113,13 +112,14 @@ output end - # Unicode normalization form KC. - def self.unicode_normalize_kc(input) - input = input.to_s unless input.is_a?(String) - unpacked = input.unpack("U*") - unpacked = - unicode_compose(unicode_sort_canonical(unicode_decompose(unpacked))) - return unpacked.pack("U*") + class << self + # @deprecated Use {String#unicode_normalize(:nfkc)} instead + def unicode_normalize_kc(value) + value.to_s.unicode_normalize(:nfkc) + end + + extend Gem::Deprecate + deprecate :unicode_normalize_kc, "String#unicode_normalize(:nfkc)", 2023, 4 end ## @@ -137,164 +137,6 @@ end private_class_method :unicode_downcase - def self.unicode_compose(unpacked) - unpacked_result = - length = unpacked.length - - return unpacked if length == 0 - - starter = unpacked0 - starter_cc = lookup_unicode_combining_class(starter) - starter_cc = 256 if starter_cc != 0 - for i in 1...length - ch = unpackedi - - if (starter_cc == 0 && - (composite = unicode_compose_pair(starter, ch)) != nil) - starter = composite - else - unpacked_result << starter - starter = ch - end - end - unpacked_result << starter - return unpacked_result - end - private_class_method :unicode_compose - - def self.unicode_compose_pair(ch_one, ch_two) - if ch_one >= HANGUL_LBASE && ch_one < HANGUL_LBASE + HANGUL_LCOUNT && - ch_two >= HANGUL_VBASE && ch_two < HANGUL_VBASE + HANGUL_VCOUNT - # Hangul L + V - return HANGUL_SBASE + ( - (ch_one - HANGUL_LBASE) * HANGUL_VCOUNT + (ch_two - HANGUL_VBASE) - ) * HANGUL_TCOUNT - elsif ch_one >= HANGUL_SBASE && - ch_one < HANGUL_SBASE + HANGUL_SCOUNT && - (ch_one - HANGUL_SBASE) % HANGUL_TCOUNT == 0 && - ch_two >= HANGUL_TBASE && ch_two < HANGUL_TBASE + HANGUL_TCOUNT - # Hangul LV + T - return ch_one + (ch_two - HANGUL_TBASE) - end - - p = - - ucs4_to_utf8(ch_one, p) - ucs4_to_utf8(ch_two, p) - - return lookup_unicode_composition(p) - end - private_class_method :unicode_compose_pair - - def self.ucs4_to_utf8(char, buffer) - if char < 128 - buffer << char - elsif char < 2048 - buffer << (char >> 6 | 192) - buffer << (char & 63 | 128) - elsif char < 0x10000 - buffer << (char >> 12 | 224) - buffer << (char >> 6 & 63 | 128) - buffer << (char & 63 | 128) - elsif char < 0x200000 - buffer << (char >> 18 | 240) - buffer << (char >> 12 & 63 | 128) - buffer << (char >> 6 & 63 | 128) - buffer << (char & 63 | 128) - elsif char < 0x4000000 - buffer << (char >> 24 | 248) - buffer << (char >> 18 & 63 | 128) - buffer << (char >> 12 & 63 | 128) - buffer << (char >> 6 & 63 | 128) - buffer << (char & 63 | 128) - elsif char < 0x80000000 - buffer << (char >> 30 | 252) - buffer << (char >> 24 & 63 | 128) - buffer << (char >> 18 & 63 | 128) - buffer << (char >> 12 & 63 | 128) - buffer << (char >> 6 & 63 | 128) - buffer << (char & 63 | 128) - end - end - private_class_method :ucs4_to_utf8 - - def self.unicode_sort_canonical(unpacked) - unpacked = unpacked.dup - i = 1 - length = unpacked.length - - return unpacked if length < 2 - - while i < length - last = unpackedi-1 - ch = unpackedi - last_cc = lookup_unicode_combining_class(last) - cc = lookup_unicode_combining_class(ch) - if cc != 0 && last_cc != 0 && last_cc > cc - unpackedi = last - unpackedi-1 = ch - i -= 1 if i > 1 - else - i += 1 - end - end - return unpacked - end - private_class_method :unicode_sort_canonical - - def self.unicode_decompose(unpacked) - unpacked_result = - for cp in unpacked - if cp >= HANGUL_SBASE && cp < HANGUL_SBASE + HANGUL_SCOUNT - l, v, t = unicode_decompose_hangul(cp) - unpacked_result << l - unpacked_result << v if v - unpacked_result << t if t - else - dc = lookup_unicode_compatibility(cp) - unless dc - unpacked_result << cp - else - unpacked_result.concat(unicode_decompose(dc.unpack("U*"))) - end - end - end - return unpacked_result - end - private_class_method :unicode_decompose - - def self.unicode_decompose_hangul(codepoint) - sindex = codepoint - HANGUL_SBASE; - if sindex < 0 || sindex >= HANGUL_SCOUNT - l = codepoint - v = t = nil - return l, v, t - end - l = HANGUL_LBASE + sindex / HANGUL_NCOUNT - v = HANGUL_VBASE + (sindex % HANGUL_NCOUNT) / HANGUL_TCOUNT - t = HANGUL_TBASE + sindex % HANGUL_TCOUNT - if t == HANGUL_TBASE - t = nil - end - return l, v, t - end - private_class_method :unicode_decompose_hangul - - def self.lookup_unicode_combining_class(codepoint) - codepoint_data = UNICODE_DATAcodepoint - (codepoint_data ? - (codepoint_dataUNICODE_DATA_COMBINING_CLASS || 0) : - 0) - end - private_class_method :lookup_unicode_combining_class - - def self.lookup_unicode_compatibility(codepoint) - codepoint_data = UNICODE_DATAcodepoint - (codepoint_data ? - codepoint_dataUNICODE_DATA_COMPATIBILITY : nil) - end - private_class_method :lookup_unicode_compatibility - def self.lookup_unicode_lowercase(codepoint) codepoint_data = UNICODE_DATAcodepoint (codepoint_data ? @@ -303,21 +145,6 @@ end private_class_method :lookup_unicode_lowercase - def self.lookup_unicode_composition(unpacked) - return COMPOSITION_TABLEunpacked - end - private_class_method :lookup_unicode_composition - - HANGUL_SBASE = 0xac00 - HANGUL_LBASE = 0x1100 - HANGUL_LCOUNT = 19 - HANGUL_VBASE = 0x1161 - HANGUL_VCOUNT = 21 - HANGUL_TBASE = 0x11a7 - HANGUL_TCOUNT = 28 - HANGUL_NCOUNT = HANGUL_VCOUNT * HANGUL_TCOUNT # 588 - HANGUL_SCOUNT = HANGUL_LCOUNT * HANGUL_NCOUNT # 11172 - UNICODE_DATA_COMBINING_CLASS = 0 UNICODE_DATA_EXCLUSION = 1 UNICODE_DATA_CANONICAL = 2
View file
_service:tar_scm:addressable-2.8.0.gem/data/lib/addressable/template.rb -> _service:tar_scm:addressable-2.8.5.gem/data/lib/addressable/template.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# encoding:utf-8 #-- # Copyright (C) Bob Aman # @@ -657,12 +656,12 @@ 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| varspecVARSPEC, 1 end - end.flatten + end end end @@ -893,25 +892,24 @@ # operator. # # @param Hash, Array, String value - # Normalizes keys and values with IDNA#unicode_normalize_kc + # Normalizes unicode keys and values with String#unicode_normalize (NFC) # # @return Hash, Array, String The normalized values def normalize_value(value) - unless value.is_a?(Hash) - value = value.respond_to?(:to_ary) ? value.to_ary : value.to_str - end - # Handle unicode normalization - if value.kind_of?(Array) - value.map! { |val| Addressable::IDNA.unicode_normalize_kc(val) } + if value.respond_to?(:to_ary) + value.to_ary.map! { |val| normalize_value(val) } elsif value.kind_of?(Hash) value = value.inject({}) { |acc, (k, v)| - accAddressable::IDNA.unicode_normalize_kc(k) = - Addressable::IDNA.unicode_normalize_kc(v) + accnormalize_value(k) = normalize_value(v) acc } else - value = Addressable::IDNA.unicode_normalize_kc(value) + value = value.to_s if !value.kind_of?(String) + if value.encoding != Encoding::UTF_8 + value = value.dup.force_encoding(Encoding::UTF_8) + end + value = value.unicode_normalize(:nfc) end value end @@ -1023,7 +1021,7 @@ 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
_service:tar_scm:addressable-2.8.0.gem/data/lib/addressable/uri.rb -> _service:tar_scm:addressable-2.8.5.gem/data/lib/addressable/uri.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# encoding:utf-8 #-- # Copyright (C) Bob Aman # @@ -38,20 +37,26 @@ ## # 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 @@ -112,7 +117,7 @@ uri = uri.to_str rescue TypeError, NoMethodError raise TypeError, "Can't convert #{uri.class} into String." - end if not uri.is_a? String + end unless uri.is_a?(String) # This Regexp supplied as an example in RFC 3986, and it works great. scan = uri.scan(URIREGEX) @@ -133,15 +138,15 @@ user = userinfo.strip/^(^:*):?/, 1 password = userinfo.strip/:(.*)$/, 1 end + host = authority.sub( /^(^\\*)@/, EMPTY_STR ).sub( /:(^:@\\*?)$/, EMPTY_STR ) + port = authority/:(^:@\\*?)$/, 1 - end - if port == EMPTY_STR - port = nil + port = nil if port == EMPTY_STR end return new( @@ -184,7 +189,7 @@ uri = uri.to_s end - if !uri.respond_to?(:to_str) + unless uri.respond_to?(:to_str) raise TypeError, "Can't convert #{uri.class} into String." end # Otherwise, convert to a String @@ -276,7 +281,7 @@ return nil unless path # If a URI object is passed, just return itself. return path if path.kind_of?(self) - if !path.respond_to?(:to_str) + unless path.respond_to?(:to_str) raise TypeError, "Can't convert #{path.class} into String." end # Otherwise, convert to a String @@ -324,13 +329,13 @@ # #=> #<Addressable::URI:0xcab390 URI:http://example.com/relative/path> def self.join(*uris) uri_objects = uris.collect do |uri| - if !uri.respond_to?(:to_str) + unless uri.respond_to?(:to_str) raise TypeError, "Can't convert #{uri.class} into String." end uri.kind_of?(self) ? uri : self.parse(uri.to_str) end result = uri_objects.shift.dup - for uri in uri_objects + uri_objects.each do |uri| result.join!(uri) end return result @@ -339,17 +344,13 @@ ## # Tables used to optimize encoding operations in `self.encode_component` # and `self.normalize_component` - SEQUENCE_ENCODING_TABLE = Hash.new do |hash, sequence| - hashsequence = sequence.unpack("C*").map do |c| - format("%02x", c) - end.join - end + SEQUENCE_ENCODING_TABLE = (0..255).map do |byte| + format("%02x", byte).freeze + end.freeze - SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = Hash.new do |hash, sequence| - hashsequence = sequence.unpack("C*").map do |c| - format("%%%02X", c) - end.join - end + SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = (0..255).map do |byte| + format("%%%02X", byte).freeze + end.freeze ## # Percent encodes a URI component. @@ -416,16 +417,17 @@ component = component.dup component.force_encoding(Encoding::ASCII_8BIT) # Avoiding gsub! because there are edge cases with frozen strings - component = component.gsub(character_class) do |sequence| - SEQUENCE_UPCASED_PERCENT_ENCODING_TABLEsequence + component = component.gsub(character_class) do |char| + SEQUENCE_UPCASED_PERCENT_ENCODING_TABLEchar.ord end if upcase_encoded.length > 0 - upcase_encoded_chars = upcase_encoded.chars.map do |char| - SEQUENCE_ENCODING_TABLEchar + upcase_encoded_chars = upcase_encoded.bytes.map do |byte| + SEQUENCE_ENCODING_TABLEbyte end component = component.gsub(/%(#{upcase_encoded_chars.join('|')})/, &:upcase) end + return component end @@ -469,20 +471,14 @@ "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 = sequence1..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") + + result.force_encoding(Encoding::UTF_8) if return_type == String return result elsif return_type == ::Addressable::URI @@ -561,10 +557,9 @@ leave_re = if leave_encoded.length > 0 character_class = "#{character_class}%" unless character_class.include?('%') - "|%(?!#{leave_encoded.chars.map do |char| - seq = SEQUENCE_ENCODING_TABLEchar - seq.upcase, seq.downcase - end.flatten.join('|')})" + bytes = leave_encoded.bytes + leave_encoded_pattern = bytes.map { |b| SEQUENCE_ENCODING_TABLEb }.join('|') + "|%(?!#{leave_encoded_pattern}|#{leave_encoded_pattern.upcase})" end character_class = if leave_re @@ -580,7 +575,7 @@ unencoded = self.unencode_component(component, String, leave_encoded) begin encoded = self.encode_component( - Addressable::IDNA.unicode_normalize_kc(unencoded), + unencoded.unicode_normalize(:nfc), character_class, leave_encoded ) @@ -688,8 +683,7 @@ components.each do |key, value| if value != nil begin - componentskey = - Addressable::IDNA.unicode_normalize_kc(value.to_str) + componentskey = value.to_str.unicode_normalize(:nfc) rescue ArgumentError # Likely a malformed UTF-8 character, skip unicode normalization componentskey = value.to_str @@ -837,7 +831,9 @@ end end - self.defer_validation do + reset_ivs + + defer_validation do # Bunch of crazy logic required because of the composite components # like userinfo and authority. self.scheme = options:scheme if options:scheme @@ -852,7 +848,8 @@ self.query_values = options:query_values if options:query_values self.fragment = options:fragment if options:fragment end - self.to_s + + to_s # force path validation end ## @@ -879,9 +876,7 @@ # The scheme component for this URI. # # @return String The scheme component. - def scheme - return defined?(@scheme) ? @scheme : nil - end + attr_reader :scheme ## # The scheme component for this URI, normalized. @@ -889,8 +884,8 @@ # @return String The scheme component, normalized. def normalized_scheme return nil unless self.scheme - @normalized_scheme ||= begin - if self.scheme =~ /^\s*ssh\+svn\s*$/i + if @normalized_scheme == NONE + @normalized_scheme = if self.scheme =~ /^\s*ssh\+svn\s*$/i "svn+ssh".dup else Addressable::URI.normalize_component( @@ -900,7 +895,7 @@ 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 @@ -921,7 +916,7 @@ @scheme = nil if @scheme.to_s.strip.empty? # Reset dependent values - remove_instance_variable(:@normalized_scheme) if defined?(@normalized_scheme) + @normalized_scheme = NONE remove_composite_values # Ensure we haven't created an invalid URI @@ -932,9 +927,7 @@ # The user component for this URI. # # @return String The user component. - def user - return defined?(@user) ? @user : nil - end + attr_reader :user ## # The user component for this URI, normalized. @@ -942,8 +935,8 @@ # @return String The user component, normalized. def normalized_user return nil unless self.user - return @normalized_user if defined?(@normalized_user) - @normalized_user ||= begin + return @normalized_user unless @normalized_user == NONE + @normalized_user = begin if normalized_scheme =~ /https?/ && self.user.strip.empty? && (!self.password || self.password.strip.empty?) nil @@ -955,7 +948,7 @@ 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 @@ -971,14 +964,14 @@ # You can't have a nil user with a non-nil password if password != nil - @user = EMPTY_STR if @user.nil? + @user = EMPTY_STR unless user end # Reset dependent values - remove_instance_variable(:@userinfo) if defined?(@userinfo) - remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo) - remove_instance_variable(:@authority) if defined?(@authority) - remove_instance_variable(:@normalized_user) if defined?(@normalized_user) + @userinfo = nil + @normalized_userinfo = NONE + @authority = nil + @normalized_user = NONE remove_composite_values # Ensure we haven't created an invalid URI @@ -989,9 +982,7 @@ # The password component for this URI. # # @return String The password component. - def password - return defined?(@password) ? @password : nil - end + attr_reader :password ## # The password component for this URI, normalized. @@ -999,8 +990,8 @@ # @return String The password component, normalized. def normalized_password return nil unless self.password - return @normalized_password if defined?(@normalized_password) - @normalized_password ||= begin + return @normalized_password unless @normalized_password == NONE + @normalized_password = begin if self.normalized_scheme =~ /https?/ && self.password.strip.empty? && (!self.user || self.user.strip.empty?) nil @@ -1012,9 +1003,7 @@ 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 @@ -1029,17 +1018,15 @@ @password = new_password ? new_password.to_str : nil # You can't have a nil user with a non-nil password - @password ||= nil - @user ||= nil if @password != nil - @user = EMPTY_STR if @user.nil? + self.user = EMPTY_STR if user.nil? end # Reset dependent values - remove_instance_variable(:@userinfo) if defined?(@userinfo) - remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo) - remove_instance_variable(:@authority) if defined?(@authority) - remove_instance_variable(:@normalized_password) if defined?(@normalized_password) + @userinfo = nil + @normalized_userinfo = NONE + @authority = nil + @normalized_password = NONE remove_composite_values # Ensure we haven't created an invalid URI @@ -1069,8 +1056,8 @@ # @return String The userinfo component, normalized. def normalized_userinfo return nil unless self.userinfo - return @normalized_userinfo if defined?(@normalized_userinfo) - @normalized_userinfo ||= begin + return @normalized_userinfo unless @normalized_userinfo == NONE + @normalized_userinfo = begin current_user = self.normalized_user current_password = self.normalized_password if !current_user && !current_password @@ -1082,9 +1069,7 @@ 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 @@ -1110,7 +1095,7 @@ self.user = new_user # Reset dependent values - remove_instance_variable(:@authority) if defined?(@authority) + @authority = nil remove_composite_values # Ensure we haven't created an invalid URI @@ -1121,9 +1106,7 @@ # The host component for this URI. # # @return String The host component. - def host - return defined?(@host) ? @host : nil - end + attr_reader :host ## # The host component for this URI, normalized. @@ -1151,9 +1134,7 @@ 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 @@ -1168,8 +1149,8 @@ @host = new_host ? new_host.to_str : nil # Reset dependent values - remove_instance_variable(:@authority) if defined?(@authority) - remove_instance_variable(:@normalized_host) if defined?(@normalized_host) + @authority = nil + @normalized_host = nil remove_composite_values # Ensure we haven't created an invalid URI @@ -1271,9 +1252,7 @@ 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 @@ -1302,14 +1281,14 @@ end # Password assigned first to ensure validity in case of nil - self.password = defined?(new_password) ? new_password : nil - self.user = defined?(new_user) ? new_user : nil - self.host = defined?(new_host) ? new_host : nil - self.port = defined?(new_port) ? new_port : nil + self.password = new_password + self.user = new_user + self.host = new_host + self.port = new_port # Reset dependent values - remove_instance_variable(:@userinfo) if defined?(@userinfo) - remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo) + @userinfo = nil + @normalized_userinfo = NONE remove_composite_values # Ensure we haven't created an invalid URI @@ -1357,16 +1336,16 @@ new_port = new_origin/:(^:@\\\/*?)$/, 1 end - self.scheme = defined?(new_scheme) ? new_scheme : nil - self.host = defined?(new_host) ? new_host : nil - self.port = defined?(new_port) ? new_port : nil + self.scheme = new_scheme + self.host = new_host + self.port = new_port self.userinfo = nil # Reset dependent values - remove_instance_variable(:@userinfo) if defined?(@userinfo) - remove_instance_variable(:@normalized_userinfo) if defined?(@normalized_userinfo) - remove_instance_variable(:@authority) if defined?(@authority) - remove_instance_variable(:@normalized_authority) if defined?(@normalized_authority) + @userinfo = nil + @normalized_userinfo = NONE + @authority = nil + @normalized_authority = nil remove_composite_values # Ensure we haven't created an invalid URI @@ -1393,9 +1372,7 @@ # infer port numbers from default values. # # @return Integer The port component. - def port - return defined?(@port) ? @port : nil - end + attr_reader :port ## # The port component for this URI, normalized. @@ -1403,8 +1380,8 @@ # @return Integer The port component, normalized. def normalized_port return nil unless self.port - return @normalized_port if defined?(@normalized_port) - @normalized_port ||= begin + return @normalized_port unless @normalized_port == NONE + @normalized_port = begin if URI.port_mappingself.normalized_scheme == self.port nil else @@ -1435,8 +1412,8 @@ @port = nil if @port == 0 # Reset dependent values - remove_instance_variable(:@authority) if defined?(@authority) - remove_instance_variable(:@normalized_port) if defined?(@normalized_port) + @authority = nil + @normalized_port = NONE remove_composite_values # Ensure we haven't created an invalid URI @@ -1507,7 +1484,7 @@ 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 @@ -1537,9 +1514,7 @@ # The path component for this URI. # # @return String The path component. - def path - return defined?(@path) ? @path : EMPTY_STR - end + attr_reader :path NORMPATH = /^(?!\/)^\/:*:.*$/ ## @@ -1570,7 +1545,7 @@ 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 @@ -1588,7 +1563,7 @@ end # Reset dependent values - remove_instance_variable(:@normalized_path) if defined?(@normalized_path) + @normalized_path = nil remove_composite_values # Ensure we haven't created an invalid URI @@ -1618,9 +1593,7 @@ # The query component for this URI. # # @return String The query component. - def query - return defined?(@query) ? @query : nil - end + attr_reader :query ## # The query component for this URI, normalized. @@ -1628,8 +1601,8 @@ # @return String The query component, normalized. def normalized_query(*flags) return nil unless self.query - return @normalized_query if defined?(@normalized_query) - @normalized_query ||= begin + return @normalized_query unless @normalized_query == NONE + @normalized_query = begin modified_query_class = Addressable::URI::CharacterClasses::QUERY.dup # Make sure possible key-value pair delimiters are escaped. modified_query_class.sub!("\\&", "").sub!("\\;", "") @@ -1646,7 +1619,7 @@ 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 @@ -1661,7 +1634,7 @@ @query = new_query ? new_query.to_str : nil # Reset dependent values - remove_instance_variable(:@normalized_query) if defined?(@normalized_query) + @normalized_query = NONE remove_composite_values end @@ -1823,9 +1796,7 @@ # The fragment component for this URI. # # @return String The fragment component. - def fragment - return defined?(@fragment) ? @fragment : nil - end + attr_reader :fragment ## # The fragment component for this URI, normalized. @@ -1833,8 +1804,8 @@ # @return String The fragment component, normalized. def normalized_fragment return nil unless self.fragment - return @normalized_fragment if defined?(@normalized_fragment) - @normalized_fragment ||= begin + return @normalized_fragment unless @normalized_fragment == NONE + @normalized_fragment = begin component = Addressable::URI.normalize_component( self.fragment, Addressable::URI::NormalizeCharacterClasses::FRAGMENT @@ -1842,9 +1813,7 @@ 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 @@ -1859,7 +1828,7 @@ @fragment = new_fragment ? new_fragment.to_str : nil # Reset dependent values - remove_instance_variable(:@normalized_fragment) if defined?(@normalized_fragment) + @normalized_fragment = NONE remove_composite_values # Ensure we haven't created an invalid URI @@ -2025,7 +1994,7 @@ # # @see Hash#merge def merge(hash) - if !hash.respond_to?(:to_hash) + unless hash.respond_to?(:to_hash) raise TypeError, "Can't convert #{hash.class} into Hash." end hash = hash.to_hash @@ -2419,7 +2388,27 @@ yield @validation_deferred = false validate - return nil + ensure + @validation_deferred = false + 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) + coderkey = 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 @@ -2440,30 +2429,35 @@ 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 = pair1, pair2 if pair + if pair + parent = pair1 + current = pair2 + 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 ## @@ -2513,11 +2507,7 @@ # @return Addressable::URI <code>self</code>. def replace_self(uri) # Reset dependent values - instance_variables.each do |var| - if instance_variable_defined?(var) && var != :@validation_deferred - remove_instance_variable(var) - end - end + reset_ivs @scheme = uri.scheme @user = uri.user @@ -2549,8 +2539,53 @@ # # @api private def remove_composite_values - remove_instance_variable(:@uri_string) if defined?(@uri_string) - remove_instance_variable(:@hash) if defined?(@hash) + @uri_string = nil + @hash = nil + 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 + + private + + ## + # Resets instance variables + # + # @api private + def reset_ivs + @scheme = nil + @user = nil + @normalized_scheme = NONE + @normalized_user = NONE + @uri_string = nil + @hash = nil + @userinfo = nil + @normalized_userinfo = NONE + @authority = nil + @password = nil + @normalized_authority = nil + @port = nil + @normalized_password = NONE + @host = nil + @normalized_host = nil + @normalized_port = NONE + @path = EMPTY_STR + @normalized_path = nil + @normalized_query = NONE + @fragment = nil + @normalized_fragment = NONE + @query = nil + end + + NONE = Module.new.freeze + + private_constant :NONE end end
View file
_service:tar_scm:addressable-2.8.0.gem/data/lib/addressable/version.rb -> _service:tar_scm:addressable-2.8.5.gem/data/lib/addressable/version.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# encoding:utf-8 #-- # Copyright (C) Bob Aman # @@ -24,7 +23,7 @@ module VERSION MAJOR = 2 MINOR = 8 - TINY = 0 + TINY = 5 STRING = MAJOR, MINOR, TINY.join('.') end
View file
_service:tar_scm:addressable-2.8.0.gem/data/spec/addressable/idna_spec.rb -> _service:tar_scm:addressable-2.8.5.gem/data/spec/addressable/idna_spec.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# coding: utf-8 # Copyright (C) Bob Aman # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,6 +38,12 @@ )).to eq("www.xn--8ws00zhy3a.com") end + it "also accepts unicode strings encoded as ascii-8bit" do + expect(Addressable::IDNA.to_ascii( + "www.詹姆斯.com".b + )).to eq("www.xn--8ws00zhy3a.com") + end + it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do "www.Iñtërnâtiônàlizætiøn.com" expect(Addressable::IDNA.to_ascii( @@ -250,11 +255,6 @@ "example..host" )).to eq("example..host") end - - it "should normalize 'string' correctly" do - expect(Addressable::IDNA.unicode_normalize_kc(:'string')).to eq("string") - expect(Addressable::IDNA.unicode_normalize_kc("string")).to eq("string") - end end describe Addressable::IDNA, "when using the pure-Ruby implementation" do
View file
_service:tar_scm:addressable-2.8.0.gem/data/spec/addressable/net_http_compat_spec.rb -> _service:tar_scm:addressable-2.8.5.gem/data/spec/addressable/net_http_compat_spec.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# coding: utf-8 # Copyright (C) Bob Aman # # Licensed under the Apache License, Version 2.0 (the "License");
View file
_service:tar_scm:addressable-2.8.0.gem/data/spec/addressable/security_spec.rb -> _service:tar_scm:addressable-2.8.5.gem/data/spec/addressable/security_spec.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# coding: utf-8 # Copyright (C) Bob Aman # # Licensed under the Apache License, Version 2.0 (the "License");
View file
_service:tar_scm:addressable-2.8.0.gem/data/spec/addressable/template_spec.rb -> _service:tar_scm:addressable-2.8.5.gem/data/spec/addressable/template_spec.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# coding: utf-8 # Copyright (C) Bob Aman # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,11 +26,7 @@ exp = expansion.is_a?(Array) ? expansion.first : expansion it "#{template} to #{exp}" do tmpl = Addressable::Template.new(template).expand(subject) - if expansion.is_a?(Array) - expect(expansion.any?{|i| i == tmpl.to_str}).to be true - else - expect(tmpl.to_str).to eq(expansion) - end + expect(tmpl.to_str).to eq(expansion) end end end @@ -78,6 +73,15 @@ end end +describe "#to_regexp" do + it "does not match the first line of multiline strings" do + uri = "https://www.example.com/bar" + template = Addressable::Template.new(uri) + expect(template.match(uri)).not_to be_nil + expect(template.match("#{uri}\ngarbage")).to be_nil + end +end + describe "Type conversion" do subject { { @@ -201,7 +205,7 @@ :path => "/foo/bar", :semi => ";", :list => %w(red green blue), - :keys => {"semi" => ';', "dot" => '.', "comma" => ','} + :keys => {"semi" => ';', "dot" => '.', :comma => ','} } } context "Expansion with value modifiers" do @@ -210,22 +214,8 @@ '{var:30}' => 'value', '{list}' => 'red,green,blue', '{list*}' => 'red,green,blue', - '{keys}' => - 'semi,%3B,dot,.,comma,%2C', - 'dot,.,semi,%3B,comma,%2C', - 'comma,%2C,semi,%3B,dot,.', - 'semi,%3B,comma,%2C,dot,.', - 'dot,.,comma,%2C,semi,%3B', - 'comma,%2C,dot,.,semi,%3B' - , - '{keys*}' => - 'semi=%3B,dot=.,comma=%2C', - 'dot=.,semi=%3B,comma=%2C', - 'comma=%2C,semi=%3B,dot=.', - 'semi=%3B,comma=%2C,dot=.', - 'dot=.,comma=%2C,semi=%3B', - 'comma=%2C,dot=.,semi=%3B' - + '{keys}' => 'semi,%3B,dot,.,comma,%2C', + '{keys*}' => 'semi=%3B,dot=.,comma=%2C', } end context "Operator + with value modifiers" do @@ -233,22 +223,8 @@ '{+path:6}/here' => '/foo/b/here', '{+list}' => 'red,green,blue', '{+list*}' => 'red,green,blue', - '{+keys}' => - 'semi,;,dot,.,comma,,', - 'dot,.,semi,;,comma,,', - 'comma,,,semi,;,dot,.', - 'semi,;,comma,,,dot,.', - 'dot,.,comma,,,semi,;', - 'comma,,,dot,.,semi,;' - , - '{+keys*}' => - 'semi=;,dot=.,comma=,', - 'dot=.,semi=;,comma=,', - 'comma=,,semi=;,dot=.', - 'semi=;,comma=,,dot=.', - 'dot=.,comma=,,semi=;', - 'comma=,,dot=.,semi=;' - + '{+keys}' => 'semi,;,dot,.,comma,,', + '{+keys*}' => 'semi=;,dot=.,comma=,', } end context "Operator # with value modifiers" do @@ -256,22 +232,8 @@ '{#path:6}/here' => '#/foo/b/here', '{#list}' => '#red,green,blue', '{#list*}' => '#red,green,blue', - '{#keys}' => - '#semi,;,dot,.,comma,,', - '#dot,.,semi,;,comma,,', - '#comma,,,semi,;,dot,.', - '#semi,;,comma,,,dot,.', - '#dot,.,comma,,,semi,;', - '#comma,,,dot,.,semi,;' - , - '{#keys*}' => - '#semi=;,dot=.,comma=,', - '#dot=.,semi=;,comma=,', - '#comma=,,semi=;,dot=.', - '#semi=;,comma=,,dot=.', - '#dot=.,comma=,,semi=;', - '#comma=,,dot=.,semi=;' - + '{#keys}' => '#semi,;,dot,.,comma,,', + '{#keys*}' => '#semi=;,dot=.,comma=,', } end context "Operator . with value modifiers" do @@ -279,22 +241,8 @@ 'X{.var:3}' => 'X.val', 'X{.list}' => 'X.red,green,blue', 'X{.list*}' => 'X.red.green.blue', - 'X{.keys}' => - 'X.semi,%3B,dot,.,comma,%2C', - 'X.dot,.,semi,%3B,comma,%2C', - 'X.comma,%2C,semi,%3B,dot,.', - 'X.semi,%3B,comma,%2C,dot,.', - 'X.dot,.,comma,%2C,semi,%3B', - 'X.comma,%2C,dot,.,semi,%3B' - , - 'X{.keys*}' => - 'X.semi=%3B.dot=..comma=%2C', - 'X.dot=..semi=%3B.comma=%2C', - 'X.comma=%2C.semi=%3B.dot=.', - 'X.semi=%3B.comma=%2C.dot=.', - 'X.dot=..comma=%2C.semi=%3B', - 'X.comma=%2C.dot=..semi=%3B' - + 'X{.keys}' => 'X.semi,%3B,dot,.,comma,%2C', + 'X{.keys*}' => 'X.semi=%3B.dot=..comma=%2C', } end context "Operator / with value modifiers" do @@ -303,22 +251,8 @@ '{/list}' => '/red,green,blue', '{/list*}' => '/red/green/blue', '{/list*,path:4}' => '/red/green/blue/%2Ffoo', - '{/keys}' => - '/semi,%3B,dot,.,comma,%2C', - '/dot,.,semi,%3B,comma,%2C', - '/comma,%2C,semi,%3B,dot,.', - '/semi,%3B,comma,%2C,dot,.', - '/dot,.,comma,%2C,semi,%3B', - '/comma,%2C,dot,.,semi,%3B' - , - '{/keys*}' => - '/semi=%3B/dot=./comma=%2C', - '/dot=./semi=%3B/comma=%2C', - '/comma=%2C/semi=%3B/dot=.', - '/semi=%3B/comma=%2C/dot=.', - '/dot=./comma=%2C/semi=%3B', - '/comma=%2C/dot=./semi=%3B' - + '{/keys}' => '/semi,%3B,dot,.,comma,%2C', + '{/keys*}' => '/semi=%3B/dot=./comma=%2C', } end context "Operator ; with value modifiers" do @@ -326,22 +260,8 @@ '{;hello:5}' => ';hello=Hello', '{;list}' => ';list=red,green,blue', '{;list*}' => ';list=red;list=green;list=blue', - '{;keys}' => - ';keys=semi,%3B,dot,.,comma,%2C', - ';keys=dot,.,semi,%3B,comma,%2C', - ';keys=comma,%2C,semi,%3B,dot,.', - ';keys=semi,%3B,comma,%2C,dot,.', - ';keys=dot,.,comma,%2C,semi,%3B', - ';keys=comma,%2C,dot,.,semi,%3B' - , - '{;keys*}' => - ';semi=%3B;dot=.;comma=%2C', - ';dot=.;semi=%3B;comma=%2C', - ';comma=%2C;semi=%3B;dot=.', - ';semi=%3B;comma=%2C;dot=.', - ';dot=.;comma=%2C;semi=%3B', - ';comma=%2C;dot=.;semi=%3B' - + '{;keys}' => ';keys=semi,%3B,dot,.,comma,%2C', + '{;keys*}' => ';semi=%3B;dot=.;comma=%2C', } end context "Operator ? with value modifiers" do @@ -349,22 +269,8 @@ '{?var:3}' => '?var=val', '{?list}' => '?list=red,green,blue', '{?list*}' => '?list=red&list=green&list=blue', - '{?keys}' => - '?keys=semi,%3B,dot,.,comma,%2C', - '?keys=dot,.,semi,%3B,comma,%2C', - '?keys=comma,%2C,semi,%3B,dot,.', - '?keys=semi,%3B,comma,%2C,dot,.', - '?keys=dot,.,comma,%2C,semi,%3B', - '?keys=comma,%2C,dot,.,semi,%3B' - , - '{?keys*}' => - '?semi=%3B&dot=.&comma=%2C', - '?dot=.&semi=%3B&comma=%2C', - '?comma=%2C&semi=%3B&dot=.', - '?semi=%3B&comma=%2C&dot=.', - '?dot=.&comma=%2C&semi=%3B', - '?comma=%2C&dot=.&semi=%3B' - + '{?keys}' => '?keys=semi,%3B,dot,.,comma,%2C', + '{?keys*}' => '?semi=%3B&dot=.&comma=%2C', } end context "Operator & with value modifiers" do @@ -372,22 +278,8 @@ '{&var:3}' => '&var=val', '{&list}' => '&list=red,green,blue', '{&list*}' => '&list=red&list=green&list=blue', - '{&keys}' => - '&keys=semi,%3B,dot,.,comma,%2C', - '&keys=dot,.,semi,%3B,comma,%2C', - '&keys=comma,%2C,semi,%3B,dot,.', - '&keys=semi,%3B,comma,%2C,dot,.', - '&keys=dot,.,comma,%2C,semi,%3B', - '&keys=comma,%2C,dot,.,semi,%3B' - , - '{&keys*}' => - '&semi=%3B&dot=.&comma=%2C', - '&dot=.&semi=%3B&comma=%2C', - '&comma=%2C&semi=%3B&dot=.', - '&semi=%3B&comma=%2C&dot=.', - '&dot=.&comma=%2C&semi=%3B', - '&comma=%2C&dot=.&semi=%3B' - + '{&keys}' => '&keys=semi,%3B,dot,.,comma,%2C', + '{&keys*}' => '&semi=%3B&dot=.&comma=%2C', } end end @@ -396,7 +288,7 @@ { :var => "value", :semi => ";", - :year => %w(1965 2000 2012), + :year => 1965, 2000, 2012, :dom => %w(example com) } } @@ -429,7 +321,7 @@ :base => "http://example.com/home/", :path => "/foo/bar", :list => "red", "green", "blue", - :keys => {"semi" => ";","dot" => ".","comma" => ","}, + :keys => {"semi" => ";","dot" => ".",:comma => ","}, :v => "6", :x => "1024", :y => "768", @@ -467,22 +359,8 @@ '{var:30}' => 'value', '{list}' => 'red,green,blue', '{list*}' => 'red,green,blue', - '{keys}' => - 'semi,%3B,dot,.,comma,%2C', - 'dot,.,semi,%3B,comma,%2C', - 'comma,%2C,semi,%3B,dot,.', - 'semi,%3B,comma,%2C,dot,.', - 'dot,.,comma,%2C,semi,%3B', - 'comma,%2C,dot,.,semi,%3B' - , - '{keys*}' => - 'semi=%3B,dot=.,comma=%2C', - 'dot=.,semi=%3B,comma=%2C', - 'comma=%2C,semi=%3B,dot=.', - 'semi=%3B,comma=%2C,dot=.', - 'dot=.,comma=%2C,semi=%3B', - 'comma=%2C,dot=.,semi=%3B' - + '{keys}' => 'semi,%3B,dot,.,comma,%2C', + '{keys*}' => 'semi=%3B,dot=.,comma=%2C', } end context "reserved expansion (+)" do @@ -502,22 +380,8 @@ '{+path:6}/here' => '/foo/b/here', '{+list}' => 'red,green,blue', '{+list*}' => 'red,green,blue', - '{+keys}' => - 'semi,;,dot,.,comma,,', - 'dot,.,semi,;,comma,,', - 'comma,,,semi,;,dot,.', - 'semi,;,comma,,,dot,.', - 'dot,.,comma,,,semi,;', - 'comma,,,dot,.,semi,;' - , - '{+keys*}' => - 'semi=;,dot=.,comma=,', - 'dot=.,semi=;,comma=,', - 'comma=,,semi=;,dot=.', - 'semi=;,comma=,,dot=.', - 'dot=.,comma=,,semi=;', - 'comma=,,dot=.,semi=;' - + '{+keys}' => 'semi,;,dot,.,comma,,', + '{+keys*}' => 'semi=;,dot=.,comma=,', } end context "fragment expansion (#)" do @@ -532,22 +396,8 @@ '{#path:6}/here' => '#/foo/b/here', '{#list}' => '#red,green,blue', '{#list*}' => '#red,green,blue', - '{#keys}' => - '#semi,;,dot,.,comma,,', - '#dot,.,semi,;,comma,,', - '#comma,,,semi,;,dot,.', - '#semi,;,comma,,,dot,.', - '#dot,.,comma,,,semi,;', - '#comma,,,dot,.,semi,;' - , - '{#keys*}' => - '#semi=;,dot=.,comma=,', - '#dot=.,semi=;,comma=,', - '#comma=,,semi=;,dot=.', - '#semi=;,comma=,,dot=.', - '#dot=.,comma=,,semi=;', - '#comma=,,dot=.,semi=;' - + '{#keys}' => '#semi,;,dot,.,comma,,', + '{#keys*}' => '#semi=;,dot=.,comma=,', } end context "label expansion (.)" do @@ -562,22 +412,8 @@ 'X{.var:3}' => 'X.val', 'X{.list}' => 'X.red,green,blue', 'X{.list*}' => 'X.red.green.blue', - 'X{.keys}' => - 'X.semi,%3B,dot,.,comma,%2C', - 'X.dot,.,semi,%3B,comma,%2C', - 'X.comma,%2C,semi,%3B,dot,.', - 'X.semi,%3B,comma,%2C,dot,.', - 'X.dot,.,comma,%2C,semi,%3B', - 'X.comma,%2C,dot,.,semi,%3B' - , - 'X{.keys*}' => - 'X.semi=%3B.dot=..comma=%2C', - 'X.dot=..semi=%3B.comma=%2C', - 'X.comma=%2C.semi=%3B.dot=.', - 'X.semi=%3B.comma=%2C.dot=.', - 'X.dot=..comma=%2C.semi=%3B', - 'X.comma=%2C.dot=..semi=%3B' - , + 'X{.keys}' => 'X.semi,%3B,dot,.,comma,%2C', + 'X{.keys*}' => 'X.semi=%3B.dot=..comma=%2C', 'X{.empty_keys}' => 'X', 'X{.empty_keys*}' => 'X' } @@ -596,22 +432,8 @@ '{/list}' => '/red,green,blue', '{/list*}' => '/red/green/blue', '{/list*,path:4}' => '/red/green/blue/%2Ffoo', - '{/keys}' => - '/semi,%3B,dot,.,comma,%2C', - '/dot,.,semi,%3B,comma,%2C', - '/comma,%2C,semi,%3B,dot,.', - '/semi,%3B,comma,%2C,dot,.', - '/dot,.,comma,%2C,semi,%3B', - '/comma,%2C,dot,.,semi,%3B' - , - '{/keys*}' => - '/semi=%3B/dot=./comma=%2C', - '/dot=./semi=%3B/comma=%2C', - '/comma=%2C/semi=%3B/dot=.', - '/semi=%3B/comma=%2C/dot=.', - '/dot=./comma=%2C/semi=%3B', - '/comma=%2C/dot=./semi=%3B' - + '{/keys}' => '/semi,%3B,dot,.,comma,%2C', + '{/keys*}' => '/semi=%3B/dot=./comma=%2C', } end context "path-style expansion (;)" do @@ -627,22 +449,8 @@ '{;hello:5}' => ';hello=Hello', '{;list}' => ';list=red,green,blue', '{;list*}' => ';list=red;list=green;list=blue', - '{;keys}' => - ';keys=semi,%3B,dot,.,comma,%2C', - ';keys=dot,.,semi,%3B,comma,%2C', - ';keys=comma,%2C,semi,%3B,dot,.', - ';keys=semi,%3B,comma,%2C,dot,.', - ';keys=dot,.,comma,%2C,semi,%3B', - ';keys=comma,%2C,dot,.,semi,%3B' - , - '{;keys*}' => - ';semi=%3B;dot=.;comma=%2C', - ';dot=.;semi=%3B;comma=%2C', - ';comma=%2C;semi=%3B;dot=.', - ';semi=%3B;comma=%2C;dot=.', - ';dot=.;comma=%2C;semi=%3B', - ';comma=%2C;dot=.;semi=%3B' - + '{;keys}' => ';keys=semi,%3B,dot,.,comma,%2C', + '{;keys*}' => ';semi=%3B;dot=.;comma=%2C', } end context "form query expansion (?)" do @@ -655,22 +463,8 @@ '{?var:3}' => '?var=val', '{?list}' => '?list=red,green,blue', '{?list*}' => '?list=red&list=green&list=blue', - '{?keys}' => - '?keys=semi,%3B,dot,.,comma,%2C', - '?keys=dot,.,semi,%3B,comma,%2C', - '?keys=comma,%2C,semi,%3B,dot,.', - '?keys=semi,%3B,comma,%2C,dot,.', - '?keys=dot,.,comma,%2C,semi,%3B', - '?keys=comma,%2C,dot,.,semi,%3B' - , - '{?keys*}' => - '?semi=%3B&dot=.&comma=%2C', - '?dot=.&semi=%3B&comma=%2C', - '?comma=%2C&semi=%3B&dot=.', - '?semi=%3B&comma=%2C&dot=.', - '?dot=.&comma=%2C&semi=%3B', - '?comma=%2C&dot=.&semi=%3B' - + '{?keys}' => '?keys=semi,%3B,dot,.,comma,%2C', + '{?keys*}' => '?semi=%3B&dot=.&comma=%2C', } end context "form query expansion (&)" do @@ -683,22 +477,8 @@ '{&var:3}' => '&var=val', '{&list}' => '&list=red,green,blue', '{&list*}' => '&list=red&list=green&list=blue', - '{&keys}' => - '&keys=semi,%3B,dot,.,comma,%2C', - '&keys=dot,.,semi,%3B,comma,%2C', - '&keys=comma,%2C,semi,%3B,dot,.', - '&keys=semi,%3B,comma,%2C,dot,.', - '&keys=dot,.,comma,%2C,semi,%3B', - '&keys=comma,%2C,dot,.,semi,%3B' - , - '{&keys*}' => - '&semi=%3B&dot=.&comma=%2C', - '&dot=.&semi=%3B&comma=%2C', - '&comma=%2C&semi=%3B&dot=.', - '&semi=%3B&comma=%2C&dot=.', - '&dot=.&comma=%2C&semi=%3B', - '&comma=%2C&dot=.&semi=%3B' - + '{&keys}' => '&keys=semi,%3B,dot,.,comma,%2C', + '{&keys*}' => '&semi=%3B&dot=.&comma=%2C', } end context "non-string key in match data" do @@ -1013,6 +793,19 @@ ) end + it "normalizes as unicode even with wrong encoding specified" do + template = subject.partial_expand("query" => "Cafe\u0301".b) + expect(template.pattern).to eq( + "http://example.com/{resource}/Caf%C3%A9/" + ) + end + + it "raises on invalid unicode input" do + expect { + subject.partial_expand("query" => "M\xE9thode".b) + }.to raise_error(ArgumentError, "invalid byte sequence in UTF-8") + end + it "does not normalize unicode when byte semantics requested" do template = subject.partial_expand({"query" => "Cafe\u0301"}, nil, false) expect(template.pattern).to eq( @@ -1073,6 +866,17 @@ expect(uri).to eq("http://example.com/search/Caf%C3%A9/") end + it "normalizes as unicode even with wrong encoding specified" do + uri = subject.expand("query" => "Cafe\u0301".b).to_str + expect(uri).to eq("http://example.com/search/Caf%C3%A9/") + end + + it "raises on invalid unicode input" do + expect { + subject.expand("query" => "M\xE9thode".b).to_str + }.to raise_error(ArgumentError, "invalid byte sequence in UTF-8") + end + it "does not normalize unicode when byte semantics requested" do uri = subject.expand({ "query" => "Cafe\u0301" }, nil, false).to_str expect(uri).to eq("http://example.com/search/Cafe%CC%81/")
View file
_service:tar_scm:addressable-2.8.0.gem/data/spec/addressable/uri_spec.rb -> _service:tar_scm:addressable-2.8.5.gem/data/spec/addressable/uri_spec.rb
Changed
@@ -1,6 +1,5 @@ # frozen_string_literal: true -# coding: utf-8 # Copyright (C) Bob Aman # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +20,7 @@ require "addressable/uri" require "uri" require "ipaddr" +require "yaml" if !"".respond_to?("force_encoding") class String @@ -999,6 +999,72 @@ end end +describe Addressable::URI, "when normalized and then deeply frozen" do + before do + @uri = Addressable::URI.parse( + "http://user:password@example.com:8080/path?query=value#fragment" + ).normalize! + + @uri.instance_variables.each do |var| + @uri.instance_variable_set(var, @uri.instance_variable_get(var).freeze) + end + + @uri.freeze + end + + it "#normalized_scheme should not error" do + expect { @uri.normalized_scheme }.not_to raise_error + end + + it "#normalized_user should not error" do + expect { @uri.normalized_user }.not_to raise_error + end + + it "#normalized_password should not error" do + expect { @uri.normalized_password }.not_to raise_error + end + + it "#normalized_userinfo should not error" do + expect { @uri.normalized_userinfo }.not_to raise_error + end + + it "#normalized_host should not error" do + expect { @uri.normalized_host }.not_to raise_error + end + + it "#normalized_authority should not error" do + expect { @uri.normalized_authority }.not_to raise_error + end + + it "#normalized_port should not error" do + expect { @uri.normalized_port }.not_to raise_error + end + + it "#normalized_site should not error" do + expect { @uri.normalized_site }.not_to raise_error + end + + it "#normalized_path should not error" do + expect { @uri.normalized_path }.not_to raise_error + end + + it "#normalized_query should not error" do + expect { @uri.normalized_query }.not_to raise_error + end + + it "#normalized_fragment should not error" do + expect { @uri.normalized_fragment }.not_to raise_error + end + + it "should be frozen" do + expect(@uri).to be_frozen + end + + it "should not allow destructive operations" do + expect { @uri.normalize! }.to raise_error(RuntimeError) + end +end + describe Addressable::URI, "when created from string components" do before do @uri = Addressable::URI.new( @@ -2956,6 +3022,20 @@ end end +describe Addressable::URI, "when parsed with empty port" do + subject(:uri) do + Addressable::URI.parse("//example.com:") + end + + it "should not infer a port" do + expect(uri.port).to be(nil) + end + + it "should have a site value of '//example.com'" do + expect(uri.site).to eq("//example.com") + end +end + describe Addressable::URI, "when parsed from " + "'http://example.com/%2E/'" do before do @@ -5874,6 +5954,26 @@ end end +describe Addressable::URI, "when normalizing a path with special unicode" do + it "does not stop at or ignore null bytes" do + expect(Addressable::URI.parse("/path%00segment/").normalize.path).to eq( + "/path%00segment/" + ) + end + + it "does apply NFC unicode normalization" do + expect(Addressable::URI.parse("/%E2%84%A6").normalize.path).to eq( + "/%CE%A9" + ) + end + + it "does not apply NFKC unicode normalization" do + expect(Addressable::URI.parse("/%C2%AF%C2%A0").normalize.path).to eq( + "/%C2%AF%C2%A0" + ) + end +end + describe Addressable::URI, "when normalizing a partially encoded string" do it "should result in correct percent encoded sequence" do expect(Addressable::URI.normalize_component( @@ -5993,6 +6093,11 @@ expect(Addressable::URI.unencode_component("ski=%BA%DAɫ")).to eq("ski=\xBA\xDAɫ") end + it "should not fail with UTF-8 incompatible string" do + url = "/M%E9/\xE9?p=\xFC".b + expect(Addressable::URI.unencode_component(url)).to eq("/M\xE9/\xE9?p=\xFC") + end + it "should result in correct percent encoded sequence as a URI" do expect(Addressable::URI.unencode( "/path?g%C3%BCnther", ::Addressable::URI @@ -6663,3 +6768,73 @@ expect(@uri.class).to eq(@uri.join('path').class) end end + +describe Addressable::URI, "support serialization roundtrip" do + before do + @uri = Addressable::URI.new( + :scheme => "http", + :user => "user", + :password => "password", + :host => "example.com", + :port => 80, + :path => "/path", + :query => "query=value", + :fragment => "fragment" + ) + end + + it "is in a working state after being serialized with Marshal" do + @uri = Addressable::URI.parse("http://example.com") + cloned_uri = Marshal.load(Marshal.dump(@uri)) + expect(cloned_uri.normalized_scheme).to be == @uri.normalized_scheme + end + + it "is in a working state after being serialized with YAML" do + @uri = Addressable::URI.parse("http://example.com") + cloned_uri = if YAML.respond_to?(:unsafe_load) + YAML.unsafe_load(YAML.dump(@uri)) + else + YAML.load(YAML.dump(@uri)) + end + expect(cloned_uri.normalized_scheme).to be == @uri.normalized_scheme + end +end + +describe Addressable::URI, "when initialized in a non-main `Ractor`" do + it "should have the same value as if used in the main `Ractor`" do + pending("Ruby 3.0+ for `Ractor` support") unless defined?(Ractor) + main = Addressable::URI.parse("http://example.com") + expect( + Ractor.new { Addressable::URI.parse("http://example.com") }.take + ).to eq(main) + end +end + +describe Addressable::URI, "when deferring validation" do + subject(:deferred) { uri.instance_variable_get(:@validation_deferred) } + + let(:uri) { Addressable::URI.parse("http://example.com") } + + it "defers validation within the block" do + uri.defer_validation do + expect(deferred).to be true + end + end + + it "always resets deferral afterward" do + expect { uri.defer_validation { raise "boom" } }.to raise_error("boom") + expect(deferred).to be false + end + + it "returns nil" do + res = uri.defer_validation {} + expect(res).to be nil + end +end + +describe Addressable::URI, "YAML safe loading" do + it "doesn't serialize anonymous objects" do + url = Addressable::URI.parse("http://example.com/") + expect(YAML.dump(url)).to_not include("!ruby/object {}") + end +end
View file
_service:tar_scm:addressable-2.8.0.gem/data/tasks/gem.rake -> _service:tar_scm:addressable-2.8.5.gem/data/tasks/gem.rake
Changed
@@ -19,9 +19,9 @@ exit(1) end - s.required_ruby_version = ">= 2.0" + s.required_ruby_version = ">= 2.2" - s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 5.0" + s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 6.0" s.add_development_dependency "bundler", ">= 1.0", "< 3.0" s.require_path = "lib" @@ -30,6 +30,9 @@ s.email = "bob@sporkmonger.com" s.homepage = "https://github.com/sporkmonger/addressable" s.license = "Apache-2.0" + s.metadata = { + "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md" + } end Gem::PackageTask.new(GEM_SPEC) do |p|
View file
_service:tar_scm:addressable-2.8.0.gem/metadata.gz -> _service:tar_scm:addressable-2.8.5.gem/metadata.gz
Changed
@@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: addressable version: !ruby/object:Gem::Version - version: 2.8.0 + version: 2.8.5 platform: ruby authors: - Bob Aman -autorequire: +autorequire: bindir: bin cert_chain: -date: 2021-07-03 00:00:00.000000000 Z +date: 2023-08-03 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: public_suffix @@ -19,7 +19,7 @@ version: 2.0.2 - - "<" - !ruby/object:Gem::Version - version: '5.0' + version: '6.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement @@ -29,7 +29,7 @@ version: 2.0.2 - - "<" - !ruby/object:Gem::Version - version: '5.0' + version: '6.0' - !ruby/object:Gem::Dependency name: bundler requirement: !ruby/object:Gem::Requirement @@ -90,8 +90,9 @@ homepage: https://github.com/sporkmonger/addressable licenses: - Apache-2.0 -metadata: {} -post_install_message: +metadata: + changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md +post_install_message: rdoc_options: - "--main" - README.md @@ -101,15 +102,15 @@ requirements: - - ">=" - !ruby/object:Gem::Version - version: '2.0' + version: '2.2' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: -rubygems_version: 3.0.3 -signing_key: +rubygems_version: 3.4.18 +signing_key: specification_version: 4 summary: URI Implementation test_files:
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2