resque-sentry 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0a3eb23f17f9a12f2354f8dacaf9e5ce81044cb
4
- data.tar.gz: 09604d044a3ddc80ba09f95b7ddb7bf63ba80079
3
+ metadata.gz: 2fa21dd27925c53fdcefdda80e12e432482fba21
4
+ data.tar.gz: 5716b8abe0ccb69ae5b84bdcc5aa8422acbec95f
5
5
  SHA512:
6
- metadata.gz: 70fee0f1125e3d09f07525f503c935afb376f5d254417f1b9c79b33a1e098ffae80e2ea045562c167bd8a626f48f2f11de7a7ab256fa938d0916dd45bc791e1d
7
- data.tar.gz: 87a891b9313d6260131a5c82b62850aef38a50f6ee677afc26104cfca679023b38cbe1b0e05d02c4f226eb1e453e199a380e701168986017b60526bdba1da4aa
6
+ metadata.gz: 7c625204a417bb1e973c4ba6afcc42b520390a6e1df2046cb41bfc775a21447cf969d6181febec89988ce77bddd0b19a272ae586cdb6791273a75f508e3208e2
7
+ data.tar.gz: 1069bd9ec9fdb4ec6d329d05e734d6a40c677886e00a691f2bdc92f7c7cc771c4a517da7b152ef8a2791b573d1ee4bbc1978ce117b5e88c11f2776633f66f6e7
@@ -28,6 +28,10 @@ module Resque
28
28
  def save
29
29
  options = {}
30
30
  options[:logger] = self.class.logger if self.class.logger
31
+ options[:extra] = {
32
+ "Object" => payload['class'],
33
+ "Arguments" => payload['args']
34
+ }
31
35
  Raven.capture_exception(exception, options)
32
36
  end
33
37
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'resque-sentry'
3
- gem.version = '1.1.1'
3
+ gem.version = '1.2.0'
4
4
  gem.authors = ['Harry Marr']
5
5
  gem.email = ['harry@gocardless.com']
6
6
  gem.summary = 'A failure backend for Resque that sends events to Sentry'
@@ -2,11 +2,16 @@ require 'spec_helper'
2
2
 
3
3
  describe Resque::Failure::Sentry do
4
4
  it "sends errors to Sentry" do
5
- sentry_options = {}
5
+ sentry_options = {
6
+ :extra => {
7
+ "Object" => Object,
8
+ "Arguments" => [ 1, "foo" ]
9
+ }
10
+ }
6
11
  exception = StandardError.new("Test Error")
7
12
  worker = Resque::Worker.new(:test)
8
13
  queue = "test"
9
- payload = {'class' => Object, 'args' => 1}
14
+ payload = {'class' => Object, 'args' => [ 1, "foo" ]}
10
15
 
11
16
  event = mock
12
17
  Raven.expects(:capture_exception).with(exception, sentry_options)
@@ -17,11 +22,17 @@ describe Resque::Failure::Sentry do
17
22
 
18
23
  it "will use the configured Sentry logger" do
19
24
  Resque::Failure::Sentry.logger = "resque"
20
- sentry_options = { :logger => "resque" }
25
+ sentry_options = {
26
+ :logger => "resque",
27
+ :extra => {
28
+ "Object" => Object,
29
+ "Arguments" => [ 1, "foo" ]
30
+ }
31
+ }
21
32
  exception = StandardError.new("Test Error")
22
33
  worker = Resque::Worker.new(:test)
23
34
  queue = "test"
24
- payload = {'class' => Object, 'args' => 1}
35
+ payload = {'class' => Object, 'args' => [ 1, "foo" ]}
25
36
 
26
37
  Raven.expects(:capture_exception).with(exception, sentry_options)
27
38
  backend = Resque::Failure::Sentry.new(exception, worker, queue, payload)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-sentry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Marr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-11 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque