foreign_office 0.17.0 → 0.17.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7563bca6ddd01f40e9571962a13c80fe7c5805e98642f593dbe974ed7fd0ba2f
|
4
|
+
data.tar.gz: 774a06b3f4d0beec54faf094148f7a66ae83cf1c0095a3cb9de5ea3df3424982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa15b1b05f6c9f729fd9e165a705a06c440493684078ff83c590acb20363df6d3a7c4bcd167b481e7f7b8d79d468479152d29ceb620e3b6078c34cde2cce307a
|
7
|
+
data.tar.gz: 1830d3b84665ca17b7b5a3d4866fe114918d3934488bffe264ca66cd79675bb4a44a073ceb36d8d62f05723e13c4cef67b483b2598387a56854a88e2b4f66033
|
@@ -4,8 +4,9 @@ class PresenceChannelPublishJob < ApplicationJob
|
|
4
4
|
def perform(obj_id, obj_class_name, serialized_state)
|
5
5
|
serialized_state.symbolize_keys!
|
6
6
|
channel_name = "presence-#{obj_class_name}#{obj_id}"
|
7
|
-
|
8
|
-
|
7
|
+
if (!ForeignOffice.bus.connection.respond_to?(:channel_users) ||
|
8
|
+
ForeignOffice.bus.connection.channel_users(channel_name)[:users].any?)
|
9
|
+
|
9
10
|
ForeignOffice.publish(
|
10
11
|
channel: channel_name,
|
11
12
|
object: serialized_state
|
@@ -1,7 +1,22 @@
|
|
1
1
|
module ForeignOffice
|
2
2
|
module Busses
|
3
3
|
class GenericBus
|
4
|
-
def
|
4
|
+
def self.flush_messages
|
5
|
+
@@messages = []
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.published_messages
|
9
|
+
@@messages
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.publish(message)
|
13
|
+
@@messages << message
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.config(config)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.connection
|
5
20
|
end
|
6
21
|
end
|
7
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreign_office
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-10-
|
12
|
+
date: 2018-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|