protocol-url 0.13.0 → 0.14.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: 4a8be4027ad2b93f7707396fe9a53a47846b53e78cde0269be4fdd3dbdb448e3
4
- data.tar.gz: 89ae574fc48ca43bcd0b224bdbe91ab0da1354869f6c8dbc87bdfbe9e6cd45b0
3
+ metadata.gz: 9ff041406f4bc298081aaa3f7150a374bf937f87e0f2783458082c4635d51488
4
+ data.tar.gz: 90aa117ed86f9df29b3278420b8c3b450a8f6fc7b30cf6473e5fbf68bb939d40
5
5
  SHA512:
6
- metadata.gz: fb21e1c877b41f75975183cacab2a9dbea71e09c5fa4e11f66767f713e50fe0c27b63f07b1daa83feb00309a41132703544620541c794c598ce1efc9c402a830
7
- data.tar.gz: 7c0703c48866182719b0a12edee9b45447f2ce3233519058af33c171ddf729fa9f8615cb76ae0aaf8355383703e21937fa912e94eff05428c6007d62c4e763cd
6
+ metadata.gz: 371901582d694902f2610377663c7aca91835c3e04fde1a06854a3b2a67456bff313d71a347686e3d7e80b1dc35cd0103379fe0abf28c6050967534f0d3ae888
7
+ data.tar.gz: 8446857f07d8aa19317a1ce85e067b623df958e2a56b4df9b9110d52de1cc4eb70115d1af6ed068c5cbb9e2d78ebefd02d406ab551e36258e8acfb99276c9694
checksums.yaml.gz.sig CHANGED
Binary file
@@ -208,14 +208,18 @@ module Protocol
208
208
  end
209
209
 
210
210
  # @parameter other [Object] The value to compare with this path.
211
- # @returns [Boolean] Whether both paths have the same encoded representation.
211
+ # @returns [Boolean] Whether both values are the same.
212
212
  def ==(other)
213
- eql?(other)
213
+ if other.is_a?(String)
214
+ return encoded == other
215
+ else
216
+ return eql?(other)
217
+ end
214
218
  end
215
219
 
216
220
  # Compare this path with another path using exact encoded string identity.
217
221
  # @parameter other [Object] The value to compare with this path.
218
- # @returns [Boolean] Whether both paths have equal encoded strings.
222
+ # @returns [Boolean] Whether both paths are the same.
219
223
  def eql?(other)
220
224
  other.is_a?(Path) && encoded.eql?(other.encoded)
221
225
  end
@@ -7,6 +7,6 @@
7
7
  module Protocol
8
8
  # @namespace
9
9
  module URL
10
- VERSION = "0.13.0"
10
+ VERSION = "0.14.0"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -34,6 +34,55 @@ bundle exec sus
34
34
 
35
35
  Please see the [project releases](https://socketry.github.io/protocol-url/releases/index) for all releases.
36
36
 
37
+ ### v0.14.0
38
+
39
+ - Allow paths to compare with their encoded string representation.
40
+
41
+ ### v0.13.0
42
+
43
+ - Add conservative normalization of encoded URL paths.
44
+
45
+ ### v0.12.0
46
+
47
+ - Allow unfrozen relative and absolute URLs to replace their components.
48
+
49
+ ### v0.10.0
50
+
51
+ - Rename `Protocol::URL::FormData::Parser::CONTENT_TYPE` to `MEDIA_TYPE`.
52
+
53
+ ### v0.9.0
54
+
55
+ - Add `Protocol::URL::LimitError` for configured processing limits.
56
+
57
+ ### v0.8.0
58
+
59
+ - Use consistent limit naming for form data parser constraints.
60
+
61
+ ### v0.7.0
62
+
63
+ - Allow `Protocol::URL::FormData::Parser#parse` to populate a supplied result object.
64
+
65
+ ### v0.6.0
66
+
67
+ - Add `Protocol::URL::FormData::Parser` for incremental, limited parsing of `application/x-www-form-urlencoded` form data.
68
+ - Add `Protocol::URL::FormData::Nested` for consistently building nested form data while preserving absent and empty values.
69
+
70
+ ### v0.5.0
71
+
72
+ - Add `Protocol::URL::Encoding.decode_www_form` for decoding HTML form data where `+` represents a space.
73
+
74
+ ### v0.4.0
75
+
76
+ - Add comparison methods to `Protocol::URL::Relative` (and by inheritance to `Protocol::URL::Absolute`):
77
+ - `#==` for structural equality comparison (compares path, query, fragment components).
78
+ - `#===` for string equality comparison (enables case statement matching).
79
+ - `#<=>` for ordering and sorting.
80
+ - `#hash` for hash key support.
81
+ - `#equal?` for component-based equality checking.
82
+ - Add JSON serialization support to `Protocol::URL::Relative`:
83
+ - `#as_json` returns the string representation.
84
+ - `#to_json` returns a JSON-encoded string.
85
+
37
86
  ### v0.13.0
38
87
 
39
88
  - Add conservative normalization of encoded URL paths.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.14.0
4
+
5
+ - Allow paths to compare with their encoded string representation.
6
+
3
7
  ## v0.13.0
4
8
 
5
9
  - Add conservative normalization of encoded URL paths.
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.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file