rails-rfc6570 3.5.1 → 3.6.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +2 -2
  4. data/lib/rails/rfc6570/version.rb +2 -2
  5. data/rails-rfc6570.gemspec +1 -1
  6. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.1.1/CHANGELOG.md +477 -0
  7. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.1.1/CHANGELOG.md +139 -0
  8. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.1.1/CHANGELOG.md +465 -0
  9. data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/CHANGELOG.md +55 -46
  10. data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/README.md +6 -6
  11. data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/addressable.gemspec +6 -6
  12. data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/README.md +299 -0
  13. data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/json.gemspec +62 -0
  14. data/vendor/bundle/ruby/3.4.0/gems/{minitest-5.25.5 → minitest-5.26.2}/README.rdoc +10 -8
  15. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/CHANGELOG.md +8 -0
  16. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/README.md +38 -29
  17. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/CHANGELOG.md +81 -14
  18. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/README.md +8 -0
  19. data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/rake.gemspec +1 -1
  20. data/vendor/bundle/ruby/3.4.0/specifications/{actionpack-8.0.3.gemspec → actionpack-8.1.1.gemspec} +6 -6
  21. data/vendor/bundle/ruby/3.4.0/specifications/{actionview-8.0.3.gemspec → actionview-8.1.1.gemspec} +6 -6
  22. data/vendor/bundle/ruby/3.4.0/specifications/{activesupport-8.0.3.gemspec → activesupport-8.1.1.gemspec} +4 -4
  23. data/vendor/bundle/ruby/3.4.0/specifications/{addressable-2.8.7.gemspec → addressable-2.8.8.gemspec} +6 -6
  24. data/vendor/bundle/ruby/3.4.0/specifications/{bigdecimal-3.2.3.gemspec → bigdecimal-3.3.1.gemspec} +2 -2
  25. data/vendor/bundle/ruby/3.4.0/specifications/{connection_pool-2.5.4.gemspec → connection_pool-2.5.5.gemspec} +2 -2
  26. data/vendor/bundle/ruby/3.4.0/specifications/json-2.16.0.gemspec +0 -0
  27. data/vendor/bundle/ruby/3.4.0/specifications/{minitest-5.25.5.gemspec → minitest-5.26.2.gemspec} +6 -6
  28. data/vendor/bundle/ruby/3.4.0/specifications/{public_suffix-6.0.2.gemspec → public_suffix-7.0.0.gemspec} +5 -5
  29. data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.2.1.gemspec → rack-3.2.4.gemspec} +2 -2
  30. data/vendor/bundle/ruby/3.4.0/specifications/{rake-13.3.0.gemspec → rake-13.3.1.gemspec} +4 -4
  31. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-3.13.1.gemspec → rspec-3.13.2.gemspec} +4 -4
  32. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-core-3.13.5.gemspec → rspec-core-3.13.6.gemspec} +4 -4
  33. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-mocks-3.13.5.gemspec → rspec-mocks-3.13.7.gemspec} +5 -5
  34. data/vendor/bundle/ruby/3.4.0/specifications/{uri-1.0.3.gemspec → uri-1.1.1.gemspec} +4 -4
  35. metadata +55 -55
  36. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.3/CHANGELOG.md +0 -285
  37. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.3/CHANGELOG.md +0 -129
  38. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.3/CHANGELOG.md +0 -309
  39. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/README.md +0 -138
  40. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/benchmark.gemspec +0 -32
  41. data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.1.gemspec +0 -23
  42. /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/MIT-LICENSE +0 -0
  43. /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/README.rdoc +0 -0
  44. /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/MIT-LICENSE +0 -0
  45. /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/README.rdoc +0 -0
  46. /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/MIT-LICENSE +0 -0
  47. /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/README.rdoc +0 -0
  48. /data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/LICENSE.txt +0 -0
  49. /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/LICENSE +0 -0
  50. /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/bigdecimal.gemspec +0 -0
  51. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/LICENSE +0 -0
  52. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/README.md +0 -0
  53. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/connection_pool.gemspec +0 -0
  54. /data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/LICENSE.txt +0 -0
  55. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/MIT-LICENSE +0 -0
  56. /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/MIT-LICENSE +0 -0
  57. /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/README.rdoc +0 -0
  58. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/LICENSE.md +0 -0
  59. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/README.md +0 -0
  60. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/LICENSE.md +0 -0
  61. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/README.md +0 -0
  62. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/LICENSE.md +0 -0
  63. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/README.md +0 -0
  64. /data/vendor/bundle/ruby/3.4.0/gems/{uri-1.0.3 → uri-1.1.1}/README.md +0 -0
@@ -1,14 +1,23 @@
1
- # Addressable 2.8.7 <a name="v2.8.7">
1
+ # Changelog
2
+
3
+ ## Addressable 2.8.8 <a name="v2.8.8">
4
+ - Replace the `unicode.data` blob by a ruby constant ([#561])
5
+ - Allow `public_suffix` 7 ([#558])
6
+
7
+ [#561]: https://github.com/sporkmonger/addressable/pull/561
8
+ [#535]: https://github.com/sporkmonger/addressable/pull/558
9
+
10
+ ## Addressable 2.8.7 <a name="v2.8.7">
2
11
  - Allow `public_suffix` 6 ([#535])
3
12
 
4
13
  [#535]: https://github.com/sporkmonger/addressable/pull/535
5
14
 
6
- # Addressable 2.8.6 <a name="v2.8.6">
15
+ ## Addressable 2.8.6 <a name="v2.8.6">
7
16
  - Memoize regexps for common character classes ([#524])
8
17
 
9
18
  [#524]: https://github.com/sporkmonger/addressable/pull/524
10
19
 
11
- # Addressable 2.8.5 <a name="v2.8.5">
20
+ ## Addressable 2.8.5 <a name="v2.8.5">
12
21
  - Fix thread safety issue with encoding tables ([#515])
13
22
  - Define URI::NONE as a module to avoid serialization issues ([#509])
14
23
  - Fix YAML serialization ([#508])
@@ -17,18 +26,18 @@
17
26
  [#509]: https://github.com/sporkmonger/addressable/pull/509
18
27
  [#515]: https://github.com/sporkmonger/addressable/pull/515
19
28
 
20
- # Addressable 2.8.4 <a name="v2.8.4">
29
+ ## Addressable 2.8.4 <a name="v2.8.4">
21
30
  - Restore `Addressable::IDNA.unicode_normalize_kc` as a deprecated method ([#504])
22
31
 
23
32
  [#504]: https://github.com/sporkmonger/addressable/pull/504
24
33
 
25
- # Addressable 2.8.3 <a name="v2.8.3">
34
+ ## Addressable 2.8.3 <a name="v2.8.3">
26
35
  - Fix template expand level 2 hash support for non-string objects ([#499], [#498])
27
36
 
28
37
  [#499]: https://github.com/sporkmonger/addressable/pull/499
29
38
  [#498]: https://github.com/sporkmonger/addressable/pull/498
30
39
 
31
- # Addressable 2.8.2 <a name="v2.8.2">
40
+ ## Addressable 2.8.2 <a name="v2.8.2">
32
41
  - Improve cache hits and JIT friendliness ([#486](https://github.com/sporkmonger/addressable/pull/486))
33
42
  - Improve code style and test coverage ([#482](https://github.com/sporkmonger/addressable/pull/482))
34
43
  - Ensure reset of deferred validation ([#481](https://github.com/sporkmonger/addressable/pull/481))
@@ -37,7 +46,7 @@
37
46
 
38
47
  [#492]: https://github.com/sporkmonger/addressable/pull/492
39
48
 
40
- # Addressable 2.8.1 <a name="v2.8.1">
49
+ ## Addressable 2.8.1 <a name="v2.8.1">
41
50
  - refactor `Addressable::URI.normalize_path` to address linter offenses ([#430](https://github.com/sporkmonger/addressable/pull/430))
42
51
  - update gemspec to reflect supported Ruby versions ([#466], [#464], [#463])
43
52
  - compatibility w/ public_suffix 5.x ([#466], [#465], [#460])
@@ -53,7 +62,7 @@
53
62
  [#465]: https://github.com/sporkmonger/addressable/pull/465
54
63
  [#466]: https://github.com/sporkmonger/addressable/pull/466
55
64
 
56
- # Addressable 2.8.0 <a name="v2.8.0">
65
+ ## Addressable 2.8.0 <a name="v2.8.0">
57
66
  - fixes ReDoS vulnerability in Addressable::Template#match
58
67
  - no longer replaces `+` with spaces in queries for non-http(s) schemes
59
68
  - fixed encoding ipv6 literals
@@ -65,14 +74,14 @@
65
74
  - performance improvements
66
75
  - switch CI/CD to GitHub Actions
67
76
 
68
- # Addressable 2.7.0 <a name="v2.7.0">
77
+ ## Addressable 2.7.0 <a name="v2.7.0">
69
78
  - added `:compacted` flag to `normalized_query`
70
79
  - `heuristic_parse` handles `mailto:` more intuitively
71
80
  - dropped explicit support for JRuby 9.0.5.0
72
81
  - compatibility w/ public_suffix 4.x
73
82
  - performance improvements
74
83
 
75
- # Addressable 2.6.0 <a name="v2.6.0">
84
+ ## Addressable 2.6.0 <a name="v2.6.0">
76
85
  - added `tld=` method to allow assignment to the public suffix
77
86
  - most `heuristic_parse` patterns are now case-insensitive
78
87
  - `heuristic_parse` handles more `file://` URI variations
@@ -83,17 +92,17 @@
83
92
  - minor performance improvements in regexps
84
93
  - fixes to eliminate warnings
85
94
 
86
- # Addressable 2.5.2 <a name="v2.5.2">
95
+ ## Addressable 2.5.2 <a name="v2.5.2">
87
96
  - better support for frozen string literals
88
97
  - fixed bug w/ uppercase characters in scheme
89
98
  - IDNA errors w/ emoji URLs
90
99
  - compatibility w/ public_suffix 3.x
91
100
 
92
- # Addressable 2.5.1 <a name="v2.5.1">
101
+ ## Addressable 2.5.1 <a name="v2.5.1">
93
102
  - allow unicode normalization to be disabled for URI Template expansion
94
103
  - removed duplicate test
95
104
 
96
- # Addressable 2.5.0 <a name="v2.5.0">
105
+ ## Addressable 2.5.0 <a name="v2.5.0">
97
106
  - dropping support for Ruby 1.9
98
107
  - adding support for Ruby 2.4 preview
99
108
  - add support for public suffixes and tld; first runtime dependency
@@ -107,7 +116,7 @@
107
116
  - host parts longer than 63 bytes will be ignored and not passed to libidn
108
117
  - normalized values always encoded as UTF-8
109
118
 
110
- # Addressable 2.4.0 <a name="v2.4.0">
119
+ ## Addressable 2.4.0 <a name="v2.4.0">
111
120
  - support for 1.8.x dropped
112
121
  - double quotes in a host now raises an error
113
122
  - newlines in host will no longer get unescaped during normalization
@@ -119,17 +128,17 @@
119
128
  - fixed minor bug where an exception would be thrown for a missing ACE suffix
120
129
  - better partial expansion of URI templates
121
130
 
122
- # Addressable 2.3.8 <a name="v2.3.8">
131
+ ## Addressable 2.3.8 <a name="v2.3.8">
123
132
  - fix warnings
124
133
  - update dependency gems
125
134
  - support for 1.8.x officially deprecated
126
135
 
127
- # Addressable 2.3.7 <a name="v2.3.7">
136
+ ## Addressable 2.3.7 <a name="v2.3.7">
128
137
  - fix scenario in which invalid URIs don't get an exception until inspected
129
138
  - handle hostnames with two adjacent periods correctly
130
139
  - upgrade of RSpec
131
140
 
132
- # Addressable 2.3.6 <a name="v2.3.6">
141
+ ## Addressable 2.3.6 <a name="v2.3.6">
133
142
  - normalization drops empty query string
134
143
  - better handling in template extract for missing values
135
144
  - template modifier for `'?'` now treated as optional
@@ -138,19 +147,19 @@
138
147
  - added `:sorted` option to normalization of query strings
139
148
  - fixed issue with normalization of hosts given in `'example.com.'` form
140
149
 
141
- # Addressable 2.3.5 <a name="v2.3.5">
150
+ ## Addressable 2.3.5 <a name="v2.3.5">
142
151
  - added Addressable::URI#empty? method
143
152
  - Addressable::URI#hostname methods now strip square brackets from IPv6 hosts
144
153
  - compatibility with Net::HTTP in Ruby 2.0.0
145
154
  - Addressable::URI#route_from should always give relative URIs
146
155
 
147
- # Addressable 2.3.4 <a name="v2.3.4">
156
+ ## Addressable 2.3.4 <a name="v2.3.4">
148
157
  - fixed issue with encoding altering its inputs
149
158
  - query string normalization now leaves ';' characters alone
150
159
  - FakeFS is detected before attempting to load unicode tables
151
160
  - additional testing to ensure frozen objects don't cause problems
152
161
 
153
- # Addressable 2.3.3 <a name="v2.3.3">
162
+ ## Addressable 2.3.3 <a name="v2.3.3">
154
163
  - fixed issue with converting common primitives during template expansion
155
164
  - fixed port encoding issue
156
165
  - removed a few warnings
@@ -159,59 +168,59 @@
159
168
  - no template match should now result in nil instead of an empty MatchData
160
169
  - added license information to gemspec
161
170
 
162
- # Addressable 2.3.2 <a name="v2.3.2">
171
+ ## Addressable 2.3.2 <a name="v2.3.2">
163
172
  - added Addressable::URI#default_port method
164
173
  - fixed issue with Marshalling Unicode data on Windows
165
174
  - improved heuristic parsing to better handle IPv4 addresses
166
175
 
167
- # Addressable 2.3.1 <a name="v2.3.1">
176
+ ## Addressable 2.3.1 <a name="v2.3.1">
168
177
  - fixed missing unicode data file
169
178
 
170
- # Addressable 2.3.0 <a name="v2.3.0">
179
+ ## Addressable 2.3.0 <a name="v2.3.0">
171
180
  - updated Addressable::Template to use RFC 6570, level 4
172
181
  - fixed compatibility problems with some versions of Ruby
173
182
  - moved unicode tables into a data file for performance reasons
174
183
  - removing support for multiple query value notations
175
184
 
176
- # Addressable 2.2.8 <a name="v2.2.8">
185
+ ## Addressable 2.2.8 <a name="v2.2.8">
177
186
  - fixed issues with dot segment removal code
178
187
  - form encoding can now handle multiple values per key
179
188
  - updated development environment
180
189
 
181
- # Addressable 2.2.7 <a name="v2.2.7">
190
+ ## Addressable 2.2.7 <a name="v2.2.7">
182
191
  - fixed issues related to Addressable::URI#query_values=
183
192
  - the Addressable::URI.parse method is now polymorphic
184
193
 
185
- # Addressable 2.2.6 <a name="v2.2.6">
194
+ ## Addressable 2.2.6 <a name="v2.2.6">
186
195
  - changed the way ambiguous paths are handled
187
196
  - fixed bug with frozen URIs
188
197
  - https supported in heuristic parsing
189
198
 
190
- # Addressable 2.2.5 <a name="v2.2.5">
199
+ ## Addressable 2.2.5 <a name="v2.2.5">
191
200
  - 'parsing' a pre-parsed URI object is now a dup operation
192
201
  - introduced conditional support for libidn
193
202
  - fixed normalization issue on ampersands in query strings
194
203
  - added additional tests around handling of query strings
195
204
 
196
- # Addressable 2.2.4 <a name="v2.2.4">
205
+ ## Addressable 2.2.4 <a name="v2.2.4">
197
206
  - added origin support from draft-ietf-websec-origin-00
198
207
  - resolved issue with attempting to navigate below root
199
208
  - fixed bug with string splitting in query strings
200
209
 
201
- # Addressable 2.2.3 <a name="v2.2.3">
210
+ ## Addressable 2.2.3 <a name="v2.2.3">
202
211
  - added :flat_array notation for query strings
203
212
 
204
- # Addressable 2.2.2 <a name="v2.2.2">
213
+ ## Addressable 2.2.2 <a name="v2.2.2">
205
214
  - fixed issue with percent escaping of '+' character in query strings
206
215
 
207
- # Addressable 2.2.1 <a name="v2.2.1">
216
+ ## Addressable 2.2.1 <a name="v2.2.1">
208
217
  - added support for application/x-www-form-urlencoded.
209
218
 
210
- # Addressable 2.2.0 <a name="v2.2.0">
219
+ ## Addressable 2.2.0 <a name="v2.2.0">
211
220
  - added site methods
212
221
  - improved documentation
213
222
 
214
- # Addressable 2.1.2 <a name="v2.1.2">
223
+ ## Addressable 2.1.2 <a name="v2.1.2">
215
224
  - added HTTP request URI methods
216
225
  - better handling of Windows file paths
217
226
  - validation_deferred boolean replaced with defer_validation block
@@ -219,14 +228,14 @@
219
228
  - fixed issue with constructing URIs with relative paths
220
229
  - fixed warnings
221
230
 
222
- # Addressable 2.1.1 <a name="v2.1.1">
231
+ ## Addressable 2.1.1 <a name="v2.1.1">
223
232
  - more type checking changes
224
233
  - fixed issue with unicode normalization
225
234
  - added method to find template defaults
226
235
  - symbolic keys are now allowed in template mappings
227
236
  - numeric values and symbolic values are now allowed in template mappings
228
237
 
229
- # Addressable 2.1.0 <a name="v2.1.0">
238
+ ## Addressable 2.1.0 <a name="v2.1.0x">
230
239
  - refactored URI template support out into its own class
231
240
  - removed extract method due to being useless and unreliable
232
241
  - removed Addressable::URI.expand_template
@@ -240,15 +249,15 @@
240
249
  - worked around issue with freezing URIs
241
250
  - improved specs
242
251
 
243
- # Addressable 2.0.2 <a name="v2.0.2">
252
+ ## Addressable 2.0.2 <a name="v2.0.2">
244
253
  - fixed issue with URI template expansion
245
254
  - fixed issue with percent escaping characters 0-15
246
255
 
247
- # Addressable 2.0.1 <a name="v2.0.1">
256
+ ## Addressable 2.0.1 <a name="v2.0.1">
248
257
  - fixed issue with query string assignment
249
258
  - fixed issue with improperly encoded components
250
259
 
251
- # Addressable 2.0.0 <a name="v2.0.0">
260
+ ## Addressable 2.0.0 <a name="v2.0.0">
252
261
  - the initialize method now takes an options hash as its only parameter
253
262
  - added query_values method to URI class
254
263
  - completely replaced IDNA implementation with pure Ruby
@@ -263,20 +272,20 @@
263
272
  - updated URI Template code to match v 03 of the draft spec
264
273
  - added a bunch of new specifications
265
274
 
266
- # Addressable 1.0.4 <a name="v1.0.4">
275
+ ## Addressable 1.0.4 <a name="v1.0.4">
267
276
  - switched to using RSpec's pending system for specs that rely on IDN
268
277
  - fixed issue with creating URIs with paths that are not prefixed with '/'
269
278
 
270
- # Addressable 1.0.3 <a name="v1.0.3">
279
+ ## Addressable 1.0.3 <a name="v1.0.3">
271
280
  - implemented a hash method
272
281
 
273
- # Addressable 1.0.2 <a name="v1.0.2">
282
+ ## Addressable 1.0.2 <a name="v1.0.2">
274
283
  - fixed minor bug with the extract_mapping method
275
284
 
276
- # Addressable 1.0.1 <a name="v1.0.1">
285
+ ## Addressable 1.0.1 <a name="v1.0.1">
277
286
  - fixed minor bug with the extract_mapping method
278
287
 
279
- # Addressable 1.0.0 <a name="v1.0.0">
288
+ ## Addressable 1.0.0 <a name="v1.0.0">
280
289
  - heuristic parse method added
281
290
  - parsing is slightly more strict
282
291
  - replaced to_h with to_hash
@@ -285,16 +294,16 @@
285
294
  - improved heckle rake task
286
295
  - no surviving heckle mutations
287
296
 
288
- # Addressable 0.1.2 <a name="v0.1.2">
297
+ ## Addressable 0.1.2 <a name="v0.1.2">
289
298
  - improved normalization
290
299
  - fixed bug in joining algorithm
291
300
  - updated specifications
292
301
 
293
- # Addressable 0.1.1 <a name="v0.1.1">
302
+ ## Addressable 0.1.1 <a name="v0.1.1">
294
303
  - updated documentation
295
304
  - added URI Template variable extraction
296
305
 
297
- # Addressable 0.1.0 <a name="v0.1.0">
306
+ ## Addressable 0.1.0 <a name="v0.1.0">
298
307
  - initial release
299
308
  - implementation based on RFC 3986, 3987
300
309
  - support for IRIs via libidn
@@ -17,7 +17,7 @@
17
17
  [coveralls]: https://coveralls.io/r/sporkmonger/addressable
18
18
  [inch]: https://inch-ci.org/github/sporkmonger/addressable
19
19
 
20
- # Description
20
+ ## Description
21
21
 
22
22
  Addressable is an alternative implementation to the URI implementation
23
23
  that is part of Ruby's standard library. It is flexible, offers heuristic
@@ -25,12 +25,12 @@ parsing, and additionally provides extensive support for IRIs and URI templates.
25
25
 
26
26
  Addressable closely conforms to RFC 3986, RFC 3987, and RFC 6570 (level 4).
27
27
 
28
- # Reference
28
+ ## Reference
29
29
 
30
30
  - {Addressable::URI}
31
31
  - {Addressable::Template}
32
32
 
33
- # Example usage
33
+ ## Example usage
34
34
 
35
35
  ```ruby
36
36
  require "addressable/uri"
@@ -49,7 +49,7 @@ uri.normalize
49
49
  ```
50
50
 
51
51
 
52
- # URI Templates
52
+ ## URI Templates
53
53
 
54
54
  For more details, see [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.txt).
55
55
 
@@ -88,7 +88,7 @@ template.extract(uri)
88
88
  # }
89
89
  ```
90
90
 
91
- # Install
91
+ ## Install
92
92
 
93
93
  ```console
94
94
  $ gem install addressable
@@ -103,7 +103,7 @@ $ brew install libidn # OS X
103
103
  $ gem install idn-ruby
104
104
  ```
105
105
 
106
- # Semantic Versioning
106
+ ## Semantic Versioning
107
107
 
108
108
  This project uses [Semantic Versioning](https://semver.org/). You can (and should) specify your
109
109
  dependency using a pessimistic version constraint covering the major and minor
@@ -1,15 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: addressable 2.8.7 ruby lib
2
+ # stub: addressable 2.8.8 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "addressable".freeze
6
- s.version = "2.8.7".freeze
6
+ s.version = "2.8.8".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#v2.8.7" } if s.respond_to? :metadata=
9
+ s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.8.8" } if s.respond_to? :metadata=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["Bob Aman".freeze]
12
- s.date = "2024-06-21"
12
+ s.date = "2025-11-24"
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.5.11".freeze
21
+ s.rubygems_version = "3.7.2".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".freeze, "< 7.0".freeze])
26
+ s.add_runtime_dependency(%q<public_suffix>.freeze, [">= 2.0.2".freeze, "< 8.0".freeze])
27
27
  s.add_development_dependency(%q<bundler>.freeze, [">= 1.0".freeze, "< 3.0".freeze])
28
28
  end
@@ -0,0 +1,299 @@
1
+ # JSON implementation for Ruby
2
+
3
+ [![CI](https://github.com/ruby/json/actions/workflows/ci.yml/badge.svg)](https://github.com/ruby/json/actions/workflows/ci.yml)
4
+
5
+ ## Description
6
+
7
+ This is an implementation of the JSON specification according to RFC 7159
8
+ http://www.ietf.org/rfc/rfc7159.txt .
9
+
10
+ The JSON generator generate UTF-8 character sequences by default.
11
+ If an :ascii\_only option with a true value is given, they escape all
12
+ non-ASCII and control characters with \uXXXX escape sequences, and support
13
+ UTF-16 surrogate pairs in order to be able to generate the whole range of
14
+ unicode code points.
15
+
16
+ All strings, that are to be encoded as JSON strings, should be UTF-8 byte
17
+ sequences on the Ruby side. To encode raw binary strings, that aren't UTF-8
18
+ encoded, please use the to\_json\_raw\_object method of String (which produces
19
+ an object, that contains a byte array) and decode the result on the receiving
20
+ endpoint.
21
+
22
+ ## Installation
23
+
24
+ Install the gem and add to the application's Gemfile by executing:
25
+
26
+ $ bundle add json
27
+
28
+ If bundler is not being used to manage dependencies, install the gem by executing:
29
+
30
+ $ gem install json
31
+
32
+ ## Basic Usage
33
+
34
+ To use JSON you can
35
+
36
+ ```ruby
37
+ require 'json'
38
+ ```
39
+
40
+ Now you can parse a JSON document into a ruby data structure by calling
41
+
42
+ ```ruby
43
+ JSON.parse(document)
44
+ ```
45
+
46
+ If you want to generate a JSON document from a ruby data structure call
47
+ ```ruby
48
+ JSON.generate(data)
49
+ ```
50
+
51
+ You can also use the `pretty_generate` method (which formats the output more
52
+ verbosely and nicely) or `fast_generate` (which doesn't do any of the security
53
+ checks generate performs, e. g. nesting deepness checks).
54
+
55
+ ## Casting non native types
56
+
57
+ JSON documents can only support Hashes, Arrays, Strings, Integers and Floats.
58
+
59
+ By default if you attempt to serialize something else, `JSON.generate` will
60
+ search for a `#to_json` method on that object:
61
+
62
+ ```ruby
63
+ Position = Struct.new(:latitude, :longitude) do
64
+ def to_json(state = nil, *)
65
+ JSON::State.from_state(state).generate({
66
+ latitude: latitude,
67
+ longitude: longitude,
68
+ })
69
+ end
70
+ end
71
+
72
+ JSON.generate([
73
+ Position.new(12323.234, 435345.233),
74
+ Position.new(23434.676, 159435.324),
75
+ ]) # => [{"latitude":12323.234,"longitude":435345.233},{"latitude":23434.676,"longitude":159435.324}]
76
+ ```
77
+
78
+ If a `#to_json` method isn't defined on the object, `JSON.generate` will fallback to call `#to_s`:
79
+
80
+ ```ruby
81
+ JSON.generate(Object.new) # => "#<Object:0x000000011e768b98>"
82
+ ```
83
+
84
+ Both of these behavior can be disabled using the `strict: true` option:
85
+
86
+ ```ruby
87
+ JSON.generate(Object.new, strict: true) # => Object not allowed in JSON (JSON::GeneratorError)
88
+ JSON.generate(Position.new(1, 2)) # => Position not allowed in JSON (JSON::GeneratorError)
89
+ ```
90
+
91
+ ## JSON::Coder
92
+
93
+ Since `#to_json` methods are global, it can sometimes be problematic if you need a given type to be
94
+ serialized in different ways in different locations.
95
+
96
+ Instead it is recommended to use the newer `JSON::Coder` API:
97
+
98
+ ```ruby
99
+ module MyApp
100
+ API_JSON_CODER = JSON::Coder.new do |object, is_object_key|
101
+ case object
102
+ when Time
103
+ object.iso8601(3)
104
+ else
105
+ object
106
+ end
107
+ end
108
+ end
109
+
110
+ puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z"
111
+ ```
112
+
113
+ The provided block is called for all objects that don't have a native JSON equivalent, and
114
+ must return a Ruby object that has a native JSON equivalent.
115
+
116
+ It is also called for objects that do have a JSON equivalent, but are used as Hash keys, for instance `{ 1 => 2}`,
117
+ as well as for strings that aren't valid UTF-8:
118
+
119
+ ```ruby
120
+ coder = JSON::Combining.new do |object, is_object_key|
121
+ case object
122
+ when String
123
+ if !string.valid_encoding? || string.encoding != Encoding::UTF_8
124
+ Base64.encode64(string)
125
+ else
126
+ string
127
+ end
128
+ else
129
+ object
130
+ end
131
+ end
132
+ ```
133
+
134
+ ## Combining JSON fragments
135
+
136
+ To combine JSON fragments into a bigger JSON document, you can use `JSON::Fragment`:
137
+
138
+ ```ruby
139
+ posts_json = cache.fetch_multi(post_ids) do |post_id|
140
+ JSON.generate(Post.find(post_id))
141
+ end
142
+ posts_json.map! { |post_json| JSON::Fragment.new(post_json) }
143
+ JSON.generate({ posts: posts_json, count: posts_json.count })
144
+ ```
145
+
146
+ ## Round-tripping arbitrary types
147
+
148
+ > [!CAUTION]
149
+ > You should never use `JSON.unsafe_load` nor `JSON.parse(str, create_additions: true)` to parse untrusted user input,
150
+ > as it can lead to remote code execution vulnerabilities.
151
+
152
+ To create a JSON document from a ruby data structure, you can call
153
+ `JSON.generate` like that:
154
+
155
+ ```ruby
156
+ json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
157
+ # => "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]"
158
+ ```
159
+
160
+ To get back a ruby data structure from a JSON document, you have to call
161
+ JSON.parse on it:
162
+
163
+ ```ruby
164
+ JSON.parse json
165
+ # => [1, 2, {"a"=>3.141}, false, true, nil, "4..10"]
166
+ ```
167
+
168
+ Note, that the range from the original data structure is a simple
169
+ string now. The reason for this is, that JSON doesn't support ranges
170
+ or arbitrary classes. In this case the json library falls back to call
171
+ `Object#to_json`, which is the same as `#to_s.to_json`.
172
+
173
+ It's possible to add JSON support serialization to arbitrary classes by
174
+ simply implementing a more specialized version of the `#to_json method`, that
175
+ should return a JSON object (a hash converted to JSON with `#to_json`) like
176
+ this (don't forget the `*a` for all the arguments):
177
+
178
+ ```ruby
179
+ class Range
180
+ def to_json(*a)
181
+ {
182
+ 'json_class' => self.class.name, # = 'Range'
183
+ 'data' => [ first, last, exclude_end? ]
184
+ }.to_json(*a)
185
+ end
186
+ end
187
+ ```
188
+
189
+ The hash key `json_class` is the class, that will be asked to deserialise the
190
+ JSON representation later. In this case it's `Range`, but any namespace of
191
+ the form `A::B` or `::A::B` will do. All other keys are arbitrary and can be
192
+ used to store the necessary data to configure the object to be deserialised.
193
+
194
+ If the key `json_class` is found in a JSON object, the JSON parser checks
195
+ if the given class responds to the `json_create` class method. If so, it is
196
+ called with the JSON object converted to a Ruby hash. So a range can
197
+ be deserialised by implementing `Range.json_create` like this:
198
+
199
+ ```ruby
200
+ class Range
201
+ def self.json_create(o)
202
+ new(*o['data'])
203
+ end
204
+ end
205
+ ```
206
+
207
+ Now it possible to serialise/deserialise ranges as well:
208
+
209
+ ```ruby
210
+ json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
211
+ # => "[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[4,10,false]}]"
212
+ JSON.parse json
213
+ # => [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
214
+ json = JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
215
+ # => "[1,2,{\"a\":3.141},false,true,null,{\"json_class\":\"Range\",\"data\":[4,10,false]}]"
216
+ JSON.unsafe_load json
217
+ # => [1, 2, {"a"=>3.141}, false, true, nil, 4..10]
218
+ ```
219
+
220
+ `JSON.generate` always creates the shortest possible string representation of a
221
+ ruby data structure in one line. This is good for data storage or network
222
+ protocols, but not so good for humans to read. Fortunately there's also
223
+ `JSON.pretty_generate` (or `JSON.pretty_generate`) that creates a more readable
224
+ output:
225
+
226
+ ```ruby
227
+ puts JSON.pretty_generate([1, 2, {"a"=>3.141}, false, true, nil, 4..10])
228
+ [
229
+ 1,
230
+ 2,
231
+ {
232
+ "a": 3.141
233
+ },
234
+ false,
235
+ true,
236
+ null,
237
+ {
238
+ "json_class": "Range",
239
+ "data": [
240
+ 4,
241
+ 10,
242
+ false
243
+ ]
244
+ }
245
+ ]
246
+ ```
247
+
248
+ There are also the methods `Kernel#j` for generate, and `Kernel#jj` for
249
+ `pretty_generate` output to the console, that work analogous to Core Ruby's `p` and
250
+ the `pp` library's `pp` methods.
251
+
252
+ ## Development
253
+
254
+ ### Prerequisites
255
+
256
+ 1. Clone the repository
257
+ 2. Install dependencies with `bundle install`
258
+
259
+ ### Testing
260
+
261
+ The full test suite can be run with:
262
+
263
+ ```bash
264
+ bundle exec rake test
265
+ ```
266
+
267
+ ### Release
268
+
269
+ Update the `lib/json/version.rb` file.
270
+
271
+ ```
272
+ rbenv shell 2.6.5
273
+ rake build
274
+ gem push pkg/json-2.3.0.gem
275
+
276
+ rbenv shell jruby-9.2.9.0
277
+ rake build
278
+ gem push pkg/json-2.3.0-java.gem
279
+ ```
280
+
281
+ ## Author
282
+
283
+ Florian Frank <mailto:flori@ping.de>
284
+
285
+ ## License
286
+
287
+ Ruby License, see https://www.ruby-lang.org/en/about/license.txt.
288
+
289
+ ## Download
290
+
291
+ The latest version of this library can be downloaded at
292
+
293
+ * https://rubygems.org/gems/json
294
+
295
+ Online Documentation should be located at
296
+
297
+ * https://www.rubydoc.info/gems/json
298
+
299
+ [Ragel]: http://www.colm.net/open-source/ragel/