email_error_reporter 0.2.0 → 0.3.0

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: ee23af096b0b064122aea6388f90bc20f65aceda47d46bcda13dedae3336919a
4
- data.tar.gz: 5b45ec6a4fd3be12fca5cdf207295516f74653b96d1e73d6f8b4d18788608702
3
+ metadata.gz: b83248a211bd2ca5e29e1ea4b7f9cb2abd840ce07043da60b983d5d66b85a426
4
+ data.tar.gz: 346f2ff677450545ab25b6b4ab054d48d020482369ee66deabd1169a5f30d06e
5
5
  SHA512:
6
- metadata.gz: d7e432538fc9ff269c3c9c3e5c2a2faf2432a736279e5e0e47b694db7f909e3316bc753b1c1512a61465ed119efa440f54bdba2c10cff8b4b0ecd7d421310739
7
- data.tar.gz: 0f3b60c8dd71f1e7437dc00a093dbf8d16d891b6be93827eca983ff1b9246e1bd427c443e8b84202063c35742a586ebaee6ea3424c80615e37c0cc7cc844108c
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 && bundle install
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
- Rails.error.subscribe(Subscriber.new)
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
@@ -1,3 +1,3 @@
1
1
  module EmailErrorReporter
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.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 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails