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: 9d0c9446d27d1d583ef264ee14cf028f1ecc84a82d9fa7a300889205e4bcbfd6
4
- data.tar.gz: b64b5d31d96a7d85d22138078a2205305df5cc1458d62610bd68f9d82fcfa990
3
+ metadata.gz: 7563bca6ddd01f40e9571962a13c80fe7c5805e98642f593dbe974ed7fd0ba2f
4
+ data.tar.gz: 774a06b3f4d0beec54faf094148f7a66ae83cf1c0095a3cb9de5ea3df3424982
5
5
  SHA512:
6
- metadata.gz: 2d5c3db38421294c670162bd9d98cdeb43e2f52d89de1a38cf70bce84aaca81e680e076e409594544d79c856611875c22826e8e6d7bda248c4afc38d2de8283a
7
- data.tar.gz: e79c2b10c802e27b7feeb382dcbefd43d9abff92bda3456cc628930f6b84c26d320748c7e481f6679c69154607dc92a77ee6ee825819429419991354625ce7cb
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
- channel_presence = ForeignOffice.bus.connection.channel_users(channel_name)
8
- if channel_presence[:users].any?
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 publish(message)
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
@@ -1,3 +1,3 @@
1
1
  module ForeignOffice
2
- VERSION = "0.17.0"
2
+ VERSION = "0.17.1"
3
3
  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.0
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-17 00:00:00.000000000 Z
12
+ date: 2018-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails