iri 0.11.3 → 0.11.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 755164c02f8e3eedb0f619456647a34b6afa2fbe3a9952a9c0713ace19d3f65f
4
- data.tar.gz: 13c6308b1efc04762c72bc7de6a4301eb0b8699b75738827b79b601fadc99a7e
3
+ metadata.gz: 954071d3530c678879761bb88cb8b62b9cec4d2859fbd1b3eea21e030d412a5e
4
+ data.tar.gz: 4d1076ef2dd1bc1ef804a5df31793d45e021140e98ecf5cc5c80677a48e5f96f
5
5
  SHA512:
6
- metadata.gz: 291cd47c6d1a44ff2fa6d9bc962ddff66457e4363c6595d9993170ee8446d30948e5aee0a950993558fe143f0a2eadc0052e5774a66be7325e63d822e2467838
7
- data.tar.gz: e5bcfba5c59c5bb0bea31e00e609751654c982853aa756eb5e522bc9998066f6999a83ecf440b1a3bbbc8bdc935cec2b3a423640c5d4eb581894a52f8063c07a
6
+ metadata.gz: 56abcf6044957b2cabecb1f4b63e405514cb2fd9143a387d0e47678470fe4fe7cf178ee681737cf6c93a48ea0cbf23866d5a73b85f216ce365b01106da15ebee
7
+ data.tar.gz: '0488f1643bfe812abcd6bd387117060d18b1c5612b675af76a52a2b9b83f620565ca4dd944132405773cb6f749b274813d70d345c300a0db86ef6a1dc1327a56'
data/Gemfile CHANGED
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # SPDX-FileCopyrightText: Copyright (c) 2019-2025 Yegor Bugayenko
3
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2026 Yegor Bugayenko
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
6
  source 'https://rubygems.org'
7
7
  gemspec
8
8
 
9
- gem 'minitest', '~>5.25', require: false
9
+ gem 'minitest', '~>6.0', require: false
10
10
  gem 'minitest-reporters', '~>1.7', require: false
11
11
  gem 'rake', '~>13.2', require: false
12
- gem 'rdoc', '6.15.0', require: false # GPL
12
+ gem 'rdoc', '7.0.3', require: false # GPL
13
13
  gem 'rubocop', '~>1.74', require: false
14
14
  gem 'rubocop-minitest', '~>0.38', require: false
15
15
  gem 'rubocop-performance', '~>1.25', require: false
data/Gemfile.lock CHANGED
@@ -9,13 +9,14 @@ GEM
9
9
  ansi (1.5.0)
10
10
  ast (2.4.3)
11
11
  builder (3.3.0)
12
- date (3.5.0)
12
+ date (3.5.1)
13
13
  docile (1.4.1)
14
- erb (6.0.0)
15
- json (2.16.0)
14
+ erb (6.0.1)
15
+ json (2.18.0)
16
16
  language_server-protocol (3.17.0.5)
17
17
  lint_roller (1.1.0)
18
- minitest (5.26.1)
18
+ minitest (6.0.1)
19
+ prism (~> 1.5)
19
20
  minitest-reporters (1.7.1)
20
21
  ansi
21
22
  builder
@@ -25,20 +26,20 @@ GEM
25
26
  parser (3.3.10.0)
26
27
  ast (~> 2.4.1)
27
28
  racc
28
- prism (1.6.0)
29
- psych (5.2.6)
29
+ prism (1.7.0)
30
+ psych (5.3.1)
30
31
  date
31
32
  stringio
32
33
  racc (1.8.1)
33
34
  rainbow (3.1.1)
34
35
  rake (13.3.1)
35
- rdoc (6.15.0)
36
+ rdoc (7.0.3)
36
37
  erb
37
38
  psych (>= 4.0.0)
38
39
  tsort
39
40
  regexp_parser (2.11.3)
40
41
  rexml (3.4.4)
41
- rubocop (1.81.7)
42
+ rubocop (1.82.1)
42
43
  json (~> 2.3)
43
44
  language_server-protocol (~> 3.17.0.2)
44
45
  lint_roller (~> 1.1.0)
@@ -46,12 +47,12 @@ GEM
46
47
  parser (>= 3.3.0.2)
47
48
  rainbow (>= 2.2.2, < 4.0)
48
49
  regexp_parser (>= 2.9.3, < 3.0)
49
- rubocop-ast (>= 1.47.1, < 2.0)
50
+ rubocop-ast (>= 1.48.0, < 2.0)
50
51
  ruby-progressbar (~> 1.7)
51
52
  unicode-display_width (>= 2.4.0, < 4.0)
52
- rubocop-ast (1.48.0)
53
+ rubocop-ast (1.49.0)
53
54
  parser (>= 3.3.7.2)
54
- prism (~> 1.4)
55
+ prism (~> 1.7)
55
56
  rubocop-minitest (0.38.2)
56
57
  lint_roller (~> 1.1)
57
58
  rubocop (>= 1.75.0, < 2.0)
@@ -73,12 +74,12 @@ GEM
73
74
  simplecov (~> 0.19)
74
75
  simplecov-html (0.13.2)
75
76
  simplecov_json_formatter (0.1.4)
76
- stringio (3.1.8)
77
+ stringio (3.2.0)
77
78
  tsort (0.2.0)
78
79
  unicode-display_width (3.2.0)
79
80
  unicode-emoji (~> 4.1)
80
- unicode-emoji (4.1.0)
81
- yard (0.9.37)
81
+ unicode-emoji (4.2.0)
82
+ yard (0.9.38)
82
83
 
83
84
  PLATFORMS
84
85
  arm64-darwin-23
@@ -88,10 +89,10 @@ PLATFORMS
88
89
 
89
90
  DEPENDENCIES
90
91
  iri!
91
- minitest (~> 5.25)
92
+ minitest (~> 6.0)
92
93
  minitest-reporters (~> 1.7)
93
94
  rake (~> 13.2)
94
- rdoc (= 6.15.0)
95
+ rdoc (= 7.0.3)
95
96
  rubocop (~> 1.74)
96
97
  rubocop-minitest (~> 0.38)
97
98
  rubocop-performance (~> 1.25)
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019-2025 Yegor Bugayenko
3
+ Copyright (c) 2019-2026 Yegor Bugayenko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/LICENSES/MIT.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019-2025 Yegor Bugayenko
3
+ Copyright (c) 2019-2026 Yegor Bugayenko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # SPDX-FileCopyrightText: Copyright (c) 2019-2025 Yegor Bugayenko
3
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2026 Yegor Bugayenko
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
6
  require 'rubygems'
data/iri.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # SPDX-FileCopyrightText: Copyright (c) 2019-2025 Yegor Bugayenko
3
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2026 Yegor Bugayenko
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
6
  require 'English'
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
10
10
  s.required_ruby_version = '>=2.2'
11
11
  s.name = 'iri'
12
- s.version = '0.11.3'
12
+ s.version = '0.11.4'
13
13
  s.license = 'MIT'
14
14
  s.summary = 'Simple Immutable Ruby URI Builder'
15
15
  s.description =
data/lib/iri.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # SPDX-FileCopyrightText: Copyright (c) 2019-2025 Yegor Bugayenko
3
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2026 Yegor Bugayenko
4
4
  # SPDX-License-Identifier: MIT
5
5
 
6
6
  require 'uri'
7
- require 'cgi'
8
7
 
9
8
  # Iri is a simple, immutable URI builder with a fluent interface.
10
9
  #
@@ -35,7 +34,7 @@ require 'cgi'
35
34
  # {README}[https://github.com/yegor256/iri/blob/master/README.md] file.
36
35
  #
37
36
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
38
- # Copyright:: Copyright (c) 2019-2025 Yegor Bugayenko
37
+ # Copyright:: Copyright (c) 2019-2026 Yegor Bugayenko
39
38
  # License:: MIT
40
39
  class Iri
41
40
  # Exception raised when a URI is not valid and safe mode is disabled.
@@ -378,7 +377,7 @@ class Iri
378
377
  part = part.to_s
379
378
  raise ArgumentError, "The part can't be empty" if part.empty?
380
379
  modify do |c|
381
- tail = (c.path.end_with?('/') ? '' : '/') + CGI.escape(part.to_s)
380
+ tail = (c.path.end_with?('/') ? '' : '/') + URI.encode_www_form_component(part.to_s)
382
381
  c.path = c.path + tail
383
382
  end
384
383
  end
@@ -423,9 +422,9 @@ class Iri
423
422
  # @return [Iri] A new Iri instance with the modified query string
424
423
  def modify_query
425
424
  modify do |c|
426
- params = CGI.parse(the_uri.query || '').map do |p, a|
427
- [p.to_s, a.clone]
428
- end.to_h
425
+ params = URI.decode_www_form(the_uri.query || '').each_with_object({}) do |(k, v), h|
426
+ (h[k] ||= []) << v
427
+ end
429
428
  yield(params)
430
429
  c.query = URI.encode_www_form(params)
431
430
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.3
4
+ version: 0.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko