exception_handling 2.4.4.pre.1 → 2.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e18b802032b87ce35aee9ab2a3eebd4177686e5ff9bca74ed0f32e5c266e517
4
- data.tar.gz: 12a870a3f4ed762298cd13a045edba06b470c9aea9d29324b0642163779610d0
3
+ metadata.gz: de262141b33b7c4cb5e68018569d0465144097e36d0b85c268646cb0bfb5eb3f
4
+ data.tar.gz: cdbd41bfd1df237f6d6c3c1788ac52a0ed75314c5fbf63b3cb549edc21aeb3ed
5
5
  SHA512:
6
- metadata.gz: 121a94c85c7dad8f56003674dcee796e1dd80e7e96c31012e0343614ca6375f192734c4c0b2e4fd8025f4f66d8cc306ed157a28a8bf213b5ec94af6c5a7dc65d
7
- data.tar.gz: 20d94f407272de21c341362a18be4500a984aa6f2fad05d9706ee1ed6943d2537f281aff315c48e028095dcdfbe491bb0ef3cc32c35eff6473ab176259ab30ab
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] - Unreleased
8
- ### Changed
9
- - Calling `log_warning` will now log with Severity::WARNING rather than FATAL.
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.4]: https://github.com/Invoca/exception_handling/compare/v2.4.3...v2.4.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.pre.1)
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.9.0)
58
+ contextual_logger (0.8.0)
59
59
  activesupport
60
60
  json
61
61
  crass (1.0.6)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExceptionHandling
4
- VERSION = '2.4.4.pre.1'
4
+ VERSION = '2.4.4'
5
5
  end
@@ -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
- log_message = "\nExceptionHandlingError (Error:#{timestamp}) #{ex.class} #{exception_context} (#{encode_utf8(ex.message.to_s)}):\n " + clean_backtrace(ex).join("\n ") + "\n\n"
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.pre.1
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-18 00:00:00.000000000 Z
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: 1.3.1
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.