foreign_office 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreign_office/busses/pubnub_bus.rb +25 -5
- data/lib/foreign_office/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 668f47d96a39226d2a51f223d591f5fb1803bc24
|
4
|
+
data.tar.gz: 8814b865d404865e65b29723e9f06cb8de8bf9ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1997b2f11d8849ef1a9f2afc96972f1d4b2996aafef73e9044231048aa8834a73d8798c522f6424f9a52f3156b5daba7f020be4145fac1ce7c1bb699ea585a9c
|
7
|
+
data.tar.gz: 3874f4fb26b88828bc9a8158ceb015dd8fe6260cf5651b9960eee8cdb31ce7252df1c45de256cef58e242f67891e96833f9891d237ffccf6cfbe14a79e793f2e
|
@@ -1,14 +1,34 @@
|
|
1
1
|
class ForeignOffice::Busses::PubnubBus < ForeignOffice::Busses::GenericBus
|
2
2
|
|
3
|
-
def self.
|
4
|
-
@
|
3
|
+
def self.publish_key=(publish_key)
|
4
|
+
@publish_key = publish_key
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.publish_key
|
8
|
+
@publish_key
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.subscribe_key=(subscribe_key)
|
12
|
+
@subscribe_key = subscribe_key
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.subscribe_key
|
16
|
+
@subscribe_key
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.secret_key=(secret_key)
|
20
|
+
@secret_key = secret_key
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.secret_key
|
24
|
+
@secret_key
|
5
25
|
end
|
6
26
|
|
7
27
|
def self.connection
|
8
28
|
@pubnub ||= ::Pubnub.new(
|
9
|
-
publish_key: self.
|
10
|
-
subscribe_key: self.
|
11
|
-
secret_key: self.
|
29
|
+
publish_key: self.publish_key, # publish_key only required if publishing.
|
30
|
+
subscribe_key: self.subscribe_key, # required
|
31
|
+
secret_key: self.secret_key,
|
12
32
|
error_callback: lambda { |msg| Rails.logger.error( msg.inspect )}
|
13
33
|
)
|
14
34
|
end
|