protocol-url 0.8.0 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e251b8fa72bc3017a56cfa385bf2bc7b9e1e4ef8add2bcd12fb8321cc349c75
4
- data.tar.gz: 700835c1db54aead624eb89003c7daa42d9ad992f7139c336e2a5293291db619
3
+ metadata.gz: 251219144c71f40dba05ef7ad726a20b17c94beb55733317a9378e000528575b
4
+ data.tar.gz: 81be14b9dd98770859406b28a658604ea356791173c4d352d52487735364dafe
5
5
  SHA512:
6
- metadata.gz: 6285b5b91ba997d2f822fcc4ffd49b96dffcc1336483bd043f42a736dfb3bbe4e145e492044a201de1c8f0f3e363ae816d64af79e0412b2ce4715ec69e3b4d9c
7
- data.tar.gz: 6e4c0817905afb9b17e8e0eceae42e7ea24d6c0af6a57773d7395355b2e7b597d043c9d7795ddf62194790f0a3f53f6346d7950598721c4b079e7a419e95f793
6
+ metadata.gz: 48b8dcae7d84dacf3bb49ce45b84d308dd2c7f0377b97e84f4d9530d4a2467d04b16a76186b3859c8fc3052da50117b197dc6a5ebc503a2568126255c234c43c
7
+ data.tar.gz: 85c632aa585bec3155f294becdee9e904b8f424bab0ef95944c15e563c7e6a5ec2a26ad8a0941ad198ce50a65fec43c84187f76dc596c6dc4bbbd879dcef7b8d
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ module Protocol
7
+ module URL
8
+ # Raised when URL processing exceeds a configured limit.
9
+ class LimitError < StandardError
10
+ end
11
+ end
12
+ end
@@ -4,6 +4,7 @@
4
4
  # Copyright, 2026, by Samuel Williams.
5
5
 
6
6
  require_relative "../encoding"
7
+ require_relative "../error"
7
8
 
8
9
  module Protocol
9
10
  module URL
@@ -32,7 +33,7 @@ module Protocol
32
33
  end
33
34
 
34
35
  if @depth_limit and keys.size > @depth_limit
35
- raise RangeError, "Form data depth exceeded limit of #{@depth_limit}!"
36
+ raise LimitError, "Form data depth exceeded limit of #{@depth_limit}!"
36
37
  end
37
38
 
38
39
  Encoding.assign(keys, value, @root)
@@ -4,6 +4,7 @@
4
4
  # Copyright, 2026, by Samuel Williams.
5
5
 
6
6
  require_relative "nested"
7
+ require_relative "../error"
7
8
 
8
9
  module Protocol
9
10
  module URL
@@ -107,7 +108,7 @@ module Protocol
107
108
 
108
109
  def check_limit(name, value, limit)
109
110
  if limit and value > limit
110
- raise RangeError, "Form data #{name} exceeded limit of #{limit}!"
111
+ raise LimitError, "Form data #{name} exceeded limit of #{limit}!"
111
112
  end
112
113
  end
113
114
  end
@@ -7,6 +7,6 @@
7
7
  module Protocol
8
8
  # @namespace
9
9
  module URL
10
- VERSION = "0.8.0"
10
+ VERSION = "0.9.0"
11
11
  end
12
12
  end
data/lib/protocol/url.rb CHANGED
@@ -4,6 +4,7 @@
4
4
  # Copyright, 2025, by Samuel Williams.
5
5
 
6
6
  require_relative "url/version"
7
+ require_relative "url/error"
7
8
  require_relative "url/pattern"
8
9
  require_relative "url/encoding"
9
10
  require_relative "url/form_data/nested"
data/readme.md CHANGED
@@ -34,6 +34,10 @@ This project is best served by a collaborative and respectful environment. Treat
34
34
 
35
35
  Please see the [project releases](https://socketry.github.io/protocol-url/releases/index) for all releases.
36
36
 
37
+ ### v0.9.0
38
+
39
+ - Add `Protocol::URL::LimitError` for configured processing limits.
40
+
37
41
  ### v0.8.0
38
42
 
39
43
  - Use consistent limit naming for form data parser constraints.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.9.0
4
+
5
+ - Add `Protocol::URL::LimitError` for configured processing limits.
6
+
3
7
  ## v0.8.0
4
8
 
5
9
  - Use consistent limit naming for form data parser constraints.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-url
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -45,6 +45,7 @@ files:
45
45
  - lib/protocol/url.rb
46
46
  - lib/protocol/url/absolute.rb
47
47
  - lib/protocol/url/encoding.rb
48
+ - lib/protocol/url/error.rb
48
49
  - lib/protocol/url/form_data/nested.rb
49
50
  - lib/protocol/url/form_data/parser.rb
50
51
  - lib/protocol/url/path.rb
metadata.gz.sig CHANGED
Binary file