mailgun_catcher 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e89041e32d638b9278e4c9b597d032a1028489f07e46aa399cb49dbb1e6b71d3
4
- data.tar.gz: 414f84ca5f27c6ea9b219e4db47d2c5b22ca899c971ba191639ed35a9195dcf8
3
+ metadata.gz: '09cd85506bb282c0d307342f06907daa301a70d646fe67712209837bb72a488e'
4
+ data.tar.gz: cf8564288b86cf480a8204ccaf3dd7c5895cc3cc9ea2d459b44053e15ced4b09
5
5
  SHA512:
6
- metadata.gz: 776709eabd0f17164fbf155e5af9b2579d9c1fc1c5b753166ee258f7f79218cf2fd74c9c3b6ea228604f4ec16e2aa07996fbd52950d35bf25b622db8a37b55e7
7
- data.tar.gz: 2537ad6fcec36b4eab9ad84b19c08ce15aca5259cff02158c9094dfd20a14545d6c7a3cd2f4e39b72a35b8abae24b846b668790a0965437d02f0fc1f789d6a4d
6
+ metadata.gz: fcfe0aae0b854181078c034b85fbe082cfb67378740822029827771a57b13600944aaad2665a647ac64e50085009b151a911c2583848cc9ea465fdd82e4afd1c
7
+ data.tar.gz: 5bb43ef445b7f9dbcc0bed1790302731a8564b9a02e0fe254f9f232b0f10a83b4f71fbcc68e5bf8e6f1cd9715388e4320ecd6025723d71146af8a46e9c6e2ffa
data/README.md CHANGED
@@ -18,7 +18,13 @@ Add to routes:
18
18
  mount MailgunCatcher::Engine, at: "/mailgun_catcher"
19
19
  ```
20
20
 
21
- Configire webhook on mailgun:
21
+ To configure an exact path for the webhooks controller create an initializer (`mailgun_catcher.rb`) with the following content:
22
+ ```ruby
23
+ MailgunCatcher::Engine.config.webhooks_path = 'custom_path'
24
+ ```
25
+ This will allow you change the default webhook route from `/webhooks` to `/custom_path`.
26
+
27
+ Configure webhook on mailgun:
22
28
  ![](http://take.ms/HZRmm)
23
29
 
24
30
 
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  MailgunCatcher::Engine.routes.draw do
2
- resources :webhooks, only: [:create]
2
+ resources :webhooks, only: [:create], path: MailgunCatcher::Engine.config.webhooks_path
3
3
  end
@@ -1,5 +1,9 @@
1
1
  module MailgunCatcher
2
2
  class Engine < ::Rails::Engine
3
+ extend Dry::Configurable
4
+
5
+ setting :webhooks_path, 'webhooks'
6
+
3
7
  isolate_namespace MailgunCatcher
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module MailgunCatcher
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: mailgun_catcher
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
  - Stjepan Hadjić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2019-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bugsnag
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: dry-configurable
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rails
29
43
  requirement: !ruby/object:Gem::Requirement