exception_handling 2.8.0 → 2.8.1.pre.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18b5943731438b58f95dd8bbca259e16e7ab96de2f2f8fda23ca3ea31bd4ee45
|
4
|
+
data.tar.gz: 0ecc45cf4314eaea85045c9a5eff37e2b97ae2dee157dc20d8b3232d72bb0845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a315ec480e19c9e7f289c85daadd2ea4866f91be69218fa64c0ccfecf979ec85e4ea2419fd84210271dbd45c577e7721af17d402b3ba0b1cad9adef0c15d8814
|
7
|
+
data.tar.gz: 12e47f2b180b823e689e579614455c280bc60bf2d5622504ec609d6eb6605dd65d82f4bcff1c52a3997db186b2077646c0a38a78bf55ff7bbd949cb1a7c251b2
|
data/Gemfile.lock
CHANGED
@@ -8,7 +8,7 @@ GIT
|
|
8
8
|
PATH
|
9
9
|
remote: .
|
10
10
|
specs:
|
11
|
-
exception_handling (2.8.0)
|
11
|
+
exception_handling (2.8.1.pre.0)
|
12
12
|
actionmailer (>= 4.2, < 7.0)
|
13
13
|
actionpack (>= 4.2, < 7.0)
|
14
14
|
activesupport (>= 4.2, < 7.0)
|
@@ -61,7 +61,7 @@ GEM
|
|
61
61
|
json
|
62
62
|
crass (1.0.6)
|
63
63
|
diff-lcs (1.4.4)
|
64
|
-
erubi (1.
|
64
|
+
erubi (1.10.0)
|
65
65
|
eventmachine (1.2.7)
|
66
66
|
globalid (0.4.2)
|
67
67
|
activesupport (>= 4.2.0)
|
@@ -128,10 +128,10 @@ GEM
|
|
128
128
|
power_assert
|
129
129
|
thor (1.0.1)
|
130
130
|
thread_safe (0.3.6)
|
131
|
-
tzinfo (1.2.
|
131
|
+
tzinfo (1.2.8)
|
132
132
|
thread_safe (~> 0.1)
|
133
133
|
unicode-display_width (1.6.0)
|
134
|
-
zeitwerk (2.4.
|
134
|
+
zeitwerk (2.4.1)
|
135
135
|
|
136
136
|
PLATFORMS
|
137
137
|
ruby
|
@@ -82,9 +82,10 @@ module ExceptionHandling
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def controller_name
|
85
|
-
@controller_name ||=
|
86
|
-
|
87
|
-
|
85
|
+
@controller_name ||= (
|
86
|
+
@merged_log_context[:honeybadger_grouping] ||
|
87
|
+
(@controller && @controller.request.parameters.with_indifferent_access[:controller])
|
88
|
+
).to_s
|
88
89
|
end
|
89
90
|
|
90
91
|
private
|
@@ -361,6 +361,26 @@ module ExceptionHandling
|
|
361
361
|
}
|
362
362
|
end
|
363
363
|
|
364
|
+
it "returns honeybadger_grouping from the log context" do
|
365
|
+
allow(ExceptionHandling.logger).to receive(:current_context_for_thread).and_return({ honeybadger_grouping: 'Group 1' })
|
366
|
+
exception_info = ExceptionInfo.new(@exception, @exception_context, @timestamp)
|
367
|
+
|
368
|
+
expect(exception_info.controller_name).to eq('Group 1')
|
369
|
+
end
|
370
|
+
|
371
|
+
it "returns honeybadger_grouping from log context even if controller is defined" do
|
372
|
+
allow(ExceptionHandling.logger).to receive(:current_context_for_thread).and_return({ honeybadger_grouping: 'Group 1' })
|
373
|
+
|
374
|
+
env = { server: 'fe98' }
|
375
|
+
parameters = { controller: 'some_controller' }
|
376
|
+
session = { username: 'smith' }
|
377
|
+
request_uri = "host/path"
|
378
|
+
controller = create_dummy_controller(env, parameters, session, request_uri)
|
379
|
+
exception_info = ExceptionInfo.new(@exception, @exception_context, @timestamp, controller: controller)
|
380
|
+
|
381
|
+
expect(exception_info.controller_name).to eq('Group 1')
|
382
|
+
end
|
383
|
+
|
364
384
|
it "return controller_name when controller is present" do
|
365
385
|
env = { server: 'fe98' }
|
366
386
|
parameters = { controller: 'some_controller' }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_handling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.0
|
4
|
+
version: 2.8.1.pre.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -183,9 +183,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
183
|
version: '0'
|
184
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
185
|
requirements:
|
186
|
-
- - "
|
186
|
+
- - ">"
|
187
187
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
188
|
+
version: 1.3.1
|
189
189
|
requirements: []
|
190
190
|
rubygems_version: 3.0.3
|
191
191
|
signing_key:
|