exception_handling 2.7.0 → 2.8.0.pre.1

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: afa095c443e845d5430949250d3322dd48aaecafe82fe4c9c2d5ccc7f5564152
4
- data.tar.gz: '084ccae5591206c295baada42941ec9c30e27f251de8a5c92724508f0cceda54'
3
+ metadata.gz: ca16063169c18276e3283693a2c3c356b83efb7a7ca4e632f9724cc4b35fdd80
4
+ data.tar.gz: b00e5f97b873ca36eac9760bcda2b3d80b8db910fcd044a55a478f484f76e833
5
5
  SHA512:
6
- metadata.gz: 4818cdf704d8fc2c002fbb7d5d0bfa5a5b8ffeeaef5d75304b6bf383ef59b7249894232ba6ea85abb6e0baa84bf758e18cf4415ead62c9e570685825215ec616
7
- data.tar.gz: 32b87f2c3ef26d7c7ac830ae7368337141336acdf7e6885df0ab8eb8b9796a1c4ba7c8398947b7f5dcb0d7ea3b4d21878ff11c4484cd9f67aaf85dd4b045bf23
6
+ metadata.gz: 9a2dcfdf4378b1e516a0f857c68e9dd28ed1d7937ee8f9bc1c3e25d0b4477dbdda4136dba94664bccac4184042d0622ab00c6d8563035828a8c230f16477ab87
7
+ data.tar.gz: e779aa18aa656b587892067ef7af7673ed739bc8c986930b8de91220291a79be40d95429688845bf25b606da7893a84cfe3f3eb9d2d18ff1e86dcc82aea359cf
@@ -4,6 +4,10 @@ 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.8.0] - Unreleased
8
+ ### Deprecated
9
+ - Deprecated Email Escalation Methods: `escalate_to_production_support`, `escalate_error`, `escalate_warning`, `ensure_escalation`
10
+
7
11
  ## [2.7.0] - 2020-10-14
8
12
  ### Added
9
13
  - Added `LoggingMethods` as a replacement for `Methods` without setting controller or checking for long controller action.
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- exception_handling (2.7.0)
11
+ exception_handling (2.8.0.pre.1)
12
12
  actionmailer (>= 4.2, < 7.0)
13
13
  actionpack (>= 4.2, < 7.0)
14
14
  activesupport (>= 4.2, < 7.0)
@@ -348,6 +348,9 @@ module ExceptionHandling # never included
348
348
  nil
349
349
  end
350
350
 
351
+ deprecate :escalate_to_production_support, :escalate_error, :escalate_warning, :ensure_escalation,
352
+ deprecator: ActiveSupport::Deprecation.new('3.0', 'ExceptionHandling')
353
+
351
354
  def alert_warning(exception_or_string, alert_name, exception_context, log_context)
352
355
  ex = make_exception(exception_or_string)
353
356
  log_error(ex, exception_context, **log_context)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExceptionHandling
4
- VERSION = '2.7.0'
4
+ VERSION = '2.8.0.pre.1'
5
5
  end
@@ -1195,6 +1195,29 @@ describe ExceptionHandling do
1195
1195
  end
1196
1196
  end
1197
1197
 
1198
+ context "ExceptionHandling < 3.0 " do
1199
+ it "should return a deprecation warning" do
1200
+ ExceptionHandling.production_support_recipients = "prodsupport@example.com"
1201
+ expect { ExceptionHandling.escalate_to_production_support("blah", "invoca@example.com") }
1202
+ .to output(/DEPRECATION WARNING: escalate_to_production_support is deprecated and will be removed from ExceptionHandling 3.0/).to_stderr
1203
+ end
1204
+
1205
+ it "should return a deprecation warning" do
1206
+ expect { ExceptionHandling.escalate_error("blah", "invoca@example.com") }
1207
+ .to output(/DEPRECATION WARNING: escalate_error is deprecated and will be removed from ExceptionHandling 3.0/).to_stderr
1208
+ end
1209
+
1210
+ it "should return a deprecation warning" do
1211
+ expect { ExceptionHandling.escalate_warning("blah", "invoca@example.com") }
1212
+ .to output(/DEPRECATION WARNING: escalate_warning is deprecated and will be removed from ExceptionHandling 3.0/).to_stderr
1213
+ end
1214
+
1215
+ it "should return a deprecation warning" do
1216
+ expect { ExceptionHandling.ensure_escalation("blah", "invoca@example.com") }
1217
+ .to output(/DEPRECATION WARNING: ensure_escalation is deprecated and will be removed from ExceptionHandling 3.0/).to_stderr
1218
+ end
1219
+ end
1220
+
1198
1221
  private
1199
1222
 
1200
1223
  def logged_excluding_reload_filter
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.7.0
4
+ version: 2.8.0.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2020-10-15 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: '0'
188
+ version: 1.3.1
189
189
  requirements: []
190
190
  rubygems_version: 3.0.3
191
191
  signing_key: