celluloid_pubsub 0.3.0 → 0.3.1

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: 6aad68d75f135124f475c703d0950b1bc0b45e2c
4
- data.tar.gz: 5e47b790b66d01dc32af3313ec54bb7ba09c8208
3
+ metadata.gz: acb771f697e6cac9c0791af4441d1e5ed06deb19
4
+ data.tar.gz: eeedcfac88bfbdda3531fe7dbcaee2ee17e24ba1
5
5
  SHA512:
6
- metadata.gz: c33c34fab870f68825fd75b42917b556880172b7dbb64108f64a94ed1fcd067980e984715be8118d936fbdb999b105d03c8aa85c1bd26efe2093caa9f56f73bc
7
- data.tar.gz: 885da36eee95bce09adb0c7e6644d8a53691c87b622355de60b9d94b98757ee14a87360ca48812ed757836e29762cf095c4bdec6585602cae58951e0a41badde
6
+ metadata.gz: 184d0cb67d194b6638ac08dc9aad2db03fe2a388d41c1318593685a1e2ccab3d9cdedd20587c0284468cba516887fc906dd58bc20b889b2b879080461c157dec
7
+ data.tar.gz: 186ad47afeb3b078a0d98c04d1027100e47e438a0485226d88f91bd9db1902dbc264a05a14e906abba60d858eda5663e1de87d23b0c60ca4d6d88a1ca4476d51
@@ -157,18 +157,18 @@ module CelluloidPubsub
157
157
  def delegate_action(json_data)
158
158
  channel = json_data.fetch('channel', nil)
159
159
  case json_data['client_action']
160
- when 'unsubscribe_all'
161
- unsubscribe_all
162
- when 'unsubscribe_clients'
163
- async.unsubscribe_clients(channel)
164
- when 'unsubscribe'
165
- async.unsubscribe(channel)
166
- when 'subscribe'
167
- async.start_subscriber(channel, json_data)
168
- when 'publish'
169
- @server.publish_event(channel, json_data['data'].to_json)
170
- else
171
- handle_unknown_action(json_data)
160
+ when 'unsubscribe_all'
161
+ unsubscribe_all
162
+ when 'unsubscribe_clients'
163
+ async.unsubscribe_clients(channel)
164
+ when 'unsubscribe'
165
+ async.unsubscribe(channel)
166
+ when 'subscribe'
167
+ async.start_subscriber(channel, json_data)
168
+ when 'publish'
169
+ @server.publish_event(channel, json_data['data'].to_json)
170
+ else
171
+ handle_unknown_action(json_data)
172
172
  end
173
173
  end
174
174
 
@@ -192,6 +192,7 @@ module CelluloidPubsub
192
192
  @channels.delete(channel)
193
193
  end
194
194
  end
195
+
195
196
  # the method will unsubscribe a client by closing the websocket connection if has unscribed from all channels
196
197
  # and deleting the reactor from the channel list on the server
197
198
  #
@@ -254,8 +255,8 @@ module CelluloidPubsub
254
255
  end
255
256
 
256
257
  def channel_subscribers(channel)
257
- @server.subscribers[channel] || []
258
- end
258
+ @server.subscribers[channel] || []
259
+ end
259
260
 
260
261
  # adds the curent actor the list of the subscribers for a particular channel
261
262
  # and registers the new channel
@@ -61,7 +61,6 @@ module CelluloidPubsub
61
61
  end
62
62
  end
63
63
 
64
-
65
64
  def prepare_redis_action(action)
66
65
  log_unsubscriptions(pubsub)
67
66
  proc do |subscribed_message|
@@ -17,7 +17,7 @@ module CelluloidPubsub
17
17
  # minor release version
18
18
  MINOR = 3
19
19
  # tiny release version
20
- TINY = 0
20
+ TINY = 1
21
21
  # prelease version ( set this only if it is a prelease)
22
22
  PRE = nil
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid_pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada