honeybadger 4.2.0 → 4.2.1

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
  SHA256:
3
- metadata.gz: 4a6d163c5a87db64d1c5e591757d69dfd7be38854e01150c3ec4a86f041ea020
4
- data.tar.gz: b3b56e28bd3f5885d5db6adf4d23d7f7ce7bdce8497ce62f68b3b267921a0eee
3
+ metadata.gz: 05e9c7de2bd4014e179121924ea1a5fd6458b7c222b79bf8fe3f83b8003514d3
4
+ data.tar.gz: 9f4d71019d4c70edd7c4855fe614c65d5e1b0828e947c5e5139c6391c8996906
5
5
  SHA512:
6
- metadata.gz: f4eeb6527e4de32f97020b8b19af675e17500138aafde1ee1a9541ebf9b6b09fa7f62987f63d3908c03646ff4dd2303d10460d930c2b3075a4df2054e7003371
7
- data.tar.gz: 0ad30ae7ddf8a44d592cac241e5faa8b4c55589b2cba15d414e3c6d06df59f745fd2034d0cfa45334f0a81466d2b2904c65df368751af2ee87d6217ac2a5e60d
6
+ metadata.gz: 0dbafa05b24ddb36f788cf470a381261186dd3ec815f095394156405154f9e6ed75986b1caced46d5b82f8a9ef59b0228b277319237d320c054f4529ebb47dfa
7
+ data.tar.gz: a194e1bd2c80039f5a58050b059dcd62762cd5a9392292fc3b532eace76d6c577a1d220d0ea33a4377e8d71a593dfd303ee71edaa2bc8b33fe611e63635cebad
data/CHANGELOG.md CHANGED
@@ -5,14 +5,21 @@ adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.2.1] - 2019-02-01
9
+ ### Fixed
10
+ - Fix #301 - before_notify hooks are overridden on subsequent
11
+ `Honeybadger.configure` calls.
12
+ - Revert "Get the right controller / action name in Rails, when using an
13
+ exception app for custom error pages."
14
+
8
15
  ## [4.2.0] - 2019-01-31
9
16
  ### Changed
10
- - Issue a Notification from a Sidekiq job when either the `sidekiq.attempt_threshold` is reached OR if the job defined retry threshold is reached, whichever comes first.
17
+ - Issue a Notification from a Sidekiq job when either the `sidekiq.attempt_threshold` is reached OR if the job defined retry threshold is reached, whichever comes first. -@mstruve
11
18
  - Updated supported Ruby/Rails versions (MRI >= 2.3.0, JRuby >= 9.2, Rails >= 4.2)
12
19
  https://docs.honeybadger.io/ruby/gem-reference/supported-versions.html
13
20
 
14
21
  ### Added
15
- - Get the right controller / action name in Rails, when using an exception app for custom error pages.
22
+ - Get the right controller / action name in Rails, when using an exception app for custom error pages. -@fernandes
16
23
 
17
24
  ## [4.1.0] - 2018-10-16
18
25
  ### Added
@@ -82,13 +82,15 @@ module Honeybadger
82
82
  end
83
83
 
84
84
  def before_notify(action = nil, &block)
85
- (hash[:before_notify] ||= []).tap do |before_notify_hooks|
86
- if action && validate_before_action(action)
87
- before_notify_hooks << action
88
- elsif block_given? && validate_before_action(block)
89
- before_notify_hooks << block
90
- end
85
+ hooks = Array(get(:before_notify)).dup
86
+
87
+ if action && validate_before_action(action)
88
+ hooks << action
89
+ elsif block_given? && validate_before_action(block)
90
+ hooks << block
91
91
  end
92
+
93
+ hash[:before_notify] = hooks
92
94
  end
93
95
 
94
96
  def backtrace_filter
@@ -72,9 +72,9 @@ module Honeybadger
72
72
  end
73
73
 
74
74
  def configure
75
- ruby_config = Ruby.new(self)
76
- yield(ruby_config)
77
- self.ruby = ruby.merge(ruby_config).freeze
75
+ new_ruby = Ruby.new(self)
76
+ yield(new_ruby)
77
+ self.ruby = ruby.merge(new_ruby).freeze
78
78
  @logger = @backend = nil
79
79
  self
80
80
  end
@@ -33,21 +33,6 @@ module Honeybadger
33
33
  requirement { defined?(::Rails.application) && ::Rails.application }
34
34
 
35
35
  execution do
36
- if ::Rails.application.config.exceptions_app.is_a?(::ActionDispatch::Routing::RouteSet)
37
- Honeybadger.configure do |config|
38
- config.before_notify do |notice|
39
- begin
40
- route_resolver = ::Rails.application.routes.recognize_path(notice.url)
41
- notice.component = route_resolver[:controller]
42
- notice.action = route_resolver[:action]
43
- rescue ::ActionController::RoutingError
44
- # if rails can't find the route (like assets)
45
- # we just ignore and keep the old component / action
46
- end
47
- end
48
- end
49
- end
50
-
51
36
  require 'rack/request'
52
37
  if defined?(::ActionDispatch::DebugExceptions)
53
38
  # Rails 3.2.x+
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '4.2.0'.freeze
3
+ VERSION = '4.2.1'.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: 4.2.0
4
+ version: 4.2.1
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: 2019-01-31 00:00:00.000000000 Z
11
+ date: 2019-02-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: