fanout 0.0.2 → 0.0.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 +4 -4
- data/lib/fanout.rb +4 -4
- data/lib/fppformat.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: 39412352a748c6f7ec1a08eb7fbe7fcdf23b7406
|
4
|
+
data.tar.gz: 4d054d92b8796e13031a8617afe6927a4cf10dec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01f5fd7cbceae533cf3c1fb77bc9808ba73cb424605f7162916ca5649644d21ce8ff1f655ebeb3a8a26aca772ca926b1ed61c11ed5b80a988bac72c2a877b6e2
|
7
|
+
data.tar.gz: 18897b074ee332216150f08a939d3bbd55a9e4d5c99c1c9c578001357d8c171d81193349d77cfa01174226e8e1d2f13c620d128efe86e5f26072bd21b1caee82
|
data/lib/fanout.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# fanout.rb
|
2
2
|
# ~~~~~~~~~
|
3
3
|
# This module implements the Fanout class.
|
4
|
-
# :copyright: (c) 2014 by
|
4
|
+
# :copyright: (c) 2014 by Fanout.io.
|
5
5
|
# :license: MIT, see LICENSE for more details.
|
6
6
|
|
7
7
|
require 'base64'
|
@@ -30,7 +30,7 @@ class Fanout
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def get_pubcontrol
|
33
|
-
if Thread.current
|
33
|
+
if Thread.current['pubcontrol'].nil?
|
34
34
|
if @ssl
|
35
35
|
scheme = 'https'
|
36
36
|
else
|
@@ -38,8 +38,8 @@ class Fanout
|
|
38
38
|
end
|
39
39
|
pub = PubControl.new('%s://api.fanout.io/realm/%s' % [scheme, @realm])
|
40
40
|
pub.set_auth_jwt({'iss' => @realm}, Base64.decode64(@key))
|
41
|
-
Thread.current
|
41
|
+
Thread.current['pubcontrol'] = pub
|
42
42
|
end
|
43
|
-
return Thread.current
|
43
|
+
return Thread.current['pubcontrol']
|
44
44
|
end
|
45
45
|
end
|
data/lib/fppformat.rb
CHANGED