honeybadger 2.5.1 → 2.5.2

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: 1b31bd8716a5e665f0bb0d918e6adb62b826f849
4
- data.tar.gz: 8d69cf023169b8199787746d2e69b6f5f5d78951
3
+ metadata.gz: 473d0c1bd287348d9677f0dc65f79a423964cf81
4
+ data.tar.gz: ff8a2c8ad3a02a69a4a04d4f2915cefdf8b0a620
5
5
  SHA512:
6
- metadata.gz: ef6699cfdd88318bb93afbc916dec1cfaf87471cea127423a2fdc3a902d26fed0e15ee09b5e5e1dff5a5f7265e244f642185303802e32e3e585f94883ab3dcf7
7
- data.tar.gz: 79bd831c0bbfee6e4b2a9dd53c15da58af7edc4a00aa36b81fd6d23eb569a6211bf05748cedfeefe97f7d8252e37a0a4e9a75b050f936ea996fb861d34834c79
6
+ metadata.gz: c47429c337511a8d9cefbb55d2362e6f694c9716448a3a06dc8b4d5b88548e7ef4417ee835e96e8cbca7e0efdb96b7f95408b7914fc87c244ba725c1a11e7ee9
7
+ data.tar.gz: ef5162bc256f1e39e53fdda7cfb9fd3a71aca81413a9599ed719eed631f70d797f977c23b419e25509803cd810a35df4eb5cb92a6c7847d57533071385d35731
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ## [2.5.2] - 2016-03-08
9
+ ### Fixed
10
+ - Allow plugin names in config to be symbols or strings (#177).
11
+ - Fix bug in resque-retry logic. -@davidguthu
12
+
8
13
  ## [2.5.1] - 2016-02-22
9
14
  ### Fixed
10
15
  - Fix bug in resque-retry logic. -@davidguthu
data/README.md CHANGED
@@ -90,6 +90,10 @@ This step isn't necessary if you're using our [Heroku add-on](https://elements.h
90
90
 
91
91
  You're done! Any rake tasks and job queues that load the Rails environment are also covered.
92
92
 
93
+ For more info, check out our screencast on getting up and running with Honeybadger and Rails:
94
+
95
+ [![Using the Honeybadger gem with Rails](https://embed-ssl.wistia.com/deliveries/e1e2133b8f1bec224c57f6677f6bdb11691b3822.jpg?image_play_button=true&image_play_button_color=7b796ae0&image_crop_resized=150x84)](https://honeybadger.wistia.com/medias/l3cmyucx8f)
96
+
93
97
  #### Sinatra
94
98
 
95
99
  All you need to do is to include the honeybadger gem:
@@ -105,6 +109,10 @@ get '/' do
105
109
  end
106
110
  ```
107
111
 
112
+ To see an example of a sinatra implementation, check out this video:
113
+
114
+ [![Using the Honeybadger gem with Sinatra](https://embed-ssl.wistia.com/deliveries/7c9b6e6831f2288874f24d10eec88116e9f378eb.jpg?image_play_button=true&image_play_button_color=7b796ae0&image_crop_resized=150x84)](https://honeybadger.wistia.com/medias/b2wr5n9fcv)
115
+
108
116
  #### Rack
109
117
 
110
118
  With rack, you have to do things manually, but it's still just a few lines of code:
@@ -255,9 +255,9 @@ api_key: '#{self[:api_key]}'
255
255
  end
256
256
 
257
257
  def load_plugin?(name)
258
- return false if Array(self[:'plugins.skip']).include?(name)
259
- return true if self[:plugins].nil?
260
- Array(self[:plugins]).include?(name)
258
+ return false if includes_token?(self[:'plugins.skip'], name)
259
+ return true unless self[:plugins].kind_of?(Array)
260
+ includes_token?(self[:plugins], name)
261
261
  end
262
262
 
263
263
  def ping
@@ -308,6 +308,17 @@ api_key: '#{self[:api_key]}'
308
308
 
309
309
  private
310
310
 
311
+ # Internal: Does collection include the String value or Symbol value?
312
+ #
313
+ # obj - The Array object, if present.
314
+ # value - The value which may exist within Array obj.
315
+ #
316
+ # Returns true or false.
317
+ def includes_token?(obj, value)
318
+ return false unless obj.kind_of?(Array)
319
+ obj.map(&:to_sym).include?(value.to_sym)
320
+ end
321
+
311
322
  def ping_payload
312
323
  {
313
324
  version: VERSION,
@@ -21,20 +21,13 @@ module Honeybadger
21
21
  end
22
22
 
23
23
  def send_exception?(e, args)
24
- if defined?(::Resque::Plugins::Retry)
25
- begin
26
- if ::Honeybadger::Agent.config[:'resque.resque_retry.send_exceptions_when_retrying']
27
- true
28
- else
29
- !retry_criteria_valid?(e)
30
- end
31
- rescue => e
32
- Honeybadger.notify(e, parameters: { job_arguments: args })
33
- raise e
34
- end
35
- else
36
- true
37
- end
24
+ return true unless respond_to?(:retry_criteria_valid?)
25
+ return true if ::Honeybadger::Agent.config[:'resque.resque_retry.send_exceptions_when_retrying']
26
+
27
+ !retry_criteria_valid?(e)
28
+ rescue => e
29
+ Honeybadger.notify(e, parameters: { job_arguments: args })
30
+ raise e
38
31
  end
39
32
  end
40
33
 
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # Public: The current String Honeybadger version.
3
- VERSION = '2.5.1'.freeze
3
+ VERSION = '2.5.2'.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: 2.5.1
4
+ version: 2.5.2
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: 2016-02-22 00:00:00.000000000 Z
11
+ date: 2016-03-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: