protocol-websocket 0.21.1 → 0.21.3

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: 9d235a3a271493c223dda297cb508d9be00b2abf75a425cd0dada77f5eec94e2
4
- data.tar.gz: 348ba1d7a04ebb63a5d521a1605d7503bdb8ab727992e6657106444928231201
3
+ metadata.gz: 732d489f9dbb554ca526ec9a1b6931b753a34c48d46828613d21ab03e6853bd3
4
+ data.tar.gz: c60eaec88d93b601b13c541b5d01d8b84ab0bdcdaa5dd276af9dcae627a7c721
5
5
  SHA512:
6
- metadata.gz: ed8567becfa23f00a414801b263d3aa28db0ce790ab4823160efba567bd4efeab86beb3b77c8729e9df523ae39f8cbe9afb53b5c313afdb45be63640e0e5f339
7
- data.tar.gz: d61ec56857439b1fd58469c28b28132948036b7d4033cf431786dba5b05931863674e285d5fabd012106e44839fe47bbe2273c2b4fda4b3566a52fadb8204723
6
+ metadata.gz: d5379ef1c2bb2c398d9839d59c9eede8b1b4a88c39ee712b8a1a92245287ae31770d21f1f985bf6087fd3e81b44e099015a8ee673e53886612aade6316910528
7
+ data.tar.gz: 83ad4d6e238aa5ff6bd5dd1d39d463676649d87d9a46eee42f98fc089169608318fe84583e5d0b768430987ac86162a3f7d4b13f0e1bc22fbdedf3e08d9e1468
data/context/index.yaml CHANGED
@@ -3,6 +3,8 @@
3
3
  ---
4
4
  description: A low level implementation of the WebSocket protocol.
5
5
  metadata:
6
+ bug_tracker_uri: https://github.com/socketry/protocol-websocket/issues
7
+ changelog_uri: https://github.com/socketry/protocol-websocket/blob/main/releases.md
6
8
  documentation_uri: https://socketry.github.io/protocol-websocket/
7
9
  source_code_uri: https://github.com/socketry/protocol-websocket.git
8
10
  files:
@@ -9,25 +9,16 @@ module Protocol
9
9
  module WebSocket
10
10
  module Coder
11
11
  # A JSON coder that uses the standard JSON library.
12
- class JSON
13
- # Initialize a new JSON coder.
14
- # @parameter options [Hash] Options to pass to the JSON library when parsing or generating.
15
- def initialize(**options)
16
- @options = options
17
- end
18
-
12
+ module JSON
19
13
  # Parse a JSON buffer into an object.
20
- def parse(buffer)
21
- ::JSON.parse(buffer, **@options)
14
+ def self.parse(buffer)
15
+ ::JSON.parse(buffer, symbolize_names: true)
22
16
  end
23
17
 
24
18
  # Generate a JSON buffer from an object.
25
- def generate(object)
26
- ::JSON.generate(object, **@options)
19
+ def self.generate(object)
20
+ ::JSON.generate(object)
27
21
  end
28
-
29
- # The default JSON coder. This coder will symbolize names.
30
- DEFAULT = new(symbolize_names: true)
31
22
  end
32
23
  end
33
24
  end
@@ -10,7 +10,7 @@ module Protocol
10
10
  # @namespace
11
11
  module Coder
12
12
  # The default coder for WebSocket messages.
13
- DEFAULT = JSON::DEFAULT
13
+ DEFAULT = JSON
14
14
  end
15
15
  end
16
16
  end
@@ -7,6 +7,6 @@
7
7
  module Protocol
8
8
  # @namespace
9
9
  module WebSocket
10
- VERSION = "0.21.1"
10
+ VERSION = "0.21.3"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -16,6 +16,14 @@ Please see the [project documentation](https://socketry.github.io/protocol-webso
16
16
 
17
17
  Please see the [project releases](https://socketry.github.io/protocol-websocket/releases/index) for all releases.
18
18
 
19
+ ### v0.21.3
20
+
21
+ - Adopt reviewed GitHub release pull requests, RubyGems Trusted Publishing, and release attestations instead of legacy certificate signing.
22
+
23
+ ### v0.21.2
24
+
25
+ - Fix JSON 3 compatibility by applying `symbolize_names` only when parsing incoming messages. `Coder::JSON` is now a module with fixed parsing and generation behavior; pass a different coder to customize serialization.
26
+
19
27
  ### v0.21.1
20
28
 
21
29
  - If `Connection#close_write` fails, the connection will now be fully closed to prevent hanging connections.
@@ -49,41 +57,34 @@ Please see the [project releases](https://socketry.github.io/protocol-websocket/
49
57
  - Add `PingMessage` alongside `TextMessage` and `BinaryMessage` for a consistent message interface.
50
58
  - Remove `JSONMessage` (use application-level encoding instead).
51
59
 
52
- ### v0.17.0
53
-
54
- - Introduce `#close_write` and `#shutdown` methods on `Connection` for more precise connection lifecycle control.
55
-
56
- ### v0.16.0
57
-
58
- - Move `#send` logic into `Message` for better encapsulation.
59
- - Improve error handling when a `nil` message is passed.
60
-
61
60
  ## Contributing
62
61
 
63
62
  We welcome contributions to this project.
64
63
 
65
- 1. Fork it.
64
+ 1. Fork the repository.
66
65
  2. Create your feature branch (`git checkout -b my-new-feature`).
67
- 3. Commit your changes (`git commit -am 'Add some feature'`).
66
+ 3. Commit your changes (`git commit -am 'Add some feature.'`).
68
67
  4. Push to the branch (`git push origin my-new-feature`).
69
- 5. Create new Pull Request.
68
+ 5. Create a new pull request.
70
69
 
71
70
  ### Running Tests
72
71
 
73
72
  To run the test suite:
74
73
 
75
- ``` shell
76
- bundle exec sus
74
+ ``` bash
75
+ $ bundle exec sus
77
76
  ```
78
77
 
79
78
  ### Making Releases
80
79
 
81
- To make a new release:
80
+ To prepare a release pull request:
82
81
 
83
- ``` shell
84
- bundle exec bake gem:release:patch # or minor or major
82
+ ``` bash
83
+ bundle exec bake gem:github:release:patch # or minor or major
85
84
  ```
86
85
 
86
+ See [bake-gem-github](https://github.com/socketry/bake-gem-github) for setup and publishing details.
87
+
87
88
  ### Developer Certificate of Origin
88
89
 
89
90
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.21.3
4
+
5
+ - Adopt reviewed GitHub release pull requests, RubyGems Trusted Publishing, and release attestations instead of legacy certificate signing.
6
+
7
+ ## v0.21.2
8
+
9
+ - Fix JSON 3 compatibility by applying `symbolize_names` only when parsing incoming messages. `Coder::JSON` is now a module with fixed parsing and generation behavior; pass a different coder to customize serialization.
10
+
3
11
  ## v0.21.1
4
12
 
5
13
  - If `Connection#close_write` fails, the connection will now be fully closed to prevent hanging connections.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.21.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -11,36 +11,7 @@ authors:
11
11
  - Olle Jonsson
12
12
  - Taleh Zaliyev
13
13
  bindir: bin
14
- cert_chain:
15
- - |
16
- -----BEGIN CERTIFICATE-----
17
- MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
18
- ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
19
- CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
20
- MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
21
- MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
22
- bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
23
- igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
24
- 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
25
- sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
26
- e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
27
- XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
28
- RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
29
- tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
30
- zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
31
- xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
32
- BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
33
- aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
34
- aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
35
- cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
36
- xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
37
- c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
38
- 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
39
- JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
40
- eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
41
- Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
42
- voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
43
- -----END CERTIFICATE-----
14
+ cert_chain: []
44
15
  date: 1980-01-02 00:00:00.000000000 Z
45
16
  dependencies:
46
17
  - !ruby/object:Gem::Dependency
@@ -92,6 +63,8 @@ homepage: https://github.com/socketry/protocol-websocket
92
63
  licenses:
93
64
  - MIT
94
65
  metadata:
66
+ bug_tracker_uri: https://github.com/socketry/protocol-websocket/issues
67
+ changelog_uri: https://github.com/socketry/protocol-websocket/blob/main/releases.md
95
68
  documentation_uri: https://socketry.github.io/protocol-websocket/
96
69
  source_code_uri: https://github.com/socketry/protocol-websocket.git
97
70
  rdoc_options: []
@@ -108,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
81
  - !ruby/object:Gem::Version
109
82
  version: '0'
110
83
  requirements: []
111
- rubygems_version: 4.0.10
84
+ rubygems_version: 4.0.21
112
85
  specification_version: 4
113
86
  summary: A low level implementation of the WebSocket protocol.
114
87
  test_files: []
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file