addressable 2.9.1 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +244 -23
- data/README.md +36 -0
- data/lib/addressable/idna/native.rb +60 -11
- data/lib/addressable/idna/pure.rb +257 -103
- data/lib/addressable/template.rb +2288 -150
- data/lib/addressable/unicode_normalization.rb +58 -0
- data/lib/addressable/uri.rb +510 -152
- data/lib/addressable/version.rb +50 -2
- metadata +4 -3
data/lib/addressable/version.rb
CHANGED
|
@@ -22,10 +22,58 @@ if !defined?(Addressable::VERSION)
|
|
|
22
22
|
module Addressable
|
|
23
23
|
module VERSION
|
|
24
24
|
MAJOR = 2
|
|
25
|
-
MINOR =
|
|
26
|
-
TINY =
|
|
25
|
+
MINOR = 10
|
|
26
|
+
TINY = 0
|
|
27
27
|
|
|
28
28
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
|
29
29
|
end
|
|
30
|
+
|
|
31
|
+
##
|
|
32
|
+
# Warns that Ruby 3.2 and earlier are no longer supported. Addressable
|
|
33
|
+
# still loads on them, but a future version of Addressable will require
|
|
34
|
+
# Ruby 3.3 or later. Like Ruby's own deprecation warnings, it's only
|
|
35
|
+
# shown when deprecation warnings are turned on: with <code>-w</code>,
|
|
36
|
+
# <code>-W:deprecated</code> or <code>Warning[:deprecated] = true</code>
|
|
37
|
+
# (only <code>-w</code> on Ruby 2.6 and earlier).
|
|
38
|
+
#
|
|
39
|
+
# @param [String] ruby_version
|
|
40
|
+
# The Ruby version to check, as the runtime reports it.
|
|
41
|
+
# @param [String] engine The runtime, such as <code>"jruby"</code>.
|
|
42
|
+
# @param [String] engine_version The runtime's own version.
|
|
43
|
+
#
|
|
44
|
+
# @api private
|
|
45
|
+
def self.warn_if_unsupported_ruby(
|
|
46
|
+
ruby_version = RUBY_VERSION,
|
|
47
|
+
engine = RUBY_ENGINE,
|
|
48
|
+
engine_version =
|
|
49
|
+
(defined?(RUBY_ENGINE_VERSION) ? RUBY_ENGINE_VERSION : RUBY_VERSION)
|
|
50
|
+
)
|
|
51
|
+
parts = ruby_version.split('.')
|
|
52
|
+
major = parts[0].to_i
|
|
53
|
+
minor = parts[1].to_i
|
|
54
|
+
return if major > 3 || (major == 3 && minor >= 3)
|
|
55
|
+
runtime =
|
|
56
|
+
case engine
|
|
57
|
+
when 'ruby' then "Ruby #{ruby_version}"
|
|
58
|
+
when 'jruby' then "JRuby #{engine_version} (Ruby #{ruby_version})"
|
|
59
|
+
when 'truffleruby'
|
|
60
|
+
"TruffleRuby #{engine_version} (Ruby #{ruby_version})"
|
|
61
|
+
else "#{engine} #{engine_version} (Ruby #{ruby_version})"
|
|
62
|
+
end
|
|
63
|
+
message =
|
|
64
|
+
"Addressable no longer supports #{runtime}. " \
|
|
65
|
+
"A future version of Addressable will require Ruby 3.3 or later."
|
|
66
|
+
if RUBY_VERSION >= '3.0'
|
|
67
|
+
warn(message, category: :deprecated)
|
|
68
|
+
elsif defined?(Warning) && Warning.respond_to?(:[])
|
|
69
|
+
# Ruby 2.7 has the deprecation setting, but warn doesn't take a
|
|
70
|
+
# category.
|
|
71
|
+
warn(message) if Warning[:deprecated]
|
|
72
|
+
elsif $VERBOSE
|
|
73
|
+
warn(message)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
warn_if_unsupported_ruby
|
|
30
78
|
end
|
|
31
79
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: addressable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bob Aman
|
|
@@ -47,13 +47,14 @@ files:
|
|
|
47
47
|
- lib/addressable/idna/native.rb
|
|
48
48
|
- lib/addressable/idna/pure.rb
|
|
49
49
|
- lib/addressable/template.rb
|
|
50
|
+
- lib/addressable/unicode_normalization.rb
|
|
50
51
|
- lib/addressable/uri.rb
|
|
51
52
|
- lib/addressable/version.rb
|
|
52
53
|
homepage: https://github.com/sporkmonger/addressable
|
|
53
54
|
licenses:
|
|
54
55
|
- Apache-2.0
|
|
55
56
|
metadata:
|
|
56
|
-
changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.
|
|
57
|
+
changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.10.0
|
|
57
58
|
rdoc_options:
|
|
58
59
|
- "--main"
|
|
59
60
|
- README.md
|
|
@@ -70,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
70
71
|
- !ruby/object:Gem::Version
|
|
71
72
|
version: '0'
|
|
72
73
|
requirements: []
|
|
73
|
-
rubygems_version: 4.0.
|
|
74
|
+
rubygems_version: 4.0.20
|
|
74
75
|
specification_version: 4
|
|
75
76
|
summary: URI Implementation
|
|
76
77
|
test_files: []
|