addressable 2.8.2 → 2.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b18375911dede706411b9ec0d6c8b104e9f49a2ebf53ea18d89aec89a349d8f2
4
- data.tar.gz: 4701c220482e3e92a10ebe9605ecb03fcf5d295bbef20346aeb49fdfbab4bbb3
3
+ metadata.gz: 840ea726b6e004eb1de70a362907bd86cecb0e964f0ed149252a2302c0048756
4
+ data.tar.gz: 6590611472bebb1e7c783f5f8e2e9c6c1fb5266017bba33a1cb34c4ce6c10bcb
5
5
  SHA512:
6
- metadata.gz: 8e6c9605ceec0aa65ceb3b4a1152d9c89830f1748e20c6667746634a9952a13fcff404ec1783f904e9240d642b11e2907914d43581fd8c451971c48106e70710
7
- data.tar.gz: 7865e8accde73f97022353c51e9556f7f1f1786ed2e004789a9c4e5ffa82486ae2abe17166fa724f2bf17b8e853e40f185abf0ee16a4108aca712c202540b3e2
6
+ metadata.gz: fd7ec4ba810a0c160df99622e4198687cde10124a28a65b1193d2a7760d6660b3518028f06a686648fb0b57881d8f68f30a61162f100d4974f2ffc612373dcb6
7
+ data.tar.gz: 5be14161f50be1dc3d766ee69027740f667672ee0b22ee2dd727bace6c0c6f5999de641bdfc516dbbbf3fb9d458be2499454e6e3d12b572cb923eba0f47e735b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # Addressable 2.8.3
2
+ - Fix template expand level 2 hash support for non-string objects ([#499], [#498])
3
+
4
+ [#499]: https://github.com/sporkmonger/addressable/pull/499
5
+ [#498]: https://github.com/sporkmonger/addressable/pull/498
6
+
1
7
  # Addressable 2.8.2
2
8
  - Improve cache hits and JIT friendliness ([#486](https://github.com/sporkmonger/addressable/pull/486))
3
9
  - Improve code style and test coverage ([#482](https://github.com/sporkmonger/addressable/pull/482))
data/addressable.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: addressable 2.8.2 ruby lib
2
+ # stub: addressable 2.8.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "addressable".freeze
6
- s.version = "2.8.2"
6
+ s.version = "2.8.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md" } if s.respond_to? :metadata=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["Bob Aman".freeze]
12
- s.date = "2023-04-01"
12
+ s.date = "2023-04-04"
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]
@@ -896,19 +896,16 @@ module Addressable
896
896
  #
897
897
  # @return [Hash, Array, String] The normalized values
898
898
  def normalize_value(value)
899
- unless value.is_a?(Hash)
900
- value = value.respond_to?(:to_ary) ? value.to_ary : value.to_str
901
- end
902
-
903
899
  # Handle unicode normalization
904
- if value.kind_of?(Array)
905
- value.map! { |val| normalize_value(val) }
900
+ if value.respond_to?(:to_ary)
901
+ value.to_ary.map! { |val| normalize_value(val) }
906
902
  elsif value.kind_of?(Hash)
907
903
  value = value.inject({}) { |acc, (k, v)|
908
904
  acc[normalize_value(k)] = normalize_value(v)
909
905
  acc
910
906
  }
911
907
  else
908
+ value = value.to_s if !value.kind_of?(String)
912
909
  if value.encoding != Encoding::UTF_8
913
910
  value = value.dup.force_encoding(Encoding::UTF_8)
914
911
  end
@@ -23,7 +23,7 @@ if !defined?(Addressable::VERSION)
23
23
  module VERSION
24
24
  MAJOR = 2
25
25
  MINOR = 8
26
- TINY = 2
26
+ TINY = 3
27
27
 
28
28
  STRING = [MAJOR, MINOR, TINY].join('.')
29
29
  end
@@ -26,11 +26,7 @@ shared_examples_for 'expands' do |tests|
26
26
  exp = expansion.is_a?(Array) ? expansion.first : expansion
27
27
  it "#{template} to #{exp}" do
28
28
  tmpl = Addressable::Template.new(template).expand(subject)
29
- if expansion.is_a?(Array)
30
- expect(expansion.any?{|i| i == tmpl.to_str}).to be true
31
- else
32
- expect(tmpl.to_str).to eq(expansion)
33
- end
29
+ expect(tmpl.to_str).to eq(expansion)
34
30
  end
35
31
  end
36
32
  end
@@ -209,7 +205,7 @@ describe "Level 4" do
209
205
  :path => "/foo/bar",
210
206
  :semi => ";",
211
207
  :list => %w(red green blue),
212
- :keys => {"semi" => ';', "dot" => '.', "comma" => ','}
208
+ :keys => {"semi" => ';', "dot" => '.', :comma => ','}
213
209
  }
214
210
  }
215
211
  context "Expansion with value modifiers" do
@@ -218,22 +214,8 @@ describe "Level 4" do
218
214
  '{var:30}' => 'value',
219
215
  '{list}' => 'red,green,blue',
220
216
  '{list*}' => 'red,green,blue',
221
- '{keys}' => [
222
- 'semi,%3B,dot,.,comma,%2C',
223
- 'dot,.,semi,%3B,comma,%2C',
224
- 'comma,%2C,semi,%3B,dot,.',
225
- 'semi,%3B,comma,%2C,dot,.',
226
- 'dot,.,comma,%2C,semi,%3B',
227
- 'comma,%2C,dot,.,semi,%3B'
228
- ],
229
- '{keys*}' => [
230
- 'semi=%3B,dot=.,comma=%2C',
231
- 'dot=.,semi=%3B,comma=%2C',
232
- 'comma=%2C,semi=%3B,dot=.',
233
- 'semi=%3B,comma=%2C,dot=.',
234
- 'dot=.,comma=%2C,semi=%3B',
235
- 'comma=%2C,dot=.,semi=%3B'
236
- ]
217
+ '{keys}' => 'semi,%3B,dot,.,comma,%2C',
218
+ '{keys*}' => 'semi=%3B,dot=.,comma=%2C',
237
219
  }
238
220
  end
239
221
  context "Operator + with value modifiers" do
@@ -241,22 +223,8 @@ describe "Level 4" do
241
223
  '{+path:6}/here' => '/foo/b/here',
242
224
  '{+list}' => 'red,green,blue',
243
225
  '{+list*}' => 'red,green,blue',
244
- '{+keys}' => [
245
- 'semi,;,dot,.,comma,,',
246
- 'dot,.,semi,;,comma,,',
247
- 'comma,,,semi,;,dot,.',
248
- 'semi,;,comma,,,dot,.',
249
- 'dot,.,comma,,,semi,;',
250
- 'comma,,,dot,.,semi,;'
251
- ],
252
- '{+keys*}' => [
253
- 'semi=;,dot=.,comma=,',
254
- 'dot=.,semi=;,comma=,',
255
- 'comma=,,semi=;,dot=.',
256
- 'semi=;,comma=,,dot=.',
257
- 'dot=.,comma=,,semi=;',
258
- 'comma=,,dot=.,semi=;'
259
- ]
226
+ '{+keys}' => 'semi,;,dot,.,comma,,',
227
+ '{+keys*}' => 'semi=;,dot=.,comma=,',
260
228
  }
261
229
  end
262
230
  context "Operator # with value modifiers" do
@@ -264,22 +232,8 @@ describe "Level 4" do
264
232
  '{#path:6}/here' => '#/foo/b/here',
265
233
  '{#list}' => '#red,green,blue',
266
234
  '{#list*}' => '#red,green,blue',
267
- '{#keys}' => [
268
- '#semi,;,dot,.,comma,,',
269
- '#dot,.,semi,;,comma,,',
270
- '#comma,,,semi,;,dot,.',
271
- '#semi,;,comma,,,dot,.',
272
- '#dot,.,comma,,,semi,;',
273
- '#comma,,,dot,.,semi,;'
274
- ],
275
- '{#keys*}' => [
276
- '#semi=;,dot=.,comma=,',
277
- '#dot=.,semi=;,comma=,',
278
- '#comma=,,semi=;,dot=.',
279
- '#semi=;,comma=,,dot=.',
280
- '#dot=.,comma=,,semi=;',
281
- '#comma=,,dot=.,semi=;'
282
- ]
235
+ '{#keys}' => '#semi,;,dot,.,comma,,',
236
+ '{#keys*}' => '#semi=;,dot=.,comma=,',
283
237
  }
284
238
  end
285
239
  context "Operator . with value modifiers" do
@@ -287,22 +241,8 @@ describe "Level 4" do
287
241
  'X{.var:3}' => 'X.val',
288
242
  'X{.list}' => 'X.red,green,blue',
289
243
  'X{.list*}' => 'X.red.green.blue',
290
- 'X{.keys}' => [
291
- 'X.semi,%3B,dot,.,comma,%2C',
292
- 'X.dot,.,semi,%3B,comma,%2C',
293
- 'X.comma,%2C,semi,%3B,dot,.',
294
- 'X.semi,%3B,comma,%2C,dot,.',
295
- 'X.dot,.,comma,%2C,semi,%3B',
296
- 'X.comma,%2C,dot,.,semi,%3B'
297
- ],
298
- 'X{.keys*}' => [
299
- 'X.semi=%3B.dot=..comma=%2C',
300
- 'X.dot=..semi=%3B.comma=%2C',
301
- 'X.comma=%2C.semi=%3B.dot=.',
302
- 'X.semi=%3B.comma=%2C.dot=.',
303
- 'X.dot=..comma=%2C.semi=%3B',
304
- 'X.comma=%2C.dot=..semi=%3B'
305
- ]
244
+ 'X{.keys}' => 'X.semi,%3B,dot,.,comma,%2C',
245
+ 'X{.keys*}' => 'X.semi=%3B.dot=..comma=%2C',
306
246
  }
307
247
  end
308
248
  context "Operator / with value modifiers" do
@@ -311,22 +251,8 @@ describe "Level 4" do
311
251
  '{/list}' => '/red,green,blue',
312
252
  '{/list*}' => '/red/green/blue',
313
253
  '{/list*,path:4}' => '/red/green/blue/%2Ffoo',
314
- '{/keys}' => [
315
- '/semi,%3B,dot,.,comma,%2C',
316
- '/dot,.,semi,%3B,comma,%2C',
317
- '/comma,%2C,semi,%3B,dot,.',
318
- '/semi,%3B,comma,%2C,dot,.',
319
- '/dot,.,comma,%2C,semi,%3B',
320
- '/comma,%2C,dot,.,semi,%3B'
321
- ],
322
- '{/keys*}' => [
323
- '/semi=%3B/dot=./comma=%2C',
324
- '/dot=./semi=%3B/comma=%2C',
325
- '/comma=%2C/semi=%3B/dot=.',
326
- '/semi=%3B/comma=%2C/dot=.',
327
- '/dot=./comma=%2C/semi=%3B',
328
- '/comma=%2C/dot=./semi=%3B'
329
- ]
254
+ '{/keys}' => '/semi,%3B,dot,.,comma,%2C',
255
+ '{/keys*}' => '/semi=%3B/dot=./comma=%2C',
330
256
  }
331
257
  end
332
258
  context "Operator ; with value modifiers" do
@@ -334,22 +260,8 @@ describe "Level 4" do
334
260
  '{;hello:5}' => ';hello=Hello',
335
261
  '{;list}' => ';list=red,green,blue',
336
262
  '{;list*}' => ';list=red;list=green;list=blue',
337
- '{;keys}' => [
338
- ';keys=semi,%3B,dot,.,comma,%2C',
339
- ';keys=dot,.,semi,%3B,comma,%2C',
340
- ';keys=comma,%2C,semi,%3B,dot,.',
341
- ';keys=semi,%3B,comma,%2C,dot,.',
342
- ';keys=dot,.,comma,%2C,semi,%3B',
343
- ';keys=comma,%2C,dot,.,semi,%3B'
344
- ],
345
- '{;keys*}' => [
346
- ';semi=%3B;dot=.;comma=%2C',
347
- ';dot=.;semi=%3B;comma=%2C',
348
- ';comma=%2C;semi=%3B;dot=.',
349
- ';semi=%3B;comma=%2C;dot=.',
350
- ';dot=.;comma=%2C;semi=%3B',
351
- ';comma=%2C;dot=.;semi=%3B'
352
- ]
263
+ '{;keys}' => ';keys=semi,%3B,dot,.,comma,%2C',
264
+ '{;keys*}' => ';semi=%3B;dot=.;comma=%2C',
353
265
  }
354
266
  end
355
267
  context "Operator ? with value modifiers" do
@@ -357,22 +269,8 @@ describe "Level 4" do
357
269
  '{?var:3}' => '?var=val',
358
270
  '{?list}' => '?list=red,green,blue',
359
271
  '{?list*}' => '?list=red&list=green&list=blue',
360
- '{?keys}' => [
361
- '?keys=semi,%3B,dot,.,comma,%2C',
362
- '?keys=dot,.,semi,%3B,comma,%2C',
363
- '?keys=comma,%2C,semi,%3B,dot,.',
364
- '?keys=semi,%3B,comma,%2C,dot,.',
365
- '?keys=dot,.,comma,%2C,semi,%3B',
366
- '?keys=comma,%2C,dot,.,semi,%3B'
367
- ],
368
- '{?keys*}' => [
369
- '?semi=%3B&dot=.&comma=%2C',
370
- '?dot=.&semi=%3B&comma=%2C',
371
- '?comma=%2C&semi=%3B&dot=.',
372
- '?semi=%3B&comma=%2C&dot=.',
373
- '?dot=.&comma=%2C&semi=%3B',
374
- '?comma=%2C&dot=.&semi=%3B'
375
- ]
272
+ '{?keys}' => '?keys=semi,%3B,dot,.,comma,%2C',
273
+ '{?keys*}' => '?semi=%3B&dot=.&comma=%2C',
376
274
  }
377
275
  end
378
276
  context "Operator & with value modifiers" do
@@ -380,22 +278,8 @@ describe "Level 4" do
380
278
  '{&var:3}' => '&var=val',
381
279
  '{&list}' => '&list=red,green,blue',
382
280
  '{&list*}' => '&list=red&list=green&list=blue',
383
- '{&keys}' => [
384
- '&keys=semi,%3B,dot,.,comma,%2C',
385
- '&keys=dot,.,semi,%3B,comma,%2C',
386
- '&keys=comma,%2C,semi,%3B,dot,.',
387
- '&keys=semi,%3B,comma,%2C,dot,.',
388
- '&keys=dot,.,comma,%2C,semi,%3B',
389
- '&keys=comma,%2C,dot,.,semi,%3B'
390
- ],
391
- '{&keys*}' => [
392
- '&semi=%3B&dot=.&comma=%2C',
393
- '&dot=.&semi=%3B&comma=%2C',
394
- '&comma=%2C&semi=%3B&dot=.',
395
- '&semi=%3B&comma=%2C&dot=.',
396
- '&dot=.&comma=%2C&semi=%3B',
397
- '&comma=%2C&dot=.&semi=%3B'
398
- ]
281
+ '{&keys}' => '&keys=semi,%3B,dot,.,comma,%2C',
282
+ '{&keys*}' => '&semi=%3B&dot=.&comma=%2C',
399
283
  }
400
284
  end
401
285
  end
@@ -404,7 +288,7 @@ describe "Modifiers" do
404
288
  {
405
289
  :var => "value",
406
290
  :semi => ";",
407
- :year => %w(1965 2000 2012),
291
+ :year => [1965, 2000, 2012],
408
292
  :dom => %w(example com)
409
293
  }
410
294
  }
@@ -437,7 +321,7 @@ describe "Expansion" do
437
321
  :base => "http://example.com/home/",
438
322
  :path => "/foo/bar",
439
323
  :list => ["red", "green", "blue"],
440
- :keys => {"semi" => ";","dot" => ".","comma" => ","},
324
+ :keys => {"semi" => ";","dot" => ".",:comma => ","},
441
325
  :v => "6",
442
326
  :x => "1024",
443
327
  :y => "768",
@@ -475,22 +359,8 @@ describe "Expansion" do
475
359
  '{var:30}' => 'value',
476
360
  '{list}' => 'red,green,blue',
477
361
  '{list*}' => 'red,green,blue',
478
- '{keys}' => [
479
- 'semi,%3B,dot,.,comma,%2C',
480
- 'dot,.,semi,%3B,comma,%2C',
481
- 'comma,%2C,semi,%3B,dot,.',
482
- 'semi,%3B,comma,%2C,dot,.',
483
- 'dot,.,comma,%2C,semi,%3B',
484
- 'comma,%2C,dot,.,semi,%3B'
485
- ],
486
- '{keys*}' => [
487
- 'semi=%3B,dot=.,comma=%2C',
488
- 'dot=.,semi=%3B,comma=%2C',
489
- 'comma=%2C,semi=%3B,dot=.',
490
- 'semi=%3B,comma=%2C,dot=.',
491
- 'dot=.,comma=%2C,semi=%3B',
492
- 'comma=%2C,dot=.,semi=%3B'
493
- ]
362
+ '{keys}' => 'semi,%3B,dot,.,comma,%2C',
363
+ '{keys*}' => 'semi=%3B,dot=.,comma=%2C',
494
364
  }
495
365
  end
496
366
  context "reserved expansion (+)" do
@@ -510,22 +380,8 @@ describe "Expansion" do
510
380
  '{+path:6}/here' => '/foo/b/here',
511
381
  '{+list}' => 'red,green,blue',
512
382
  '{+list*}' => 'red,green,blue',
513
- '{+keys}' => [
514
- 'semi,;,dot,.,comma,,',
515
- 'dot,.,semi,;,comma,,',
516
- 'comma,,,semi,;,dot,.',
517
- 'semi,;,comma,,,dot,.',
518
- 'dot,.,comma,,,semi,;',
519
- 'comma,,,dot,.,semi,;'
520
- ],
521
- '{+keys*}' => [
522
- 'semi=;,dot=.,comma=,',
523
- 'dot=.,semi=;,comma=,',
524
- 'comma=,,semi=;,dot=.',
525
- 'semi=;,comma=,,dot=.',
526
- 'dot=.,comma=,,semi=;',
527
- 'comma=,,dot=.,semi=;'
528
- ]
383
+ '{+keys}' => 'semi,;,dot,.,comma,,',
384
+ '{+keys*}' => 'semi=;,dot=.,comma=,',
529
385
  }
530
386
  end
531
387
  context "fragment expansion (#)" do
@@ -540,22 +396,8 @@ describe "Expansion" do
540
396
  '{#path:6}/here' => '#/foo/b/here',
541
397
  '{#list}' => '#red,green,blue',
542
398
  '{#list*}' => '#red,green,blue',
543
- '{#keys}' => [
544
- '#semi,;,dot,.,comma,,',
545
- '#dot,.,semi,;,comma,,',
546
- '#comma,,,semi,;,dot,.',
547
- '#semi,;,comma,,,dot,.',
548
- '#dot,.,comma,,,semi,;',
549
- '#comma,,,dot,.,semi,;'
550
- ],
551
- '{#keys*}' => [
552
- '#semi=;,dot=.,comma=,',
553
- '#dot=.,semi=;,comma=,',
554
- '#comma=,,semi=;,dot=.',
555
- '#semi=;,comma=,,dot=.',
556
- '#dot=.,comma=,,semi=;',
557
- '#comma=,,dot=.,semi=;'
558
- ]
399
+ '{#keys}' => '#semi,;,dot,.,comma,,',
400
+ '{#keys*}' => '#semi=;,dot=.,comma=,',
559
401
  }
560
402
  end
561
403
  context "label expansion (.)" do
@@ -570,22 +412,8 @@ describe "Expansion" do
570
412
  'X{.var:3}' => 'X.val',
571
413
  'X{.list}' => 'X.red,green,blue',
572
414
  'X{.list*}' => 'X.red.green.blue',
573
- 'X{.keys}' => [
574
- 'X.semi,%3B,dot,.,comma,%2C',
575
- 'X.dot,.,semi,%3B,comma,%2C',
576
- 'X.comma,%2C,semi,%3B,dot,.',
577
- 'X.semi,%3B,comma,%2C,dot,.',
578
- 'X.dot,.,comma,%2C,semi,%3B',
579
- 'X.comma,%2C,dot,.,semi,%3B'
580
- ],
581
- 'X{.keys*}' => [
582
- 'X.semi=%3B.dot=..comma=%2C',
583
- 'X.dot=..semi=%3B.comma=%2C',
584
- 'X.comma=%2C.semi=%3B.dot=.',
585
- 'X.semi=%3B.comma=%2C.dot=.',
586
- 'X.dot=..comma=%2C.semi=%3B',
587
- 'X.comma=%2C.dot=..semi=%3B'
588
- ],
415
+ 'X{.keys}' => 'X.semi,%3B,dot,.,comma,%2C',
416
+ 'X{.keys*}' => 'X.semi=%3B.dot=..comma=%2C',
589
417
  'X{.empty_keys}' => 'X',
590
418
  'X{.empty_keys*}' => 'X'
591
419
  }
@@ -604,22 +432,8 @@ describe "Expansion" do
604
432
  '{/list}' => '/red,green,blue',
605
433
  '{/list*}' => '/red/green/blue',
606
434
  '{/list*,path:4}' => '/red/green/blue/%2Ffoo',
607
- '{/keys}' => [
608
- '/semi,%3B,dot,.,comma,%2C',
609
- '/dot,.,semi,%3B,comma,%2C',
610
- '/comma,%2C,semi,%3B,dot,.',
611
- '/semi,%3B,comma,%2C,dot,.',
612
- '/dot,.,comma,%2C,semi,%3B',
613
- '/comma,%2C,dot,.,semi,%3B'
614
- ],
615
- '{/keys*}' => [
616
- '/semi=%3B/dot=./comma=%2C',
617
- '/dot=./semi=%3B/comma=%2C',
618
- '/comma=%2C/semi=%3B/dot=.',
619
- '/semi=%3B/comma=%2C/dot=.',
620
- '/dot=./comma=%2C/semi=%3B',
621
- '/comma=%2C/dot=./semi=%3B'
622
- ]
435
+ '{/keys}' => '/semi,%3B,dot,.,comma,%2C',
436
+ '{/keys*}' => '/semi=%3B/dot=./comma=%2C',
623
437
  }
624
438
  end
625
439
  context "path-style expansion (;)" do
@@ -635,22 +449,8 @@ describe "Expansion" do
635
449
  '{;hello:5}' => ';hello=Hello',
636
450
  '{;list}' => ';list=red,green,blue',
637
451
  '{;list*}' => ';list=red;list=green;list=blue',
638
- '{;keys}' => [
639
- ';keys=semi,%3B,dot,.,comma,%2C',
640
- ';keys=dot,.,semi,%3B,comma,%2C',
641
- ';keys=comma,%2C,semi,%3B,dot,.',
642
- ';keys=semi,%3B,comma,%2C,dot,.',
643
- ';keys=dot,.,comma,%2C,semi,%3B',
644
- ';keys=comma,%2C,dot,.,semi,%3B'
645
- ],
646
- '{;keys*}' => [
647
- ';semi=%3B;dot=.;comma=%2C',
648
- ';dot=.;semi=%3B;comma=%2C',
649
- ';comma=%2C;semi=%3B;dot=.',
650
- ';semi=%3B;comma=%2C;dot=.',
651
- ';dot=.;comma=%2C;semi=%3B',
652
- ';comma=%2C;dot=.;semi=%3B'
653
- ]
452
+ '{;keys}' => ';keys=semi,%3B,dot,.,comma,%2C',
453
+ '{;keys*}' => ';semi=%3B;dot=.;comma=%2C',
654
454
  }
655
455
  end
656
456
  context "form query expansion (?)" do
@@ -663,22 +463,8 @@ describe "Expansion" do
663
463
  '{?var:3}' => '?var=val',
664
464
  '{?list}' => '?list=red,green,blue',
665
465
  '{?list*}' => '?list=red&list=green&list=blue',
666
- '{?keys}' => [
667
- '?keys=semi,%3B,dot,.,comma,%2C',
668
- '?keys=dot,.,semi,%3B,comma,%2C',
669
- '?keys=comma,%2C,semi,%3B,dot,.',
670
- '?keys=semi,%3B,comma,%2C,dot,.',
671
- '?keys=dot,.,comma,%2C,semi,%3B',
672
- '?keys=comma,%2C,dot,.,semi,%3B'
673
- ],
674
- '{?keys*}' => [
675
- '?semi=%3B&dot=.&comma=%2C',
676
- '?dot=.&semi=%3B&comma=%2C',
677
- '?comma=%2C&semi=%3B&dot=.',
678
- '?semi=%3B&comma=%2C&dot=.',
679
- '?dot=.&comma=%2C&semi=%3B',
680
- '?comma=%2C&dot=.&semi=%3B'
681
- ]
466
+ '{?keys}' => '?keys=semi,%3B,dot,.,comma,%2C',
467
+ '{?keys*}' => '?semi=%3B&dot=.&comma=%2C',
682
468
  }
683
469
  end
684
470
  context "form query expansion (&)" do
@@ -691,22 +477,8 @@ describe "Expansion" do
691
477
  '{&var:3}' => '&var=val',
692
478
  '{&list}' => '&list=red,green,blue',
693
479
  '{&list*}' => '&list=red&list=green&list=blue',
694
- '{&keys}' => [
695
- '&keys=semi,%3B,dot,.,comma,%2C',
696
- '&keys=dot,.,semi,%3B,comma,%2C',
697
- '&keys=comma,%2C,semi,%3B,dot,.',
698
- '&keys=semi,%3B,comma,%2C,dot,.',
699
- '&keys=dot,.,comma,%2C,semi,%3B',
700
- '&keys=comma,%2C,dot,.,semi,%3B'
701
- ],
702
- '{&keys*}' => [
703
- '&semi=%3B&dot=.&comma=%2C',
704
- '&dot=.&semi=%3B&comma=%2C',
705
- '&comma=%2C&semi=%3B&dot=.',
706
- '&semi=%3B&comma=%2C&dot=.',
707
- '&dot=.&comma=%2C&semi=%3B',
708
- '&comma=%2C&dot=.&semi=%3B'
709
- ]
480
+ '{&keys}' => '&keys=semi,%3B,dot,.,comma,%2C',
481
+ '{&keys*}' => '&semi=%3B&dot=.&comma=%2C',
710
482
  }
711
483
  end
712
484
  context "non-string key in match data" do
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.2
4
+ version: 2.8.3
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-04-01 00:00:00.000000000 Z
11
+ date: 2023-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: public_suffix