foreign_office 0.15.2 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7c0d5eab9bd92abc22b89885b3b91f5cfd0f728
4
- data.tar.gz: a1103100c657659689bde5d39925d930603bb07e
3
+ metadata.gz: 55303fba31a5fed680fcf1da22b7295bcfcb842b
4
+ data.tar.gz: 67eea7e5379017d3730e17ba1b6667e37bf5bbc6
5
5
  SHA512:
6
- metadata.gz: 85d7d00183e85eebef92a36420253bab491e075ff1ffefff6588c431f8c494b0d660cadafeded4c231ce2e2047cfa51eaad775e5cb540a1e2da8f7ff7cb20d2e
7
- data.tar.gz: 1c54de66b4cc0a42517a3648b6ebdfd78b83f7ae207ea5e9466344ef7ee9a0e9b5d5dc3303b7c6360c19ee7803748f506d974fbe64ce510c952c8bbf57db18c0
6
+ metadata.gz: e3a39fe3a33286a6600a9039c01f0638b8c7b20b22bc9eb2f318ca3519bf52f14acaf70f854bba4ffcf40c7cdc55d0fe35c5e88d10830c598861946944121897
7
+ data.tar.gz: fc8b37b30d72a95d50c8ca09fcd617253804cba4e3e81267557352f3e4b81ead87e0a0a295fffbb05c9b8026d2ad75708fbe59181a9448aac4022e55ac9e1c3a
@@ -6,10 +6,13 @@ var PusherBus = Class.extend({
6
6
  this.pusher = new Pusher(key, config);
7
7
  },
8
8
  subscribe: function(subscription){
9
- this.channel = this.pusher.subscribe(subscription.channel);
9
+ this.channel = this.pusher.subscribe(this.get_channel_name(subscription.channel));
10
10
  this.channel.bind('publish', function(data){
11
11
  subscription.callback(data);
12
12
  })
13
+ },
14
+ get_channel_name: function(channel_name){
15
+ return channel_name.replace(/::/g, '.')
13
16
  }
14
17
  })
15
18
  PusherBus.third_party_library = 'Pusher'
@@ -34,10 +34,15 @@ class ForeignOffice::Busses::PusherBus < ForeignOffice::Busses::GenericBus
34
34
 
35
35
  def self.publish(message)
36
36
  message.symbolize_keys!
37
+ channel = sanitize_channel(message[:channel])
37
38
  self.connection.trigger(
38
- message[:channel],
39
+ channel,
39
40
  'publish',
40
41
  message
41
42
  )
42
43
  end
44
+
45
+ def self.sanitize_channel(channel)
46
+ channel.gsub(/::/,'.')
47
+ end
43
48
  end
@@ -1,3 +1,3 @@
1
1
  module ForeignOffice
2
- VERSION = "0.15.2"
2
+ VERSION = "0.15.3"
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.15.2
4
+ version: 0.15.3
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: 2017-07-06 00:00:00.000000000 Z
12
+ date: 2017-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails