anycable 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/anycable/socket.rb +9 -5
- data/lib/anycable/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: baf24530e96c211b24126f88645c15a1111a670a
|
4
|
+
data.tar.gz: 0662cb8c6d80ffe9615413b5a72718197ab7ffe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ab66a28c6ac332bb9bf25b6b57c23c1a24930d337b3c291690927b4b410309d2af4754a706525844026e9b24898952b7f4dada81a754a636170c678e8436805
|
7
|
+
data.tar.gz: 48b3f74c28380d303bb8b22a1f40c7c82a96f3f22e9d266d816b17c4ff5aa683d395ab1bd754ff10a6762b710a44435c1825202ba65d8825a1aec955525be0b6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## 0.4.2 (2017-01-28)
|
4
|
+
|
5
|
+
- Change socket streaming API. ([@palkan][])
|
6
|
+
|
7
|
+
Add `Socket#subscribe`, `unsubscribe` and `unsubscribe_from_all` methods.
|
8
|
+
|
3
9
|
## 0.4.1 (2017-01-24)
|
4
10
|
|
5
11
|
- Introduce _fake_ socket instance to handle transmissions and streams. ([@palkan][])
|
data/lib/anycable/socket.rb
CHANGED
@@ -13,10 +13,18 @@ module Anycable
|
|
13
13
|
transmissions << websocket_message
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def subscribe(_channel, broadcasting)
|
17
17
|
streams << broadcasting
|
18
18
|
end
|
19
19
|
|
20
|
+
def unsubscribe(_channel, _broadcasting)
|
21
|
+
raise NotImplementedError
|
22
|
+
end
|
23
|
+
|
24
|
+
def unsubscribe_from_all(_channel)
|
25
|
+
@stop_all_streams = true
|
26
|
+
end
|
27
|
+
|
20
28
|
def streams
|
21
29
|
@streams ||= []
|
22
30
|
end
|
@@ -32,10 +40,6 @@ module Anycable
|
|
32
40
|
@closed == true
|
33
41
|
end
|
34
42
|
|
35
|
-
def stop_all_streams
|
36
|
-
@stop_all_streams = true
|
37
|
-
end
|
38
|
-
|
39
43
|
def stop_streams?
|
40
44
|
@stop_all_streams == true
|
41
45
|
end
|
data/lib/anycable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|