action_cable_client 1.3.1 → 1.3.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
- data/CHANGELOG.md +3 -0
- data/lib/action_cable_client.rb +15 -1
- data/lib/action_cable_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3232e18c7d309778d36b6f995bbed9697dce12c4
|
4
|
+
data.tar.gz: 110d904797bde5c28476811cc1f22da9a9341487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb1256b8dec4be37e00352b727cb403b77505e5de26ca4a5eb6dd3f4b5cfc8851886b12c3050b26b6c9c13464170909693c6d692037efce481e4c0f316598f54
|
7
|
+
data.tar.gz: 7c578bd2a0c76025453d5b8f0e9e046a85c0eabf48bc9bb9b96ee127dd51f01aa77a2110b6bc4dc2f3703ff06b9d8084ffc786b058fbc06441a9c5967ff79711
|
data/CHANGELOG.md
CHANGED
data/lib/action_cable_client.rb
CHANGED
@@ -23,7 +23,6 @@ class ActionCableClient
|
|
23
23
|
# [ action, data ]
|
24
24
|
attr_accessor :message_queue, :_subscribed, :_subscribed_callaback
|
25
25
|
|
26
|
-
def_delegator :_websocket_client, :disconnect, :disconnected
|
27
26
|
def_delegator :_websocket_client, :errback, :errored
|
28
27
|
def_delegator :_websocket_client, :send_msg, :send_msg
|
29
28
|
|
@@ -114,6 +113,21 @@ class ActionCableClient
|
|
114
113
|
_subscribed
|
115
114
|
end
|
116
115
|
|
116
|
+
# callback when the server disconnects from the client.
|
117
|
+
#
|
118
|
+
# @example
|
119
|
+
# client = ActionCableClient.new(uri, 'RoomChannel')
|
120
|
+
# client.connected {}
|
121
|
+
# client.disconnected do
|
122
|
+
# # cleanup after the server disconnects from the client
|
123
|
+
# end
|
124
|
+
def disconnected
|
125
|
+
_websocket_client.disconnect do
|
126
|
+
self._subscribed = false
|
127
|
+
yield
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
117
131
|
private
|
118
132
|
|
119
133
|
# @param [WebSocket::Frame::Incoming::Client] message - the websockt message object
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_cable_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -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.3.
|
132
|
+
summary: ActionCableClient-1.3.2
|
133
133
|
test_files: []
|
134
134
|
has_rdoc:
|