action_cable_client 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/action_cable_client.rb +1 -2
- data/lib/action_cable_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be694bf2ad134f94cff96699def64933943d0e00
|
4
|
+
data.tar.gz: 64d9fa29c981854f3125f18cd6c0522a5c48df88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf35488d260a47398cf607d3c825aac8f4b9d61190df944743c1e561ad63efa75b74334dc99b3a62affa3b1bd9a7474dee43972e043588d5d7ed347ed3237bb6
|
7
|
+
data.tar.gz: 70565abe338695a37bf75cdade5295ea9c7498e244e4bbc2fc8a6d153b6bee0d1f0c4ba1f4a64178cb99960063d04f7ddd23778d912b491774d1c7954410620d
|
data/README.md
CHANGED
@@ -70,7 +70,9 @@ There really isn't that much to this gem. :-)
|
|
70
70
|
- Received messages should look about the same
|
71
71
|
|
72
72
|
4. Notes:
|
73
|
-
- Every message sent to the server has a `command` and `identifier` key.
|
73
|
+
- Every message sent to the server has a `command` and `identifier` key.
|
74
|
+
- Ping messages from the action cable server look like:
|
75
|
+
- `{ "type" => "ping", "message" => 1461845503 }`
|
74
76
|
- The channel value must match the `name` of the channel class on the ActionCable server.
|
75
77
|
- `identifier` and `data` are redundantly jsonified. So, for example (in ruby):
|
76
78
|
```ruby
|
data/lib/action_cable_client.rb
CHANGED
@@ -97,7 +97,6 @@ class ActionCableClient
|
|
97
97
|
|
98
98
|
private
|
99
99
|
|
100
|
-
|
101
100
|
# @param [WebSocket::Frame::Incoming::Client] message - the websockt message object
|
102
101
|
# This object is from the websocket-ruby gem:
|
103
102
|
# https://github.com/imanel/websocket-ruby/blob/master/lib/websocket/frame/incoming/client.rb
|
@@ -153,7 +152,7 @@ class ActionCableClient
|
|
153
152
|
# {"identifier" => "_ping","message" => 1460201942}
|
154
153
|
# {"identifier" => "_ping","type" => "confirm_subscription"}
|
155
154
|
def is_ping?(message)
|
156
|
-
message_identifier = message[Message::
|
155
|
+
message_identifier = message[Message::TYPE_KEY]
|
157
156
|
Message::IDENTIFIER_PING == message_identifier
|
158
157
|
end
|
159
158
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_cable_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
@@ -129,6 +129,6 @@ rubyforge_project:
|
|
129
129
|
rubygems_version: 2.5.1
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
|
-
summary: ActionCableClient-1.2.
|
132
|
+
summary: ActionCableClient-1.2.2
|
133
133
|
test_files: []
|
134
134
|
has_rdoc:
|