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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26a8ddbb776d6aa172c87b764baaf5a50e99c4b8
4
- data.tar.gz: '0139cc0a3fd8e545ec262262ec37451bb0e5403c'
3
+ metadata.gz: baf24530e96c211b24126f88645c15a1111a670a
4
+ data.tar.gz: 0662cb8c6d80ffe9615413b5a72718197ab7ffe6
5
5
  SHA512:
6
- metadata.gz: 55c331b5be0551543aeb12ad5332155b2301d72858b31dc03f3e87698538232f6427a69ca5e1c38c7ca1e054447da7526e648c27149b30d7ee81db130a6dc497
7
- data.tar.gz: ef3dc2181c6f8fe1b4e73fcca29e177daf3fc16d00f22b6107be423410b1e0b574e307f5f96d530d11c46e0f3a286a6897b86dc08b24c2881e0df3c6b69baf2b
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][])
@@ -13,10 +13,18 @@ module Anycable
13
13
  transmissions << websocket_message
14
14
  end
15
15
 
16
- def stream(broadcasting)
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Anycable
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
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.1
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-24 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config