email_error_reporter 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/lib/email_error_reporter/engine.rb +5 -2
- data/lib/email_error_reporter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b83248a211bd2ca5e29e1ea4b7f9cb2abd840ce07043da60b983d5d66b85a426
|
4
|
+
data.tar.gz: 346f2ff677450545ab25b6b4ab054d48d020482369ee66deabd1169a5f30d06e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e4b317060de34be9cdd274c2d1820fcd807dc4e693138d9f831f87b58f08e8d1e457e21e235a39b1cce5684f50fcf385ab9c7702441ae3cd0fe0ea0b255a99c
|
7
|
+
data.tar.gz: 0320b65b635fea9be9589873bcd2744a946e3b015c39e5b6b70167d5545d04f3a4edf7e60d1408cb70b49bfd962c0362af803628fd0f438413ea1de070782e85
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
Add the gem:
|
11
11
|
|
12
12
|
```bash
|
13
|
-
bundle add email_error_reporter
|
13
|
+
bundle add email_error_reporter
|
14
14
|
```
|
15
15
|
|
16
16
|
and configure the email addresses that should receive an email in the case of an exception:
|
@@ -37,6 +37,14 @@ Set a custom from address.
|
|
37
37
|
config.email_error_reporter.from = "your-custom-email@example.com"
|
38
38
|
```
|
39
39
|
|
40
|
+
Disables the email reports for specific environments. Mails are enabled by default on all envs.
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
# e.g. in development.rb
|
44
|
+
# default: true
|
45
|
+
config.email_error_reporter.enabled = false
|
46
|
+
```
|
47
|
+
|
40
48
|
## Test your setup
|
41
49
|
|
42
50
|
You can use the built-in rake task `rake email_error_reporter:check` to check if everything works correctly in your setup.
|
@@ -5,9 +5,12 @@ module EmailErrorReporter
|
|
5
5
|
config.email_error_reporter = ActiveSupport::OrderedOptions.new
|
6
6
|
config.email_error_reporter.to = []
|
7
7
|
config.email_error_reporter.from = "no-reply@example.com"
|
8
|
+
config.email_error_reporter.enabled = true
|
8
9
|
|
9
|
-
initializer "email_error_reporter.error_subscribe" do
|
10
|
-
|
10
|
+
initializer "email_error_reporter.error_subscribe" do |app|
|
11
|
+
if app.config.email_error_reporter.enabled
|
12
|
+
Rails.error.subscribe(Subscriber.new)
|
13
|
+
end
|
11
14
|
end
|
12
15
|
|
13
16
|
# ActiveJob cannot (de)-serialize exceptions by default
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_error_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Niklas Haeusele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|