honeybadger 3.0.0.beta5 → 3.0.0.beta6

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: 024a03997f1e5a8f37ba751c32c6adb21e7cc3ea
4
- data.tar.gz: f33bea69c33344b3bdc8c2d351cdf616063f7e1d
3
+ metadata.gz: 74dab15a34bc56efff8dc18638e90292ffb3f2fb
4
+ data.tar.gz: 6039d424a5eb1d9198025dda9a7231a164a8af6f
5
5
  SHA512:
6
- metadata.gz: 398c8575b8c3098e82d8a607ca039579af21bed972f5332df0de82d358613b83af4c6a1a4966ef947558374bc3d66051d71bb923ea6b08d4144120e6f8235aae
7
- data.tar.gz: 438d726976ec17fa2de5e41faac98cd366ced5ef61183b262816bbe09a999647c0a7ee1f10e337864929c66edd4ee80d2d644a433671bdc87c6b786b712c0416
6
+ metadata.gz: 675a431e9586d5d3e1371248effd2c5f27a7b6d2b14bbc4c099fe30b0ee4484de35ef57f17eb6ce272079143286071a96e38c80367e523cfae4a362f61ff0b4d
7
+ data.tar.gz: 593e71708e7ea207d9f72ae66f6225333aa05c84cd92d5351098d2ea4e8aae0853724006eebf0435f4753fa4435fa331f6a867bf01a0d505a5749a23e26c4e19
@@ -6,26 +6,22 @@ module Honeybadger
6
6
  module Resque
7
7
  module Extension
8
8
  def around_perform_with_honeybadger(*args)
9
- Honeybadger.flush do
10
- begin
11
- yield
12
- rescue Exception => e
13
- Honeybadger.notify(e, parameters: { job_arguments: args }) if send_exception?(e, args)
14
- raise e
15
- end
16
- end
9
+ Honeybadger.flush { yield }
17
10
  ensure
18
11
  Honeybadger.context.clear!
19
12
  end
20
13
 
21
- def send_exception?(e, args)
14
+ def on_failure_with_honeybadger(e, *args)
15
+ Honeybadger.notify(e, parameters: { job_arguments: args }) if send_exception_to_honeybadger?(e, args)
16
+ end
17
+
18
+ def send_exception_to_honeybadger?(e, args)
22
19
  return true unless respond_to?(:retry_criteria_valid?)
23
20
  return true if ::Honeybadger.config[:'resque.resque_retry.send_exceptions_when_retrying']
24
21
 
25
22
  !retry_criteria_valid?(e)
26
23
  rescue => e
27
24
  Honeybadger.notify(e, parameters: { job_arguments: args })
28
- raise e
29
25
  end
30
26
  end
31
27
 
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # Public: The current String Honeybadger version.
3
- VERSION = '3.0.0.beta5'.freeze
3
+ VERSION = '3.0.0.beta6'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta5
4
+ version: 3.0.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-25 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: