addressable 2.8.5 → 2.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +49 -44
- data/addressable.gemspec +7 -7
- data/lib/addressable/uri.rb +31 -20
- data/lib/addressable/version.rb +1 -1
- data/tasks/gem.rake +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4023555b4bb6c374726bb9647a29d30943c637115619670a09632fe7a4e28765
|
4
|
+
data.tar.gz: 95ad31a9e1dd01f2bc9a7c097eb452f07ed52be16dcd2ad4946652648dd7808c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7dd6eed173bc4a06a3abb74f6fdbf501ee12b3fcb2828c0f21db98d1779175bce4dc900999269db24cc8647c3148b06cf1d9c768c97c7591a48f1e43751bb7b
|
7
|
+
data.tar.gz: 3bbe976f23a4c3a6776a44d6ff2147b9ab87418162af57b2f278089528416eb3d564b114f96f165946d9126ee68d5da86c0ac01a9e2fa2792547bb312f40f046
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
# Addressable 2.8.
|
1
|
+
# Addressable 2.8.6 <a name="v2.8.6">
|
2
|
+
- Memoize regexps for common character classes ([#524])
|
3
|
+
|
4
|
+
[#524]: https://github.com/sporkmonger/addressable/pull/524
|
5
|
+
|
6
|
+
# Addressable 2.8.5 <a name="v2.8.5">
|
2
7
|
- Fix thread safety issue with encoding tables ([#515])
|
3
8
|
- Define URI::NONE as a module to avoid serialization issues ([#509])
|
4
9
|
- Fix YAML serialization ([#508])
|
@@ -7,18 +12,18 @@
|
|
7
12
|
[#509]: https://github.com/sporkmonger/addressable/pull/509
|
8
13
|
[#515]: https://github.com/sporkmonger/addressable/pull/515
|
9
14
|
|
10
|
-
# Addressable 2.8.4
|
15
|
+
# Addressable 2.8.4 <a name="v2.8.4">
|
11
16
|
- Restore `Addressable::IDNA.unicode_normalize_kc` as a deprecated method ([#504])
|
12
17
|
|
13
18
|
[#504]: https://github.com/sporkmonger/addressable/pull/504
|
14
19
|
|
15
|
-
# Addressable 2.8.3
|
20
|
+
# Addressable 2.8.3 <a name="v2.8.3">
|
16
21
|
- Fix template expand level 2 hash support for non-string objects ([#499], [#498])
|
17
22
|
|
18
23
|
[#499]: https://github.com/sporkmonger/addressable/pull/499
|
19
24
|
[#498]: https://github.com/sporkmonger/addressable/pull/498
|
20
25
|
|
21
|
-
# Addressable 2.8.2
|
26
|
+
# Addressable 2.8.2 <a name="v2.8.2">
|
22
27
|
- Improve cache hits and JIT friendliness ([#486](https://github.com/sporkmonger/addressable/pull/486))
|
23
28
|
- Improve code style and test coverage ([#482](https://github.com/sporkmonger/addressable/pull/482))
|
24
29
|
- Ensure reset of deferred validation ([#481](https://github.com/sporkmonger/addressable/pull/481))
|
@@ -27,7 +32,7 @@
|
|
27
32
|
|
28
33
|
[#492]: https://github.com/sporkmonger/addressable/pull/492
|
29
34
|
|
30
|
-
# Addressable 2.8.1
|
35
|
+
# Addressable 2.8.1 <a name="v2.8.1">
|
31
36
|
- refactor `Addressable::URI.normalize_path` to address linter offenses ([#430](https://github.com/sporkmonger/addressable/pull/430))
|
32
37
|
- update gemspec to reflect supported Ruby versions ([#466], [#464], [#463])
|
33
38
|
- compatibility w/ public_suffix 5.x ([#466], [#465], [#460])
|
@@ -43,7 +48,7 @@
|
|
43
48
|
[#465]: https://github.com/sporkmonger/addressable/pull/465
|
44
49
|
[#466]: https://github.com/sporkmonger/addressable/pull/466
|
45
50
|
|
46
|
-
# Addressable 2.8.0
|
51
|
+
# Addressable 2.8.0 <a name="v2.8.0">
|
47
52
|
- fixes ReDoS vulnerability in Addressable::Template#match
|
48
53
|
- no longer replaces `+` with spaces in queries for non-http(s) schemes
|
49
54
|
- fixed encoding ipv6 literals
|
@@ -55,14 +60,14 @@
|
|
55
60
|
- performance improvements
|
56
61
|
- switch CI/CD to GitHub Actions
|
57
62
|
|
58
|
-
# Addressable 2.7.0
|
63
|
+
# Addressable 2.7.0 <a name="v2.7.0">
|
59
64
|
- added `:compacted` flag to `normalized_query`
|
60
65
|
- `heuristic_parse` handles `mailto:` more intuitively
|
61
66
|
- dropped explicit support for JRuby 9.0.5.0
|
62
67
|
- compatibility w/ public_suffix 4.x
|
63
68
|
- performance improvements
|
64
69
|
|
65
|
-
# Addressable 2.6.0
|
70
|
+
# Addressable 2.6.0 <a name="v2.6.0">
|
66
71
|
- added `tld=` method to allow assignment to the public suffix
|
67
72
|
- most `heuristic_parse` patterns are now case-insensitive
|
68
73
|
- `heuristic_parse` handles more `file://` URI variations
|
@@ -73,17 +78,17 @@
|
|
73
78
|
- minor performance improvements in regexps
|
74
79
|
- fixes to eliminate warnings
|
75
80
|
|
76
|
-
# Addressable 2.5.2
|
81
|
+
# Addressable 2.5.2 <a name="v2.5.2">
|
77
82
|
- better support for frozen string literals
|
78
83
|
- fixed bug w/ uppercase characters in scheme
|
79
84
|
- IDNA errors w/ emoji URLs
|
80
85
|
- compatibility w/ public_suffix 3.x
|
81
86
|
|
82
|
-
# Addressable 2.5.1
|
87
|
+
# Addressable 2.5.1 <a name="v2.5.1">
|
83
88
|
- allow unicode normalization to be disabled for URI Template expansion
|
84
89
|
- removed duplicate test
|
85
90
|
|
86
|
-
# Addressable 2.5.0
|
91
|
+
# Addressable 2.5.0 <a name="v2.5.0">
|
87
92
|
- dropping support for Ruby 1.9
|
88
93
|
- adding support for Ruby 2.4 preview
|
89
94
|
- add support for public suffixes and tld; first runtime dependency
|
@@ -97,7 +102,7 @@
|
|
97
102
|
- host parts longer than 63 bytes will be ignored and not passed to libidn
|
98
103
|
- normalized values always encoded as UTF-8
|
99
104
|
|
100
|
-
# Addressable 2.4.0
|
105
|
+
# Addressable 2.4.0 <a name="v2.4.0">
|
101
106
|
- support for 1.8.x dropped
|
102
107
|
- double quotes in a host now raises an error
|
103
108
|
- newlines in host will no longer get unescaped during normalization
|
@@ -109,17 +114,17 @@
|
|
109
114
|
- fixed minor bug where an exception would be thrown for a missing ACE suffix
|
110
115
|
- better partial expansion of URI templates
|
111
116
|
|
112
|
-
# Addressable 2.3.8
|
117
|
+
# Addressable 2.3.8 <a name="v2.3.8">
|
113
118
|
- fix warnings
|
114
119
|
- update dependency gems
|
115
120
|
- support for 1.8.x officially deprecated
|
116
121
|
|
117
|
-
# Addressable 2.3.7
|
122
|
+
# Addressable 2.3.7 <a name="v2.3.7">
|
118
123
|
- fix scenario in which invalid URIs don't get an exception until inspected
|
119
124
|
- handle hostnames with two adjacent periods correctly
|
120
125
|
- upgrade of RSpec
|
121
126
|
|
122
|
-
# Addressable 2.3.6
|
127
|
+
# Addressable 2.3.6 <a name="v2.3.6">
|
123
128
|
- normalization drops empty query string
|
124
129
|
- better handling in template extract for missing values
|
125
130
|
- template modifier for `'?'` now treated as optional
|
@@ -128,19 +133,19 @@
|
|
128
133
|
- added `:sorted` option to normalization of query strings
|
129
134
|
- fixed issue with normalization of hosts given in `'example.com.'` form
|
130
135
|
|
131
|
-
# Addressable 2.3.5
|
136
|
+
# Addressable 2.3.5 <a name="v2.3.5">
|
132
137
|
- added Addressable::URI#empty? method
|
133
138
|
- Addressable::URI#hostname methods now strip square brackets from IPv6 hosts
|
134
139
|
- compatibility with Net::HTTP in Ruby 2.0.0
|
135
140
|
- Addressable::URI#route_from should always give relative URIs
|
136
141
|
|
137
|
-
# Addressable 2.3.4
|
142
|
+
# Addressable 2.3.4 <a name="v2.3.4">
|
138
143
|
- fixed issue with encoding altering its inputs
|
139
144
|
- query string normalization now leaves ';' characters alone
|
140
145
|
- FakeFS is detected before attempting to load unicode tables
|
141
146
|
- additional testing to ensure frozen objects don't cause problems
|
142
147
|
|
143
|
-
# Addressable 2.3.3
|
148
|
+
# Addressable 2.3.3 <a name="v2.3.3">
|
144
149
|
- fixed issue with converting common primitives during template expansion
|
145
150
|
- fixed port encoding issue
|
146
151
|
- removed a few warnings
|
@@ -149,59 +154,59 @@
|
|
149
154
|
- no template match should now result in nil instead of an empty MatchData
|
150
155
|
- added license information to gemspec
|
151
156
|
|
152
|
-
# Addressable 2.3.2
|
157
|
+
# Addressable 2.3.2 <a name="v2.3.2">
|
153
158
|
- added Addressable::URI#default_port method
|
154
159
|
- fixed issue with Marshalling Unicode data on Windows
|
155
160
|
- improved heuristic parsing to better handle IPv4 addresses
|
156
161
|
|
157
|
-
# Addressable 2.3.1
|
162
|
+
# Addressable 2.3.1 <a name="v2.3.1">
|
158
163
|
- fixed missing unicode data file
|
159
164
|
|
160
|
-
# Addressable 2.3.0
|
165
|
+
# Addressable 2.3.0 <a name="v2.3.0">
|
161
166
|
- updated Addressable::Template to use RFC 6570, level 4
|
162
167
|
- fixed compatibility problems with some versions of Ruby
|
163
168
|
- moved unicode tables into a data file for performance reasons
|
164
169
|
- removing support for multiple query value notations
|
165
170
|
|
166
|
-
# Addressable 2.2.8
|
171
|
+
# Addressable 2.2.8 <a name="v2.2.8">
|
167
172
|
- fixed issues with dot segment removal code
|
168
173
|
- form encoding can now handle multiple values per key
|
169
174
|
- updated development environment
|
170
175
|
|
171
|
-
# Addressable 2.2.7
|
176
|
+
# Addressable 2.2.7 <a name="v2.2.7">
|
172
177
|
- fixed issues related to Addressable::URI#query_values=
|
173
178
|
- the Addressable::URI.parse method is now polymorphic
|
174
179
|
|
175
|
-
# Addressable 2.2.6
|
180
|
+
# Addressable 2.2.6 <a name="v2.2.6">
|
176
181
|
- changed the way ambiguous paths are handled
|
177
182
|
- fixed bug with frozen URIs
|
178
183
|
- https supported in heuristic parsing
|
179
184
|
|
180
|
-
# Addressable 2.2.5
|
185
|
+
# Addressable 2.2.5 <a name="v2.2.5">
|
181
186
|
- 'parsing' a pre-parsed URI object is now a dup operation
|
182
187
|
- introduced conditional support for libidn
|
183
188
|
- fixed normalization issue on ampersands in query strings
|
184
189
|
- added additional tests around handling of query strings
|
185
190
|
|
186
|
-
# Addressable 2.2.4
|
191
|
+
# Addressable 2.2.4 <a name="v2.2.4">
|
187
192
|
- added origin support from draft-ietf-websec-origin-00
|
188
193
|
- resolved issue with attempting to navigate below root
|
189
194
|
- fixed bug with string splitting in query strings
|
190
195
|
|
191
|
-
# Addressable 2.2.3
|
196
|
+
# Addressable 2.2.3 <a name="v2.2.3">
|
192
197
|
- added :flat_array notation for query strings
|
193
198
|
|
194
|
-
# Addressable 2.2.2
|
199
|
+
# Addressable 2.2.2 <a name="v2.2.2">
|
195
200
|
- fixed issue with percent escaping of '+' character in query strings
|
196
201
|
|
197
|
-
# Addressable 2.2.1
|
202
|
+
# Addressable 2.2.1 <a name="v2.2.1">
|
198
203
|
- added support for application/x-www-form-urlencoded.
|
199
204
|
|
200
|
-
# Addressable 2.2.0
|
205
|
+
# Addressable 2.2.0 <a name="v2.2.0">
|
201
206
|
- added site methods
|
202
207
|
- improved documentation
|
203
208
|
|
204
|
-
# Addressable 2.1.2
|
209
|
+
# Addressable 2.1.2 <a name="v2.1.2">
|
205
210
|
- added HTTP request URI methods
|
206
211
|
- better handling of Windows file paths
|
207
212
|
- validation_deferred boolean replaced with defer_validation block
|
@@ -209,14 +214,14 @@
|
|
209
214
|
- fixed issue with constructing URIs with relative paths
|
210
215
|
- fixed warnings
|
211
216
|
|
212
|
-
# Addressable 2.1.1
|
217
|
+
# Addressable 2.1.1 <a name="v2.1.1">
|
213
218
|
- more type checking changes
|
214
219
|
- fixed issue with unicode normalization
|
215
220
|
- added method to find template defaults
|
216
221
|
- symbolic keys are now allowed in template mappings
|
217
222
|
- numeric values and symbolic values are now allowed in template mappings
|
218
223
|
|
219
|
-
# Addressable 2.1.0
|
224
|
+
# Addressable 2.1.0 <a name="v2.1.0">
|
220
225
|
- refactored URI template support out into its own class
|
221
226
|
- removed extract method due to being useless and unreliable
|
222
227
|
- removed Addressable::URI.expand_template
|
@@ -230,15 +235,15 @@
|
|
230
235
|
- worked around issue with freezing URIs
|
231
236
|
- improved specs
|
232
237
|
|
233
|
-
# Addressable 2.0.2
|
238
|
+
# Addressable 2.0.2 <a name="v2.0.2">
|
234
239
|
- fixed issue with URI template expansion
|
235
240
|
- fixed issue with percent escaping characters 0-15
|
236
241
|
|
237
|
-
# Addressable 2.0.1
|
242
|
+
# Addressable 2.0.1 <a name="v2.0.1">
|
238
243
|
- fixed issue with query string assignment
|
239
244
|
- fixed issue with improperly encoded components
|
240
245
|
|
241
|
-
# Addressable 2.0.0
|
246
|
+
# Addressable 2.0.0 <a name="v2.0.0">
|
242
247
|
- the initialize method now takes an options hash as its only parameter
|
243
248
|
- added query_values method to URI class
|
244
249
|
- completely replaced IDNA implementation with pure Ruby
|
@@ -253,20 +258,20 @@
|
|
253
258
|
- updated URI Template code to match v 03 of the draft spec
|
254
259
|
- added a bunch of new specifications
|
255
260
|
|
256
|
-
# Addressable 1.0.4
|
261
|
+
# Addressable 1.0.4 <a name="v1.0.4">
|
257
262
|
- switched to using RSpec's pending system for specs that rely on IDN
|
258
263
|
- fixed issue with creating URIs with paths that are not prefixed with '/'
|
259
264
|
|
260
|
-
# Addressable 1.0.3
|
265
|
+
# Addressable 1.0.3 <a name="v1.0.3">
|
261
266
|
- implemented a hash method
|
262
267
|
|
263
|
-
# Addressable 1.0.2
|
268
|
+
# Addressable 1.0.2 <a name="v1.0.2">
|
264
269
|
- fixed minor bug with the extract_mapping method
|
265
270
|
|
266
|
-
# Addressable 1.0.1
|
271
|
+
# Addressable 1.0.1 <a name="v1.0.1">
|
267
272
|
- fixed minor bug with the extract_mapping method
|
268
273
|
|
269
|
-
# Addressable 1.0.0
|
274
|
+
# Addressable 1.0.0 <a name="v1.0.0">
|
270
275
|
- heuristic parse method added
|
271
276
|
- parsing is slightly more strict
|
272
277
|
- replaced to_h with to_hash
|
@@ -275,16 +280,16 @@
|
|
275
280
|
- improved heckle rake task
|
276
281
|
- no surviving heckle mutations
|
277
282
|
|
278
|
-
# Addressable 0.1.2
|
283
|
+
# Addressable 0.1.2 <a name="v0.1.2">
|
279
284
|
- improved normalization
|
280
285
|
- fixed bug in joining algorithm
|
281
286
|
- updated specifications
|
282
287
|
|
283
|
-
# Addressable 0.1.1
|
288
|
+
# Addressable 0.1.1 <a name="v0.1.1">
|
284
289
|
- updated documentation
|
285
290
|
- added URI Template variable extraction
|
286
291
|
|
287
|
-
# Addressable 0.1.0
|
292
|
+
# Addressable 0.1.0 <a name="v0.1.0">
|
288
293
|
- initial release
|
289
294
|
- implementation based on RFC 3986, 3987
|
290
295
|
- support for IRIs via libidn
|
data/addressable.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: addressable 2.8.
|
2
|
+
# stub: addressable 2.8.6 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "addressable".freeze
|
6
|
-
s.version = "2.8.
|
6
|
+
s.version = "2.8.6".freeze
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
|
-
s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md" } if s.respond_to? :metadata=
|
9
|
+
s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.8.6" } if s.respond_to? :metadata=
|
10
10
|
s.require_paths = ["lib".freeze]
|
11
11
|
s.authors = ["Bob Aman".freeze]
|
12
|
-
s.date = "2023-
|
12
|
+
s.date = "2023-12-09"
|
13
13
|
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
|
14
14
|
s.email = "bob@sporkmonger.com".freeze
|
15
15
|
s.extra_rdoc_files = ["README.md".freeze]
|
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.licenses = ["Apache-2.0".freeze]
|
19
19
|
s.rdoc_options = ["--main".freeze, "README.md".freeze]
|
20
20
|
s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
|
21
|
-
s.rubygems_version = "3.4.
|
21
|
+
s.rubygems_version = "3.4.22".freeze
|
22
22
|
s.summary = "URI Implementation".freeze
|
23
23
|
|
24
24
|
s.specification_version = 4
|
25
25
|
|
26
|
-
s.add_runtime_dependency(%q<public_suffix>.freeze, [">= 2.0.2", "< 6.0"])
|
27
|
-
s.add_development_dependency(%q<bundler>.freeze, [">= 1.0", "< 3.0"])
|
26
|
+
s.add_runtime_dependency(%q<public_suffix>.freeze, [">= 2.0.2".freeze, "< 6.0".freeze])
|
27
|
+
s.add_development_dependency(%q<bundler>.freeze, [">= 1.0".freeze, "< 3.0".freeze])
|
28
28
|
end
|
data/lib/addressable/uri.rb
CHANGED
@@ -50,6 +50,7 @@ module Addressable
|
|
50
50
|
SUB_DELIMS = "\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\="
|
51
51
|
RESERVED = (GEN_DELIMS + SUB_DELIMS).freeze
|
52
52
|
UNRESERVED = (ALPHA + DIGIT + "\\-\\.\\_\\~").freeze
|
53
|
+
RESERVED_AND_UNRESERVED = RESERVED + UNRESERVED
|
53
54
|
PCHAR = (UNRESERVED + SUB_DELIMS + "\\:\\@").freeze
|
54
55
|
SCHEME = (ALPHA + DIGIT + "\\-\\+\\.").freeze
|
55
56
|
HOST = (UNRESERVED + SUB_DELIMS + "\\[\\:\\]").freeze
|
@@ -68,6 +69,18 @@ module Addressable
|
|
68
69
|
QUERY = %r{[^a-zA-Z0-9\-\.\_\~\!\$\'\(\)\*\+\,\=\:\@\/\?%]|%(?!2B|2b)}
|
69
70
|
end
|
70
71
|
|
72
|
+
module CharacterClassesRegexps
|
73
|
+
AUTHORITY = /[^#{CharacterClasses::AUTHORITY}]/
|
74
|
+
FRAGMENT = /[^#{CharacterClasses::FRAGMENT}]/
|
75
|
+
HOST = /[^#{CharacterClasses::HOST}]/
|
76
|
+
PATH = /[^#{CharacterClasses::PATH}]/
|
77
|
+
QUERY = /[^#{CharacterClasses::QUERY}]/
|
78
|
+
RESERVED = /[^#{CharacterClasses::RESERVED}]/
|
79
|
+
RESERVED_AND_UNRESERVED = /[^#{CharacterClasses::RESERVED_AND_UNRESERVED}]/
|
80
|
+
SCHEME = /[^#{CharacterClasses::SCHEME}]/
|
81
|
+
UNRESERVED = /[^#{CharacterClasses::UNRESERVED}]/
|
82
|
+
end
|
83
|
+
|
71
84
|
SLASH = '/'
|
72
85
|
EMPTY_STR = ''
|
73
86
|
|
@@ -387,9 +400,7 @@ module Addressable
|
|
387
400
|
# "simple/example", Addressable::URI::CharacterClasses::UNRESERVED
|
388
401
|
# )
|
389
402
|
# => "simple%2Fexample"
|
390
|
-
def self.encode_component(component, character_class=
|
391
|
-
CharacterClasses::RESERVED + CharacterClasses::UNRESERVED,
|
392
|
-
upcase_encoded='')
|
403
|
+
def self.encode_component(component, character_class=CharacterClassesRegexps::RESERVED_AND_UNRESERVED, upcase_encoded='')
|
393
404
|
return nil if component.nil?
|
394
405
|
|
395
406
|
begin
|
@@ -539,7 +550,7 @@ module Addressable
|
|
539
550
|
# )
|
540
551
|
# => "one two%2Fthree&four"
|
541
552
|
def self.normalize_component(component, character_class=
|
542
|
-
|
553
|
+
CharacterClassesRegexps::RESERVED_AND_UNRESERVED,
|
543
554
|
leave_encoded='')
|
544
555
|
return nil if component.nil?
|
545
556
|
|
@@ -619,15 +630,15 @@ module Addressable
|
|
619
630
|
uri_object = uri.kind_of?(self) ? uri : self.parse(uri)
|
620
631
|
encoded_uri = Addressable::URI.new(
|
621
632
|
:scheme => self.encode_component(uri_object.scheme,
|
622
|
-
Addressable::URI::
|
633
|
+
Addressable::URI::CharacterClassesRegexps::SCHEME),
|
623
634
|
:authority => self.encode_component(uri_object.authority,
|
624
|
-
Addressable::URI::
|
635
|
+
Addressable::URI::CharacterClassesRegexps::AUTHORITY),
|
625
636
|
:path => self.encode_component(uri_object.path,
|
626
|
-
Addressable::URI::
|
637
|
+
Addressable::URI::CharacterClassesRegexps::PATH),
|
627
638
|
:query => self.encode_component(uri_object.query,
|
628
|
-
Addressable::URI::
|
639
|
+
Addressable::URI::CharacterClassesRegexps::QUERY),
|
629
640
|
:fragment => self.encode_component(uri_object.fragment,
|
630
|
-
Addressable::URI::
|
641
|
+
Addressable::URI::CharacterClassesRegexps::FRAGMENT)
|
631
642
|
)
|
632
643
|
if return_type == String
|
633
644
|
return encoded_uri.to_s
|
@@ -692,19 +703,19 @@ module Addressable
|
|
692
703
|
end
|
693
704
|
encoded_uri = Addressable::URI.new(
|
694
705
|
:scheme => self.encode_component(components[:scheme],
|
695
|
-
Addressable::URI::
|
706
|
+
Addressable::URI::CharacterClassesRegexps::SCHEME),
|
696
707
|
:user => self.encode_component(components[:user],
|
697
|
-
Addressable::URI::
|
708
|
+
Addressable::URI::CharacterClassesRegexps::UNRESERVED),
|
698
709
|
:password => self.encode_component(components[:password],
|
699
|
-
Addressable::URI::
|
710
|
+
Addressable::URI::CharacterClassesRegexps::UNRESERVED),
|
700
711
|
:host => components[:host],
|
701
712
|
:port => components[:port],
|
702
713
|
:path => self.encode_component(components[:path],
|
703
|
-
Addressable::URI::
|
714
|
+
Addressable::URI::CharacterClassesRegexps::PATH),
|
704
715
|
:query => self.encode_component(components[:query],
|
705
|
-
Addressable::URI::
|
716
|
+
Addressable::URI::CharacterClassesRegexps::QUERY),
|
706
717
|
:fragment => self.encode_component(components[:fragment],
|
707
|
-
Addressable::URI::
|
718
|
+
Addressable::URI::CharacterClassesRegexps::FRAGMENT)
|
708
719
|
)
|
709
720
|
if return_type == String
|
710
721
|
return encoded_uri.to_s
|
@@ -755,11 +766,11 @@ module Addressable
|
|
755
766
|
[
|
756
767
|
self.encode_component(
|
757
768
|
key.gsub(/(\r\n|\n|\r)/, "\r\n"),
|
758
|
-
|
769
|
+
CharacterClassesRegexps::UNRESERVED
|
759
770
|
).gsub("%20", "+"),
|
760
771
|
self.encode_component(
|
761
772
|
value.gsub(/(\r\n|\n|\r)/, "\r\n"),
|
762
|
-
|
773
|
+
CharacterClassesRegexps::UNRESERVED
|
763
774
|
).gsub("%20", "+")
|
764
775
|
]
|
765
776
|
end
|
@@ -1734,20 +1745,20 @@ module Addressable
|
|
1734
1745
|
buffer = "".dup
|
1735
1746
|
new_query_values.each do |key, value|
|
1736
1747
|
encoded_key = URI.encode_component(
|
1737
|
-
key,
|
1748
|
+
key, CharacterClassesRegexps::UNRESERVED
|
1738
1749
|
)
|
1739
1750
|
if value == nil
|
1740
1751
|
buffer << "#{encoded_key}&"
|
1741
1752
|
elsif value.kind_of?(Array)
|
1742
1753
|
value.each do |sub_value|
|
1743
1754
|
encoded_value = URI.encode_component(
|
1744
|
-
sub_value,
|
1755
|
+
sub_value, CharacterClassesRegexps::UNRESERVED
|
1745
1756
|
)
|
1746
1757
|
buffer << "#{encoded_key}=#{encoded_value}&"
|
1747
1758
|
end
|
1748
1759
|
else
|
1749
1760
|
encoded_value = URI.encode_component(
|
1750
|
-
value,
|
1761
|
+
value, CharacterClassesRegexps::UNRESERVED
|
1751
1762
|
)
|
1752
1763
|
buffer << "#{encoded_key}=#{encoded_value}&"
|
1753
1764
|
end
|
data/lib/addressable/version.rb
CHANGED
data/tasks/gem.rake
CHANGED
@@ -31,7 +31,7 @@ namespace :gem do
|
|
31
31
|
s.homepage = "https://github.com/sporkmonger/addressable"
|
32
32
|
s.license = "Apache-2.0"
|
33
33
|
s.metadata = {
|
34
|
-
"changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md"
|
34
|
+
"changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v#{PKG_VERSION}"
|
35
35
|
}
|
36
36
|
end
|
37
37
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: addressable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Aman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: public_suffix
|
@@ -91,7 +91,7 @@ homepage: https://github.com/sporkmonger/addressable
|
|
91
91
|
licenses:
|
92
92
|
- Apache-2.0
|
93
93
|
metadata:
|
94
|
-
changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md
|
94
|
+
changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.8.6
|
95
95
|
post_install_message:
|
96
96
|
rdoc_options:
|
97
97
|
- "--main"
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.4.
|
112
|
+
rubygems_version: 3.4.22
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: URI Implementation
|