exception_handling 2.11.0 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +6 -8
- data/exception_handling.gemspec +1 -1
- data/lib/exception_handling/version.rb +1 -1
- data/lib/exception_handling.rb +5 -4
- data/spec/helpers/exception_helpers.rb +1 -1
- data/spec/unit/exception_handling/exception_catalog_spec.rb +1 -1
- data/spec/unit/exception_handling/methods_spec.rb +1 -1
- data/spec/unit/exception_handling_spec.rb +23 -23
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ecd3cd1b1ac9c74a1b64c7ac8884122bf2625175c902fb211994c3fc2364fb6
|
4
|
+
data.tar.gz: 8549017918ed765348567a73abb52fa2b97ae85a0a910962738f7aabafccf5e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88892659d8e4c87209013b95b874eeb57b29c01b7648a07096cf915e4724264a70c184c76e0b0d8f07e3520ef9f7187bf8bfd94507877b7fe19ba785bc59ad4
|
7
|
+
data.tar.gz: b5d4dc17af467b3d0994ce18e7050c7490e38318ab6abdade3a4dc050b9242e64aaba936b55b8806948051892a5c2856d7bd7308030ed899b4d978a8cfd8b472
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,18 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
5
5
|
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [2.11.3] - 2022-04-07
|
8
|
+
### Fixed
|
9
|
+
- Fixed bug in ruby 2.7+ where `digest` was not required by default
|
10
|
+
|
11
|
+
## [2.11.2] - 2022-04-04
|
12
|
+
### Fixed
|
13
|
+
- Fixed Ruby 3+ bug where arguments where not being passed using ** operator when writing to the logger
|
14
|
+
|
15
|
+
## [2.11.1] - 2022-04-04
|
16
|
+
### Fixed
|
17
|
+
- Fixed bug in ruby 3+ where `contextual_logger` was missing ruby 3+ support
|
18
|
+
|
7
19
|
## [2.11.0] - 2022-03-29
|
8
20
|
### Added
|
9
21
|
- Added support for rails 2.7 and 3+
|
@@ -79,6 +91,11 @@ Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0
|
|
79
91
|
### Changed
|
80
92
|
- No longer depends on hobo_support. Uses invoca-utils 0.3 instead.
|
81
93
|
|
94
|
+
[2.11.3]: https://github.com/Invoca/exception_handling/compare/v2.11.2...v2.11.3
|
95
|
+
[2.11.2]: https://github.com/Invoca/exception_handling/compare/v2.11.1...v2.11.2
|
96
|
+
[2.11.1]: https://github.com/Invoca/exception_handling/compare/v2.11.0...v2.11.1
|
97
|
+
[2.11.0]: https://github.com/Invoca/exception_handling/compare/v2.10.0...v2.11.0
|
98
|
+
[2.10.0]: https://github.com/Invoca/exception_handling/compare/v2.9.0...v2.10.0
|
82
99
|
[2.9.0]: https://github.com/Invoca/exception_handling/compare/v2.8.1...v2.9.0
|
83
100
|
[2.8.1]: https://github.com/Invoca/exception_handling/compare/v2.8.0...v2.8.1
|
84
101
|
[2.8.0]: https://github.com/Invoca/exception_handling/compare/v2.7.0...v2.8.0
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
exception_handling (2.11.
|
4
|
+
exception_handling (2.11.3)
|
5
5
|
actionmailer (>= 5.2, < 7.0)
|
6
6
|
actionpack (>= 5.2, < 7.0)
|
7
7
|
activesupport (>= 5.2, < 7.0)
|
8
|
-
contextual_logger (~> 0
|
8
|
+
contextual_logger (~> 1.0)
|
9
9
|
escalate (~> 0.3)
|
10
10
|
eventmachine (~> 1.0)
|
11
11
|
invoca-utils (~> 0.3)
|
@@ -52,11 +52,11 @@ GEM
|
|
52
52
|
byebug (11.1.3)
|
53
53
|
coderay (1.1.2)
|
54
54
|
concurrent-ruby (1.1.10)
|
55
|
-
contextual_logger (0.
|
55
|
+
contextual_logger (1.0.0)
|
56
56
|
activesupport
|
57
57
|
json
|
58
58
|
crass (1.0.6)
|
59
|
-
diff-lcs (1.
|
59
|
+
diff-lcs (1.5.0)
|
60
60
|
digest (3.1.0)
|
61
61
|
erubi (1.10.0)
|
62
62
|
escalate (0.3.0)
|
@@ -67,7 +67,6 @@ GEM
|
|
67
67
|
i18n (1.10.0)
|
68
68
|
concurrent-ruby (~> 1.0)
|
69
69
|
invoca-utils (0.4.1)
|
70
|
-
io-wait (0.2.1)
|
71
70
|
jaro_winkler (1.5.3)
|
72
71
|
json (2.6.1)
|
73
72
|
loofah (2.15.0)
|
@@ -79,8 +78,7 @@ GEM
|
|
79
78
|
mini_mime (1.1.2)
|
80
79
|
mini_portile2 (2.8.0)
|
81
80
|
minitest (5.15.0)
|
82
|
-
net-protocol (0.1.
|
83
|
-
io-wait
|
81
|
+
net-protocol (0.1.3)
|
84
82
|
timeout
|
85
83
|
net-smtp (0.3.1)
|
86
84
|
digest
|
@@ -123,7 +121,7 @@ GEM
|
|
123
121
|
rspec-mocks (3.9.1)
|
124
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
125
123
|
rspec-support (~> 3.9.0)
|
126
|
-
rspec-support (3.9.
|
124
|
+
rspec-support (3.9.4)
|
127
125
|
rspec_junit_formatter (0.4.1)
|
128
126
|
rspec-core (>= 2, < 4, != 2.12.0)
|
129
127
|
rubocop (0.74.0)
|
data/exception_handling.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency 'actionmailer', '>= 5.2', '< 7.0'
|
24
24
|
spec.add_dependency 'actionpack', '>= 5.2', '< 7.0'
|
25
25
|
spec.add_dependency 'activesupport', '>= 5.2', '< 7.0'
|
26
|
-
spec.add_dependency 'contextual_logger', '~> 0
|
26
|
+
spec.add_dependency 'contextual_logger', '~> 1.0'
|
27
27
|
spec.add_dependency 'escalate', '~> 0.3'
|
28
28
|
spec.add_dependency 'eventmachine', '~> 1.0'
|
29
29
|
spec.add_dependency 'invoca-utils', '~> 0.3'
|
data/lib/exception_handling.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'digest'
|
3
4
|
require 'timeout'
|
4
5
|
require 'active_support'
|
5
6
|
require 'active_support/core_ext'
|
@@ -230,9 +231,9 @@ module ExceptionHandling # never included
|
|
230
231
|
log_message = "#{exception_context}\n#{ex.class}: (#{encode_utf8(ex.message.to_s)}):\n " + clean_backtrace(ex).join("\n ") + "\n\n"
|
231
232
|
|
232
233
|
if ex.is_a?(Warning)
|
233
|
-
ExceptionHandling.logger.warn("\nExceptionHandlingWarning (Warning:#{timestamp}) #{log_message}", log_context)
|
234
|
+
ExceptionHandling.logger.warn("\nExceptionHandlingWarning (Warning:#{timestamp}) #{log_message}", **log_context)
|
234
235
|
else
|
235
|
-
ExceptionHandling.logger.fatal("\nExceptionHandlingError (Error:#{timestamp}) #{log_message}", log_context)
|
236
|
+
ExceptionHandling.logger.fatal("\nExceptionHandlingError (Error:#{timestamp}) #{log_message}", **log_context)
|
236
237
|
end
|
237
238
|
end
|
238
239
|
end
|
@@ -304,11 +305,11 @@ module ExceptionHandling # never included
|
|
304
305
|
end
|
305
306
|
|
306
307
|
def log_info(message, **log_context)
|
307
|
-
ExceptionHandling.logger.info(message, log_context)
|
308
|
+
ExceptionHandling.logger.info(message, **log_context)
|
308
309
|
end
|
309
310
|
|
310
311
|
def log_debug(message, **log_context)
|
311
|
-
ExceptionHandling.logger.debug(message, log_context)
|
312
|
+
ExceptionHandling.logger.debug(message, **log_context)
|
312
313
|
end
|
313
314
|
|
314
315
|
def ensure_safe(exception_context = "", **log_context)
|
@@ -15,6 +15,6 @@ module ExceptionHelpers
|
|
15
15
|
|
16
16
|
def capture_notifications
|
17
17
|
@sent_notifications = []
|
18
|
-
allow(ExceptionHandling).to receive(:send_exception_to_honeybadger).with(
|
18
|
+
allow(ExceptionHandling).to receive(:send_exception_to_honeybadger).with(any_args) { |exception_info| @sent_notifications << exception_info }
|
19
19
|
end
|
20
20
|
end
|
@@ -41,7 +41,7 @@ module ExceptionHandling
|
|
41
41
|
@exception_catalog = ExceptionCatalog.new(ExceptionHandling.filter_list_filename)
|
42
42
|
|
43
43
|
expect(ExceptionHandling).to receive(:log_error).never
|
44
|
-
expect(ExceptionHandling).to receive(:write_exception_to_log).with(anything, "ExceptionCatalog#refresh_filters: ./config/exception_filters.yml",
|
44
|
+
expect(ExceptionHandling).to receive(:write_exception_to_log).with(anything, "ExceptionCatalog#refresh_filters: ./config/exception_filters.yml", any_args)
|
45
45
|
expect(@exception_catalog).to receive(:load_file) { raise "noooooo" }
|
46
46
|
|
47
47
|
@exception_catalog.find({})
|
@@ -31,7 +31,7 @@ module ExceptionHandling
|
|
31
31
|
it "use the current_controller when available" do
|
32
32
|
capture_notifications
|
33
33
|
|
34
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/blah/,
|
34
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/blah/, any_args).at_least(:once)
|
35
35
|
@controller.simulate_around_filter do
|
36
36
|
ExceptionHandling.log_error(ArgumentError.new("blah"))
|
37
37
|
expect(sent_notifications.size).to eq(1)
|
@@ -109,8 +109,8 @@ describe ExceptionHandling do
|
|
109
109
|
|
110
110
|
context "with warn and honeybadger notify stubbed" do
|
111
111
|
before do
|
112
|
-
allow(ExceptionHandling).to receive(:warn).with(
|
113
|
-
allow(Honeybadger).to receive(:notify).with(
|
112
|
+
allow(ExceptionHandling).to receive(:warn).with(any_args)
|
113
|
+
allow(Honeybadger).to receive(:notify).with(any_args)
|
114
114
|
end
|
115
115
|
|
116
116
|
context "with logger stashed" do
|
@@ -372,13 +372,13 @@ describe ExceptionHandling do
|
|
372
372
|
|
373
373
|
context "ExceptionHandling.ensure_safe" do
|
374
374
|
it "log an exception with call stack if an exception is raised." do
|
375
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
375
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
376
376
|
ExceptionHandling.ensure_safe { raise ArgumentError, "blah" }
|
377
377
|
end
|
378
378
|
|
379
379
|
if ActionView::VERSION::MAJOR >= 5
|
380
380
|
it "log an exception with call stack if an ActionView template exception is raised." do
|
381
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(Error:\d+\) \nActionView::Template::Error: \(blah\):\n /,
|
381
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(Error:\d+\) \nActionView::Template::Error: \(blah\):\n /, any_args)
|
382
382
|
ExceptionHandling.ensure_safe do
|
383
383
|
begin
|
384
384
|
# Rails 5 made the switch from ActionView::TemplateError taking in the original exception
|
@@ -391,7 +391,7 @@ describe ExceptionHandling do
|
|
391
391
|
end
|
392
392
|
else
|
393
393
|
it "log an exception with call stack if an ActionView template exception is raised." do
|
394
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(Error:\d+\) \nActionView::Template::Error: \(blah\):\n /,
|
394
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(Error:\d+\) \nActionView::Template::Error: \(blah\):\n /, any_args)
|
395
395
|
ExceptionHandling.ensure_safe { raise ActionView::TemplateError.new({}, ArgumentError.new("blah")) }
|
396
396
|
end
|
397
397
|
end
|
@@ -408,13 +408,13 @@ describe ExceptionHandling do
|
|
408
408
|
end
|
409
409
|
|
410
410
|
it "return nil if an exception is raised during an assignment" do
|
411
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
411
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
412
412
|
b = ExceptionHandling.ensure_safe { raise ArgumentError, "blah" }
|
413
413
|
expect(b).to be_nil
|
414
414
|
end
|
415
415
|
|
416
416
|
it "allow a message to be appended to the error when logged." do
|
417
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/mooo\nArgumentError: \(blah\):\n.*exception_handling_spec\.rb/,
|
417
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/mooo\nArgumentError: \(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
418
418
|
b = ExceptionHandling.ensure_safe("mooo") { raise ArgumentError, "blah" }
|
419
419
|
expect(b).to be_nil
|
420
420
|
end
|
@@ -422,7 +422,7 @@ describe ExceptionHandling do
|
|
422
422
|
it "only rescue StandardError and descendents" do
|
423
423
|
expect { ExceptionHandling.ensure_safe("mooo") { raise Exception } }.to raise_exception(Exception)
|
424
424
|
|
425
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/mooo\nStandardError: \(blah\):\n.*exception_handling_spec\.rb/,
|
425
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/mooo\nStandardError: \(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
426
426
|
|
427
427
|
b = ExceptionHandling.ensure_safe("mooo") { raise StandardError, "blah" }
|
428
428
|
expect(b).to be_nil
|
@@ -431,7 +431,7 @@ describe ExceptionHandling do
|
|
431
431
|
|
432
432
|
context "ExceptionHandling.ensure_completely_safe" do
|
433
433
|
it "log an exception if an exception is raised." do
|
434
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
434
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
435
435
|
ExceptionHandling.ensure_completely_safe { raise ArgumentError, "blah" }
|
436
436
|
end
|
437
437
|
|
@@ -447,19 +447,19 @@ describe ExceptionHandling do
|
|
447
447
|
end
|
448
448
|
|
449
449
|
it "return nil if an exception is raised during an assignment" do
|
450
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
450
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args) { nil }
|
451
451
|
b = ExceptionHandling.ensure_completely_safe { raise ArgumentError, "blah" }
|
452
452
|
expect(b).to be_nil
|
453
453
|
end
|
454
454
|
|
455
455
|
it "allow a message to be appended to the error when logged." do
|
456
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/mooo\nArgumentError: \(blah\):\n.*exception_handling_spec\.rb/,
|
456
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/mooo\nArgumentError: \(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
457
457
|
b = ExceptionHandling.ensure_completely_safe("mooo") { raise ArgumentError, "blah" }
|
458
458
|
expect(b).to be_nil
|
459
459
|
end
|
460
460
|
|
461
461
|
it "rescue any instance or child of Exception" do
|
462
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
462
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
463
463
|
ExceptionHandling.ensure_completely_safe { raise Exception, "blah" }
|
464
464
|
end
|
465
465
|
|
@@ -481,7 +481,7 @@ describe ExceptionHandling do
|
|
481
481
|
end
|
482
482
|
|
483
483
|
it "log the exception as usual and send the proper email" do
|
484
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
484
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
485
485
|
ExceptionHandling.ensure_escalation("Favorite Feature") { raise ArgumentError, "blah" }
|
486
486
|
expect(ActionMailer::Base.deliveries.count).to eq(1)
|
487
487
|
expect(sent_notifications.size).to eq(1), sent_notifications.inspect
|
@@ -516,7 +516,7 @@ describe ExceptionHandling do
|
|
516
516
|
|
517
517
|
it "allow the caller to specify custom recipients" do
|
518
518
|
custom_recipients = ['something@invoca.com']
|
519
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
519
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
520
520
|
ExceptionHandling.ensure_escalation("Favorite Feature", custom_recipients) { raise ArgumentError, "blah" }
|
521
521
|
expect(ActionMailer::Base.deliveries.count).to eq(1)
|
522
522
|
expect(sent_notifications.size).to eq(1), sent_notifications.inspect
|
@@ -532,7 +532,7 @@ describe ExceptionHandling do
|
|
532
532
|
context "ExceptionHandling.ensure_alert" do
|
533
533
|
it "log the exception as usual and fire a sensu event" do
|
534
534
|
expect(ExceptionHandling::Sensu).to receive(:generate_event).with("Favorite Feature", "test context\nblah")
|
535
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/,
|
535
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
536
536
|
ExceptionHandling.ensure_alert('Favorite Feature', 'test context') { raise ArgumentError, "blah" }
|
537
537
|
end
|
538
538
|
|
@@ -544,8 +544,8 @@ describe ExceptionHandling do
|
|
544
544
|
|
545
545
|
it "log if the sensu event could not be sent" do
|
546
546
|
expect(ExceptionHandling::Sensu).to receive(:send_event).with(anything) { raise "Failed to send" }
|
547
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/first_test_exception/,
|
548
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/Failed to send/,
|
547
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/first_test_exception/, any_args)
|
548
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/Failed to send/, any_args)
|
549
549
|
ExceptionHandling.ensure_alert("Not Used", 'test context') { raise ArgumentError, "first_test_exception" }
|
550
550
|
end
|
551
551
|
|
@@ -575,7 +575,7 @@ describe ExceptionHandling do
|
|
575
575
|
it "include the timestamp when the exception is logged" do
|
576
576
|
capture_notifications
|
577
577
|
|
578
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(Error:517033020\) context\nArgumentError: \(blah\):\n.*exception_handling_spec\.rb/,
|
578
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/\(Error:517033020\) context\nArgumentError: \(blah\):\n.*exception_handling_spec\.rb/, any_args)
|
579
579
|
b = ExceptionHandling.ensure_safe("context") { raise ArgumentError, "blah" }
|
580
580
|
expect(b).to be_nil
|
581
581
|
|
@@ -850,7 +850,7 @@ describe ExceptionHandling do
|
|
850
850
|
allow(ExceptionHandling).to receive(:make_exception) { raise ArgumentError, "Bad argument" }
|
851
851
|
expect(ExceptionHandling).to receive(:write_exception_to_log).with(satisfy { |ex| ex.to_s['Bad argument'] },
|
852
852
|
satisfy { |context| context['ExceptionHandlingError: log_error rescued exception while logging Runtime message'] },
|
853
|
-
|
853
|
+
any_args)
|
854
854
|
ExceptionHandling.log_error(RuntimeError.new("A runtime error"), "Runtime message")
|
855
855
|
end
|
856
856
|
|
@@ -858,7 +858,7 @@ describe ExceptionHandling do
|
|
858
858
|
expect(ExceptionHandling).to receive(:write_exception_to_log).with(satisfy { |ex| ex.to_s['Bad argument'] },
|
859
859
|
satisfy { |context| context['Context message'] },
|
860
860
|
anything,
|
861
|
-
|
861
|
+
any_args)
|
862
862
|
ExceptionHandling.log_error(ArgumentError.new("Bad argument"), "Context message") { |_data| raise 'Error!!!' }
|
863
863
|
end
|
864
864
|
|
@@ -963,7 +963,7 @@ describe ExceptionHandling do
|
|
963
963
|
it "omit environment defaults" do
|
964
964
|
capture_notifications
|
965
965
|
|
966
|
-
allow(ExceptionHandling).to receive(:send_exception_to_honeybadger).with(
|
966
|
+
allow(ExceptionHandling).to receive(:send_exception_to_honeybadger).with(any_args) { |exception_info| sent_notifications << exception_info }
|
967
967
|
|
968
968
|
ExceptionHandling.log_error("some message") do |data|
|
969
969
|
data[:environment] = { SERVER_PORT: '80', SERVER_PROTOCOL: "HTTP/1.0" }
|
@@ -1052,7 +1052,7 @@ describe ExceptionHandling do
|
|
1052
1052
|
ActionMailer::Base.deliveries.clear
|
1053
1053
|
|
1054
1054
|
set_test_const('EventMachine::Protocols::SmtpClient', SmtpClientErrbackStub)
|
1055
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/Exception to escalate/,
|
1055
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/Exception to escalate/, any_args)
|
1056
1056
|
expect(ExceptionHandling.logger).to receive(:fatal).with(/Failed to email by SMTP: "credential mismatch"/)
|
1057
1057
|
|
1058
1058
|
ExceptionHandling.ensure_escalation("ensure message") { raise 'Exception to escalate!' }
|
@@ -1064,7 +1064,7 @@ describe ExceptionHandling do
|
|
1064
1064
|
expect((SmtpClientErrbackStub.send_hash & EXPECTED_SMTP_HASH.keys).map_hash { |_k, v| v.to_s }).to eq(EXPECTED_SMTP_HASH), SmtpClientErrbackStub.send_hash.inspect end
|
1065
1065
|
|
1066
1066
|
it "log fatal on EventMachine dns resolver errback" do
|
1067
|
-
expect(ExceptionHandling.logger).to receive(:fatal).with(/Exception to escalate/,
|
1067
|
+
expect(ExceptionHandling.logger).to receive(:fatal).with(/Exception to escalate/, any_args)
|
1068
1068
|
expect(ExceptionHandling.logger).to receive(:fatal).with(/Failed to resolv DNS for localhost: "softlayer sucks"/)
|
1069
1069
|
|
1070
1070
|
ExceptionHandling.ensure_escalation("ensure message") { raise 'Exception to escalate!' }
|
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.11.
|
4
|
+
version: 2.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -76,14 +76,14 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0
|
79
|
+
version: '1.0'
|
80
80
|
type: :runtime
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
84
|
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0
|
86
|
+
version: '1.0'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: escalate
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|