protocol-websocket 0.21.1 → 0.21.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/context/index.yaml +2 -0
- data/lib/protocol/websocket/coder/json.rb +5 -14
- data/lib/protocol/websocket/coder.rb +1 -1
- data/lib/protocol/websocket/version.rb +1 -1
- data/readme.md +11 -12
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +3 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a83c2f568dee5cc427ce444fe4a39ec9da5cff785dce156b20dbf45ff262643d
|
|
4
|
+
data.tar.gz: 42b64b8575ba9d5af47daac91b50a415ed008c5fd683e15035969cec6ea2b849
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d982707a934596bb8578f16b8609b5e24935004f8791ef66c7d12b68df4ae90a726c6cb47f0c6ee80b3806236aa4b6d190589e8569e473b4aa463314977ab52a
|
|
7
|
+
data.tar.gz: 8d81f1ba7dba3b4c2ab910fcdb38c8c268d6f3689001bdee496a646605f0784a7293a143355ee6f13b8ab40b475de190c90734410d5f6308cb8ba6a1e12d5aa5
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
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
|
-
|
|
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,
|
|
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
|
|
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
|
data/readme.md
CHANGED
|
@@ -16,6 +16,10 @@ 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.2
|
|
20
|
+
|
|
21
|
+
- 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.
|
|
22
|
+
|
|
19
23
|
### v0.21.1
|
|
20
24
|
|
|
21
25
|
- If `Connection#close_write` fails, the connection will now be fully closed to prevent hanging connections.
|
|
@@ -53,35 +57,30 @@ Please see the [project releases](https://socketry.github.io/protocol-websocket/
|
|
|
53
57
|
|
|
54
58
|
- Introduce `#close_write` and `#shutdown` methods on `Connection` for more precise connection lifecycle control.
|
|
55
59
|
|
|
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
|
|
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
|
|
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
|
-
```
|
|
76
|
-
bundle exec sus
|
|
74
|
+
``` bash
|
|
75
|
+
$ bundle exec sus
|
|
77
76
|
```
|
|
78
77
|
|
|
79
78
|
### Making Releases
|
|
80
79
|
|
|
81
80
|
To make a new release:
|
|
82
81
|
|
|
83
|
-
```
|
|
84
|
-
bundle exec bake gem:release:patch # or minor or major
|
|
82
|
+
``` bash
|
|
83
|
+
$ bundle exec bake gem:release:patch # or minor or major
|
|
85
84
|
```
|
|
86
85
|
|
|
87
86
|
### Developer Certificate of Origin
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.21.2
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
|
|
3
7
|
## v0.21.1
|
|
4
8
|
|
|
5
9
|
- If `Connection#close_write` fails, the connection will now be fully closed to prevent hanging connections.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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.
|
|
4
|
+
version: 0.21.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -92,6 +92,8 @@ homepage: https://github.com/socketry/protocol-websocket
|
|
|
92
92
|
licenses:
|
|
93
93
|
- MIT
|
|
94
94
|
metadata:
|
|
95
|
+
bug_tracker_uri: https://github.com/socketry/protocol-websocket/issues
|
|
96
|
+
changelog_uri: https://github.com/socketry/protocol-websocket/blob/main/releases.md
|
|
95
97
|
documentation_uri: https://socketry.github.io/protocol-websocket/
|
|
96
98
|
source_code_uri: https://github.com/socketry/protocol-websocket.git
|
|
97
99
|
rdoc_options: []
|
metadata.gz.sig
CHANGED
|
Binary file
|