denouncer 0.2.0 → 0.2.1

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: 0d9585cf186ffdb08fc942cddf41d041f1296206
4
- data.tar.gz: de1fab455ae3ae74db81b561b99d06bc32e945cc
3
+ metadata.gz: 26ee8ecb82cc1d8c0c3344e38f0cdbb483c8df65
4
+ data.tar.gz: 64863e1e400e11f35e897e68086bbc3e426dc867
5
5
  SHA512:
6
- metadata.gz: 8498a42f1f5aa436c0f0b567caa64da06a624360fdbe3c6eefefc59c434bf6b0819716d3852c40593fdb27ead6d540e24dfbeeaa39b67d0321bda470553a2af4
7
- data.tar.gz: ec63e2488edf124098f3c2e64c59293d0c4dd62b093b4e32db555927033107921cd6b78cd181eadb59413322a1d644afb6d887f06ea027c89ff79e10626d5501
6
+ metadata.gz: f1a63cdf5f8f53f6885a542f66ddb00c2c288b4b90421ae7d4c132b48d8784927110344b9c22f3444453e057c3d447779cb58e9447850e96589f430b76b4586b
7
+ data.tar.gz: 52d3545bf61aa5ad1e2a179c3fb5a1931f613c06ba5371b97395c4ca0e73c26824ff2ea9cee04bda77d1c33d2d8aabf03f34271ba188323fe7e3164edd6b3435
data/README.md CHANGED
@@ -89,14 +89,14 @@ The bunny gem is required for the AmqpNotifier. Please add the bunny gem to your
89
89
 
90
90
  gem 'bunny'
91
91
 
92
- Configuration variables are:
93
- * application_name - the name of your application (required)
94
- * server - the amqp server address to use (default: localhost)
95
- * port - the port to use for amqp connections (default: 5672)
96
- * username - the username for the amqp connection (default: 'guest')
97
- * password - the password for the amqp connection (default: 'guest')
98
- * vhost - the virtual host to use for the amqp connection (default: '/')
99
- * message_queue - the message queue to use (default: "#{application_name}.errors", e.g. "myapp.errors")
92
+ Configuration variables are:
93
+ * application_name - the name of your application (required)
94
+ * server - the amqp server address to use (default: localhost)
95
+ * port - the port to use for amqp connections (default: 5672)
96
+ * username - the username for the amqp connection (default: 'guest')
97
+ * password - the password for the amqp connection (default: 'guest')
98
+ * vhost - the virtual host to use for the amqp connection (default: '/')
99
+ * message_queue - the message queue to use (default: "#{application_name}.errors", e.g. "myapp.errors")
100
100
 
101
101
  #### AMQP Configuration
102
102
 
@@ -39,7 +39,7 @@ module Denouncer
39
39
  # @param metadata [Hash]
40
40
  def self.notify(error, metadata = nil)
41
41
  raise "Denouncer is not configured yet. Please run Denouncer.configure(options) to setup denouncer!" if @@notifier.nil?
42
- notifier.notify error
42
+ notifier.notify error, metadata
43
43
  end
44
44
 
45
45
  private
@@ -1,3 +1,3 @@
1
1
  module Denouncer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -7,6 +7,9 @@ describe Denouncer do
7
7
  let(:error) do
8
8
  StandardError.new("Test")
9
9
  end
10
+ let(:metadata) do
11
+ { var1: "abc" }
12
+ end
10
13
 
11
14
  before do
12
15
  Denouncer.reset_configuration
@@ -141,8 +144,8 @@ describe Denouncer do
141
144
 
142
145
  it "should call it's notifiers notify method" do
143
146
  notifier = Denouncer.send(:notifier)
144
- expect(notifier).to receive(:notify)
145
- Denouncer.notify error
147
+ expect(notifier).to receive(:notify).with(error, metadata)
148
+ Denouncer.notify error, metadata
146
149
  end
147
150
  end
148
151
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: denouncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Weber