irfsdash 0.0.4 → 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.
@@ -4,7 +4,10 @@ require "json"
4
4
  module IRFSDash
5
5
  # Returns an AMQP channel
6
6
  def self.amqp
7
- @b ||= Bunny.new(host: 'localhost')
7
+ return @b if @b
8
+ @b = Bunny.new(host: 'localhost')
9
+ @b.start
10
+ return @b
8
11
  end
9
12
  # Setup the library's defaults
10
13
  def self.setup(opts={})
@@ -25,7 +28,7 @@ module IRFSDash
25
28
  msg = opts.merge!(@defaults)
26
29
  raise ArgumentError, "No source specified" unless msg[:source]
27
30
  raise ArgumentError, "No project specified" unless msg[:project]
28
- raise ArgumentError, "No happy specified" unless msg[:happy]
31
+ raise ArgumentError, "No happy specified" unless msg.keys.include? :happy
29
32
  self.amqp.exchange("irfs-dashboard.projects", type: :fanout).publish(JSON.dump(msg))
30
33
  end
31
34
  # Publish to the ticker
@@ -1,3 +1,3 @@
1
1
  module IRFSDash
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irfsdash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: