effective_postmark 0.1.0 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50d0871b03f629a03dff786e0cddbfb4a84f05714e24e4d4a5391ae373735be
|
4
|
+
data.tar.gz: e7453a8ce3aedbde5c5585710fe08a59097b80bdbda9855df0cb2eb981ee665f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18875557e8e5ebe42f2e6df162ccf46035a39523878533a5c5fee6f3d04465dfb9a134f4dbd5dfd40525b4c3e7bde378aa09f059dc038cc8244b7a3e3e549a13
|
7
|
+
data.tar.gz: a30e6ebfc8fbc396126e36deda1296e07dd4a222671ac4ec452cfef9efea6dce9875b3c796c8287dc2ab55071e6034fdcfdfdde2a982047070b6146ce8588637
|
@@ -3,13 +3,14 @@ module EffectivePostmarkMailer
|
|
3
3
|
|
4
4
|
included do
|
5
5
|
# Make sure config.action_mailer.raise_delivery_errors = true
|
6
|
-
before_action do
|
6
|
+
before_action(unless: -> { Rails.env.test? || Rails.env.development? }) do
|
7
7
|
unless (Rails.application.config.action_mailer.raise_delivery_errors rescue false)
|
8
8
|
raise("Expected config.action_mailer.raise_delivery_errors to be true. Please update your environment for use with effective_postmark.")
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
rescue_from
|
12
|
+
rescue_from ::StandardError, with: :effective_postmark_error
|
13
|
+
rescue_from ::Postmark::InactiveRecipientError, with: :effective_postmark_inactive_recipient_error
|
13
14
|
end
|
14
15
|
|
15
16
|
def effective_postmark_inactive_recipient_error(exception)
|
@@ -39,4 +40,8 @@ module EffectivePostmarkMailer
|
|
39
40
|
true
|
40
41
|
end
|
41
42
|
|
43
|
+
def effective_postmark_error(exception)
|
44
|
+
true
|
45
|
+
end
|
46
|
+
|
42
47
|
end
|