mailgun_catcher 0.5.0 → 0.6.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0270498476a1593def739a98a0ab51ae7ddd3a0b1a6fd81dd6acfc43a71e6094'
|
4
|
+
data.tar.gz: 657dda987c902da1ca6adaa8ea4c84fcbb2d54db8dca76d23d746e0ec0b93580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4637dd0b9ef40b94a2239b77188c34968d6b6bad0a7ba071bdf4a7ef5829aaf626dc73debd64902ec6655441c4c00be3f3e66cdc9742047d2e206441b08d53ce
|
7
|
+
data.tar.gz: a8f5c80ba263cde8932dc32f0a77397758523da0784c8dc3ce3c424f6068404e71e8ab190a4f6ec1edff27e4c4f8134e9cb29c5995437f08d14132e204e7701e
|
data/README.md
CHANGED
@@ -27,6 +27,24 @@ This will allow you change the default webhook route from `/webhooks` to `/custo
|
|
27
27
|
Configure webhook on mailgun:
|
28
28
|

|
29
29
|
|
30
|
+
## Notifiers
|
31
|
+
Library supports event dispatching via notifier. Notifier is any object that responds to `notify` message. By default, events are notified on Bugsnag service, but you can provide your own notifier implementation by configuring `MailgunCatcher.config.notifier`.
|
32
|
+
|
33
|
+
### Configuring custom notifier
|
34
|
+
```ruby
|
35
|
+
class MailgunNotifier
|
36
|
+
def notify(event)
|
37
|
+
puts event
|
38
|
+
end
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
register custom notifier implementation through initializer
|
43
|
+
```ruby
|
44
|
+
MailgunCatcher.setup do |config|
|
45
|
+
config.notifier = MailgunNotifier.new
|
46
|
+
end
|
47
|
+
```
|
30
48
|
|
31
49
|
## Contributing
|
32
50
|
Contribution directions go here.
|
data/lib/mailgun_catcher.rb
CHANGED
@@ -2,7 +2,14 @@ require 'dry-configurable'
|
|
2
2
|
require 'mailgun_catcher/engine'
|
3
3
|
require 'mailgun_catcher/event'
|
4
4
|
require 'mailgun_catcher/event_error'
|
5
|
+
require 'mailgun_catcher/notifier/bugsnag'
|
5
6
|
|
6
7
|
module MailgunCatcher
|
7
|
-
|
8
|
+
extend Dry::Configurable
|
9
|
+
|
10
|
+
setting(:notifier, MailgunCatcher::Notifier::Bugsnag.new)
|
11
|
+
|
12
|
+
def self.setup
|
13
|
+
yield config
|
14
|
+
end
|
8
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailgun_catcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bugsnag
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/mailgun_catcher/engine.rb
|
70
70
|
- lib/mailgun_catcher/event.rb
|
71
71
|
- lib/mailgun_catcher/event_error.rb
|
72
|
+
- lib/mailgun_catcher/notifier/bugsnag.rb
|
72
73
|
- lib/mailgun_catcher/version.rb
|
73
74
|
homepage: https://github.com/infinum/rails-infinum-mailgun_catcher
|
74
75
|
licenses:
|