exception_handling 2.4.4.pre.1 → 2.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -4
- data/Gemfile.lock +2 -2
- data/lib/exception_handling/version.rb +1 -1
- data/lib/exception_handling.rb +2 -8
- data/test/unit/exception_handling_test.rb +5 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de262141b33b7c4cb5e68018569d0465144097e36d0b85c268646cb0bfb5eb3f
|
4
|
+
data.tar.gz: cdbd41bfd1df237f6d6c3c1788ac52a0ed75314c5fbf63b3cb549edc21aeb3ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64db1560f94c6c62ced1d7b5afadd1ece6618ee62e41db250b2384e8193b29ec35e39b9389edb2a1e130b2aebf77b4e7851b8173a705b8a7b620284f62e1b9e
|
7
|
+
data.tar.gz: c2efcf1378cf70651ccd1e2e4f3f0f85ff4fe49714f7547d3b4517a0afb1c657f7a8def9dd4339aa7bd510fc714d53b27cc7120fe109fa12eea2c8bbfe98de6e
|
data/CHANGELOG.md
CHANGED
@@ -4,9 +4,9 @@ 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.4.4] -
|
8
|
-
###
|
9
|
-
-
|
7
|
+
## [2.4.4] - 2020-08-10
|
8
|
+
### Fixed
|
9
|
+
- `ExceptionHandling.logger = nil` no longer displays an "implicit extend" deprecation warning.
|
10
10
|
|
11
11
|
## [2.4.3] - 2020-05-14
|
12
12
|
### Deprecated
|
@@ -28,7 +28,7 @@ Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0
|
|
28
28
|
### Changed
|
29
29
|
- No longer depends on hobo_support. Uses invoca-utils 0.3 instead.
|
30
30
|
|
31
|
-
[2.4.
|
31
|
+
[2.4.3]: https://github.com/Invoca/exception_handling/compare/v2.4.3...v2.4.4
|
32
32
|
[2.4.3]: https://github.com/Invoca/exception_handling/compare/v2.4.2...v2.4.3
|
33
33
|
[2.4.2]: https://github.com/Invoca/exception_handling/compare/v2.4.1...v2.4.2
|
34
34
|
[2.4.1]: https://github.com/Invoca/exception_handling/compare/v2.4.0...v2.4.1
|
data/Gemfile.lock
CHANGED
@@ -8,7 +8,7 @@ GIT
|
|
8
8
|
PATH
|
9
9
|
remote: .
|
10
10
|
specs:
|
11
|
-
exception_handling (2.4.4
|
11
|
+
exception_handling (2.4.4)
|
12
12
|
actionmailer (>= 4.2, < 7.0)
|
13
13
|
actionpack (>= 4.2, < 7.0)
|
14
14
|
activesupport (>= 4.2, < 7.0)
|
@@ -55,7 +55,7 @@ GEM
|
|
55
55
|
builder (3.2.3)
|
56
56
|
coderay (1.1.2)
|
57
57
|
concurrent-ruby (1.1.5)
|
58
|
-
contextual_logger (0.
|
58
|
+
contextual_logger (0.8.0)
|
59
59
|
activesupport
|
60
60
|
json
|
61
61
|
crass (1.0.6)
|
data/lib/exception_handling.rb
CHANGED
@@ -57,7 +57,7 @@ module ExceptionHandling # never included
|
|
57
57
|
Deprecation3_0 = ActiveSupport::Deprecation.new('3.0', 'exception_handling')
|
58
58
|
|
59
59
|
def logger=(logger)
|
60
|
-
@logger = if logger.is_a?(ContextualLogger::LoggerMixin)
|
60
|
+
@logger = if logger.nil? || logger.is_a?(ContextualLogger::LoggerMixin)
|
61
61
|
logger
|
62
62
|
else
|
63
63
|
Deprecation3_0.deprecation_warning('implicit extend with ContextualLogger::LoggerMixin', 'extend your logger instance or include into your logger class first')
|
@@ -220,13 +220,7 @@ module ExceptionHandling # never included
|
|
220
220
|
#
|
221
221
|
def write_exception_to_log(ex, exception_context, timestamp, log_context = {})
|
222
222
|
ActiveSupport::Deprecation.silence do
|
223
|
-
|
224
|
-
|
225
|
-
if ex.is_a?(Warning)
|
226
|
-
ExceptionHandling.logger.warn(log_message, log_context)
|
227
|
-
else
|
228
|
-
ExceptionHandling.logger.fatal(log_message, log_context)
|
229
|
-
end
|
223
|
+
ExceptionHandling.logger.fatal("\nExceptionHandlingError (Error:#{timestamp}) #{ex.class} #{exception_context} (#{encode_utf8(ex.message.to_s)}):\n " + clean_backtrace(ex).join("\n ") + "\n\n", log_context)
|
230
224
|
end
|
231
225
|
end
|
232
226
|
|
@@ -126,6 +126,11 @@ class ExceptionHandlingTest < ActiveSupport::TestCase
|
|
126
126
|
assert_equal ancestors, ExceptionHandling.logger.singleton_class.ancestors.*.name
|
127
127
|
end
|
128
128
|
|
129
|
+
should "allow logger = nil (no deprecation warning)" do
|
130
|
+
mock(STDERR).puts(/DEPRECATION WARNING/).never
|
131
|
+
ExceptionHandling.logger = nil
|
132
|
+
end
|
133
|
+
|
129
134
|
should "[deprecated] mix in ContextualLogger::Mixin if not there" do
|
130
135
|
mock(STDERR).puts(/DEPRECATION WARNING: implicit extend with ContextualLogger::LoggerMixin is deprecated and will be removed from exception_handling 3\.0/)
|
131
136
|
logger = Logger.new('/dev/null')
|
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.4.4
|
4
|
+
version: 2.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -168,7 +168,7 @@ licenses: []
|
|
168
168
|
metadata:
|
169
169
|
source_code_uri: https://github.com/Invoca/exception_handling
|
170
170
|
allowed_push_host: https://rubygems.org
|
171
|
-
post_install_message:
|
171
|
+
post_install_message:
|
172
172
|
rdoc_options: []
|
173
173
|
require_paths:
|
174
174
|
- lib
|
@@ -179,12 +179,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- - "
|
182
|
+
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubygems_version: 3.0.3
|
187
|
-
signing_key:
|
187
|
+
signing_key:
|
188
188
|
specification_version: 4
|
189
189
|
summary: Invoca's exception handling logger/emailer layer, based on exception_notifier.
|
190
190
|
Works with Rails or EventMachine or EventMachine+Synchrony.
|