fanout 0.0.8 → 0.1.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fanout.rb +7 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a7cee720eabb8d684af2fbbbd4cf7a59024967d
4
- data.tar.gz: 91bc1e73c7f0def34ee39042752cfdc9eebb0e28
3
+ metadata.gz: 80838b403995721eed658925a0fc346f15a0b2c7
4
+ data.tar.gz: e70c54930949eb43c6126a6a9d993e45ace51109
5
5
  SHA512:
6
- metadata.gz: fd39b01049e398917a9f1b1ba526e6b2c58db31ce892c8352598db01b4601dcd8d8f0d3bafae37d1f6c69d7eb68ff342a3fb6a8ee1144b5315d6a38ef03cb7a0
7
- data.tar.gz: 6125512e59a0a4830cc9a139c43fefe973a22921ea699fc571a25f5c91abd0650f83719ece1b170c624eab995d7d31ab0c9b03a68fca75668a503068b3f94db7
6
+ metadata.gz: a4b45a95ae151aeb20c322789ff234d184e9e7df41adbe0a053ccfb79952f89c218cc1eb15b7817155f4d9e49cb4f8011c2fd94eb2c1bf33354f4b3667393b1a
7
+ data.tar.gz: 4f330bf19c829d632203b8d632e5d6b8e36c378bdfaba992d387e973334d42f9ad911e3d717d1385b003e1e5cc5e3597dd2664269c1f8f1f3650636fdfdae3a5
data/lib/fanout.rb CHANGED
@@ -28,6 +28,11 @@ class Fanout
28
28
  pub.publish(channel, Item.new(FppFormat.new(data), id, prev_id))
29
29
  end
30
30
 
31
+ def finish
32
+ pub = get_pubcontrol
33
+ pub.finish
34
+ end
35
+
31
36
  def publish_async(channel, data, id=nil, prev_id=nil, callback=nil)
32
37
  pub = get_pubcontrol
33
38
  pub.publish_async(channel, Item.new(FppFormat.new(data), id, prev_id),
@@ -43,7 +48,8 @@ class Fanout
43
48
  else
44
49
  scheme = 'http'
45
50
  end
46
- pub = PubControl.new('%s://api.fanout.io/realm/%s' % [scheme, @realm])
51
+ pub = PubControlClient.new(
52
+ '%s://api.fanout.io/realm/%s' % [scheme, @realm])
47
53
  pub.set_auth_jwt({'iss' => @realm}, Base64.decode64(@key))
48
54
  Thread.current['pubcontrol'] = pub
49
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Bokarius
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1'
27
27
  description: A Ruby convenience library for publishing FPP format messages to Fanout.io
28
28
  using the EPCP protocol
29
29
  email: bokarius@comcast.net