mailgun-tracking 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailgun/tracking.rb +6 -20
- data/lib/mailgun/tracking/listener.rb +10 -4
- data/lib/mailgun/tracking/{rack.rb → middleware.rb} +2 -2
- data/lib/mailgun/tracking/notifier.rb +26 -0
- data/lib/mailgun/tracking/railtie.rb +9 -0
- data/lib/mailgun/tracking/subscriber.rb +16 -0
- data/lib/mailgun/tracking/subscriber/all_messages.rb +19 -0
- data/lib/mailgun/tracking/subscriber/evented.rb +20 -0
- data/lib/mailgun/tracking/version.rb +1 -1
- data/spec/mailgun/tracking/listener_spec.rb +20 -14
- data/spec/mailgun/tracking/{rack_spec.rb → middleware_spec.rb} +9 -5
- data/spec/mailgun/tracking/notifier_spec.rb +50 -0
- data/spec/mailgun/tracking/subscriber/all_messages_spec.rb +13 -0
- data/spec/mailgun/tracking/subscriber/evented_spec.rb +14 -0
- data/spec/mailgun/tracking/subscriber_spec.rb +15 -0
- data/spec/mailgun/tracking_spec.rb +3 -35
- data/spec/spec_helper.rb +1 -0
- data/spec/support/fixture.rb +8 -3
- data/spec/support/shared_examples/subscriber.rb +14 -0
- metadata +23 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87dcc660603620c0e746e9ed5cf5cc1584149ece
|
4
|
+
data.tar.gz: aad18416dca8c386cb96104c67a07512f847e84c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d858782b928aa9b6e4ef1025c9614001f64ada0ac7a9fd42e37ddbe24b9f08ff2d1a94428a80f67dbb08bca0d853dfbb1d06fa06f5c6784a47df75335a09844e
|
7
|
+
data.tar.gz: 3fb5f7a36243749311a452ea220df5dcc1fea92ac9671f54febdb9d818f64f7ebdc47c812d7c75acbc930c336b790c236f1eb1de5b810f5025d5d0e805592d8b
|
data/lib/mailgun/tracking.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
require 'mailgun/tracking/exceptions'
|
2
2
|
require 'mailgun/tracking/listener'
|
3
|
-
require 'mailgun/tracking/
|
3
|
+
require 'mailgun/tracking/middleware'
|
4
|
+
require 'mailgun/tracking/notifier'
|
4
5
|
require 'mailgun/tracking/signature'
|
6
|
+
require 'mailgun/tracking/subscriber'
|
5
7
|
require 'mailgun/tracking/version'
|
8
|
+
require 'mailgun/tracking/railtie' if defined?(Rails)
|
6
9
|
|
7
10
|
module Mailgun
|
8
11
|
module Tracking
|
@@ -21,25 +24,8 @@ module Mailgun
|
|
21
24
|
|
22
25
|
module_function
|
23
26
|
|
24
|
-
def
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
def broadcast(event, payload)
|
29
|
-
Signature.verify!(payload)
|
30
|
-
listener.broadcast(event, payload)
|
31
|
-
end
|
32
|
-
|
33
|
-
def clear_cached_variables
|
34
|
-
@listener = nil
|
35
|
-
end
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
module_function
|
40
|
-
|
41
|
-
def listener
|
42
|
-
@listener ||= Listener.new
|
27
|
+
def notifier
|
28
|
+
@notifier ||= Notifier.new
|
43
29
|
end
|
44
30
|
end
|
45
31
|
end
|
@@ -4,15 +4,21 @@ module Mailgun
|
|
4
4
|
attr_reader :subscribers
|
5
5
|
|
6
6
|
def initialize
|
7
|
-
@subscribers =
|
7
|
+
@subscribers = []
|
8
8
|
end
|
9
9
|
|
10
|
-
def add_subscriber(event,
|
11
|
-
@subscribers
|
10
|
+
def add_subscriber(event, callable)
|
11
|
+
@subscribers << Subscriber.for(event, callable)
|
12
12
|
end
|
13
13
|
|
14
14
|
def broadcast(event, payload)
|
15
|
-
|
15
|
+
subscribers_for(event).each { |subscriber| subscriber.call(payload) }
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def subscribers_for(event)
|
21
|
+
@subscribers.select { |subscriber| subscriber.subscribed_to?(event) }
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Mailgun
|
2
2
|
module Tracking
|
3
|
-
class
|
3
|
+
class Middleware
|
4
4
|
def initialize(app)
|
5
5
|
@app = app
|
6
6
|
end
|
@@ -9,7 +9,7 @@ module Mailgun
|
|
9
9
|
@env = env
|
10
10
|
|
11
11
|
if mailgun_tracking_request?
|
12
|
-
Mailgun::Tracking.broadcast(request.params.fetch('event'), request.params)
|
12
|
+
Mailgun::Tracking.notifier.broadcast(request.params.fetch('event'), request.params)
|
13
13
|
[200, {}, []]
|
14
14
|
else
|
15
15
|
@app.call(env)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Mailgun
|
2
|
+
module Tracking
|
3
|
+
class Notifier
|
4
|
+
def initialize(listener = Listener.new)
|
5
|
+
@listener ||= listener
|
6
|
+
end
|
7
|
+
|
8
|
+
def subscribe(event, callable = Proc.new)
|
9
|
+
listener.add_subscriber(event, callable)
|
10
|
+
end
|
11
|
+
|
12
|
+
def all(callable = Proc.new)
|
13
|
+
listener.add_subscriber(nil, callable)
|
14
|
+
end
|
15
|
+
|
16
|
+
def broadcast(event, payload)
|
17
|
+
Signature.verify!(payload)
|
18
|
+
listener.broadcast(event, payload)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
attr_reader :listener
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'mailgun/tracking/subscriber/all_messages'
|
2
|
+
require 'mailgun/tracking/subscriber/evented'
|
3
|
+
|
4
|
+
module Mailgun
|
5
|
+
module Tracking
|
6
|
+
module Subscriber
|
7
|
+
def self.for(name, callable)
|
8
|
+
if name
|
9
|
+
Evented.new(name, callable)
|
10
|
+
else
|
11
|
+
AllMessages.new(callable)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Mailgun
|
2
|
+
module Tracking
|
3
|
+
module Subscriber
|
4
|
+
class AllMessages
|
5
|
+
def initialize(callable)
|
6
|
+
@callable = callable
|
7
|
+
end
|
8
|
+
|
9
|
+
def call(payload)
|
10
|
+
@callable.call(payload)
|
11
|
+
end
|
12
|
+
|
13
|
+
def subscribed_to?(*)
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Mailgun
|
2
|
+
module Tracking
|
3
|
+
module Subscriber
|
4
|
+
class Evented
|
5
|
+
def initialize(name, callable)
|
6
|
+
@name = name.to_sym
|
7
|
+
@callable = callable
|
8
|
+
end
|
9
|
+
|
10
|
+
def call(payload)
|
11
|
+
@callable.call(payload)
|
12
|
+
end
|
13
|
+
|
14
|
+
def subscribed_to?(name)
|
15
|
+
@name == name.to_sym
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -3,20 +3,23 @@ require 'spec_helper'
|
|
3
3
|
RSpec.describe Mailgun::Tracking::Listener do
|
4
4
|
subject(:listener) { described_class.new }
|
5
5
|
|
6
|
-
let(:
|
6
|
+
let(:callable) { proc {} }
|
7
|
+
let(:subscriber) { instance_double(Mailgun::Tracking::Subscriber::Evented) }
|
7
8
|
|
8
9
|
describe '#add_subscriber' do
|
10
|
+
before { allow(Mailgun::Tracking::Subscriber).to receive(:for).with(/delivered/, callable) { subscriber } }
|
11
|
+
|
9
12
|
it 'adds subscriber' do
|
10
|
-
expect { listener.add_subscriber(:delivered,
|
11
|
-
.from(
|
12
|
-
.to(
|
13
|
+
expect { listener.add_subscriber(:delivered, callable) }.to change(listener, :subscribers)
|
14
|
+
.from([])
|
15
|
+
.to([subscriber])
|
13
16
|
end
|
14
17
|
|
15
18
|
it 'adds multiple subscribers with the same name' do
|
16
19
|
expect do
|
17
|
-
listener.add_subscriber(:delivered,
|
18
|
-
listener.add_subscriber('delivered',
|
19
|
-
end.to change(listener, :subscribers).from(
|
20
|
+
listener.add_subscriber(:delivered, callable)
|
21
|
+
listener.add_subscriber('delivered', callable)
|
22
|
+
end.to change(listener, :subscribers).from([]).to([subscriber, subscriber])
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
@@ -24,19 +27,22 @@ RSpec.describe Mailgun::Tracking::Listener do
|
|
24
27
|
let(:payload) { fixture('delivered.json') }
|
25
28
|
|
26
29
|
before do
|
27
|
-
allow(
|
28
|
-
|
30
|
+
allow(subscriber).to receive(:call)
|
31
|
+
allow(subscriber).to receive(:subscribed_to?).with(/delivered/) { true }
|
32
|
+
allow(Mailgun::Tracking::Subscriber).to receive(:for).with(:delivered, callable) { subscriber }
|
33
|
+
|
34
|
+
listener.add_subscriber(:delivered, callable)
|
29
35
|
end
|
30
36
|
|
31
|
-
it 'executes
|
37
|
+
it 'executes subscriber' do
|
32
38
|
listener.broadcast(:delivered, payload)
|
33
|
-
expect(
|
39
|
+
expect(subscriber).to have_received(:call).with(payload)
|
34
40
|
end
|
35
41
|
|
36
|
-
it 'executes multiple
|
37
|
-
listener.add_subscriber(:delivered,
|
42
|
+
it 'executes multiple subscribers' do
|
43
|
+
listener.add_subscriber(:delivered, callable)
|
38
44
|
listener.broadcast('delivered', payload)
|
39
|
-
expect(
|
45
|
+
expect(subscriber).to have_received(:call).with(payload).twice
|
40
46
|
end
|
41
47
|
end
|
42
48
|
end
|
@@ -1,14 +1,18 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
RSpec.describe Mailgun::Tracking::
|
3
|
+
RSpec.describe Mailgun::Tracking::Middleware do
|
4
4
|
subject(:rack) { described_class.new(app) }
|
5
5
|
|
6
6
|
describe '#call' do
|
7
7
|
let(:app) { proc { [200, {}, []] } }
|
8
8
|
let(:payload) { fixture('delivered.json') }
|
9
9
|
let(:code) { rack.call(env)[0] }
|
10
|
+
let(:notifier) { instance_double(Mailgun::Tracking::Notifier) }
|
10
11
|
|
11
|
-
before
|
12
|
+
before do
|
13
|
+
allow(notifier).to receive(:broadcast)
|
14
|
+
allow(Mailgun::Tracking).to receive(:notifier) { notifier }
|
15
|
+
end
|
12
16
|
|
13
17
|
context 'when a request to a endpoint with a POST method' do
|
14
18
|
let(:env) { env_for('http://localhost:3000/mailgun', method: :post, params: payload) }
|
@@ -16,7 +20,7 @@ RSpec.describe Mailgun::Tracking::Rack do
|
|
16
20
|
it { expect(code).to eq(200) }
|
17
21
|
it do
|
18
22
|
code
|
19
|
-
expect(
|
23
|
+
expect(notifier).to have_received(:broadcast).with('delivered', payload)
|
20
24
|
end
|
21
25
|
end
|
22
26
|
|
@@ -26,7 +30,7 @@ RSpec.describe Mailgun::Tracking::Rack do
|
|
26
30
|
it { expect(code).to eq(200) }
|
27
31
|
it do
|
28
32
|
code
|
29
|
-
expect(Mailgun::Tracking).not_to have_received(:
|
33
|
+
expect(Mailgun::Tracking).not_to have_received(:notifier)
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
@@ -37,7 +41,7 @@ RSpec.describe Mailgun::Tracking::Rack do
|
|
37
41
|
it { expect(code).to eq(200) }
|
38
42
|
it do
|
39
43
|
code
|
40
|
-
expect(Mailgun::Tracking).not_to have_received(:
|
44
|
+
expect(Mailgun::Tracking).not_to have_received(:notifier)
|
41
45
|
end
|
42
46
|
end
|
43
47
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Mailgun::Tracking::Notifier do
|
4
|
+
subject(:notifier) { described_class.new(listener) }
|
5
|
+
|
6
|
+
let(:listener) { instance_double(Mailgun::Tracking::Listener) }
|
7
|
+
|
8
|
+
describe '#subscribe' do
|
9
|
+
let(:callable) { proc {} }
|
10
|
+
|
11
|
+
before { allow(listener).to receive(:add_subscriber) }
|
12
|
+
|
13
|
+
it 'subscribes on event' do
|
14
|
+
notifier.subscribe(:delivered, callable)
|
15
|
+
|
16
|
+
expect(listener).to have_received(:add_subscriber)
|
17
|
+
.with(:delivered, callable)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#all' do
|
22
|
+
let(:callable) { proc {} }
|
23
|
+
|
24
|
+
before { allow(listener).to receive(:add_subscriber) }
|
25
|
+
|
26
|
+
it 'subscribes on all events' do
|
27
|
+
notifier.all(callable)
|
28
|
+
|
29
|
+
expect(listener).to have_received(:add_subscriber).with(nil, callable)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#broadcast' do
|
34
|
+
let(:payload) { fixture('delivered.json') }
|
35
|
+
|
36
|
+
before do
|
37
|
+
allow(Mailgun::Tracking::Signature).to receive(:verify!)
|
38
|
+
allow(listener).to receive(:broadcast)
|
39
|
+
notifier.broadcast(:delivered, payload)
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'verify signature' do
|
43
|
+
expect(Mailgun::Tracking::Signature).to have_received(:verify!).with(payload)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'broadcasts an event' do
|
47
|
+
expect(listener).to have_received(:broadcast).with(:delivered, payload)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Mailgun::Tracking::Subscriber::AllMessages do
|
4
|
+
subject(:subscriber) { described_class.new(callable) }
|
5
|
+
|
6
|
+
it_behaves_like :subscriber
|
7
|
+
|
8
|
+
describe '#subscribed_to?' do
|
9
|
+
let(:callable) { proc {} }
|
10
|
+
|
11
|
+
it { is_expected.to be_subscribed_to(:any_event) }
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Mailgun::Tracking::Subscriber::Evented do
|
4
|
+
subject(:subscriber) { described_class.new('delivered', callable) }
|
5
|
+
|
6
|
+
it_behaves_like :subscriber
|
7
|
+
|
8
|
+
describe '#subscribed_to?' do
|
9
|
+
let(:callable) { proc {} }
|
10
|
+
|
11
|
+
it { is_expected.to be_subscribed_to(:delivered) }
|
12
|
+
it { is_expected.not_to be_subscribed_to(:any_event) }
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Mailgun::Tracking::Subscriber do
|
4
|
+
describe '.for' do
|
5
|
+
let(:callable) { proc {} }
|
6
|
+
|
7
|
+
it 'returns an instance of Mailgun::Tracking::Subscriber::AllMessages' do
|
8
|
+
expect(described_class.for(nil, callable)).to be_instance_of(Mailgun::Tracking::Subscriber::AllMessages)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'returns an instance of Mailgun::Tracking::Subscriber::Evented' do
|
12
|
+
expect(described_class.for('delivered', callable)).to be_instance_of(Mailgun::Tracking::Subscriber::Evented)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -9,41 +9,9 @@ RSpec.describe Mailgun::Tracking do
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
describe '.
|
13
|
-
|
14
|
-
|
15
|
-
before do
|
16
|
-
described_class.clear_cached_variables
|
17
|
-
allow(listener).to receive(:add_subscriber)
|
18
|
-
allow(Mailgun::Tracking::Listener).to receive(:new) { listener }
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'subscribes on event' do
|
22
|
-
described_class.subscribe(:delivered) {}
|
23
|
-
|
24
|
-
expect(listener).to have_received(:add_subscriber)
|
25
|
-
.with(:delivered)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
describe '.broadcast' do
|
30
|
-
let(:payload) { fixture('delivered.json') }
|
31
|
-
let(:listener) { instance_double(Mailgun::Tracking::Listener) }
|
32
|
-
|
33
|
-
before do
|
34
|
-
described_class.clear_cached_variables
|
35
|
-
allow(Mailgun::Tracking::Signature).to receive(:verify!)
|
36
|
-
allow(listener).to receive(:broadcast)
|
37
|
-
allow(Mailgun::Tracking::Listener).to receive(:new) { listener }
|
38
|
-
described_class.broadcast(:delivered, payload)
|
39
|
-
end
|
40
|
-
|
41
|
-
it 'verify signature' do
|
42
|
-
expect(Mailgun::Tracking::Signature).to have_received(:verify!).with(payload)
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'broadcasts an event' do
|
46
|
-
expect(listener).to have_received(:broadcast).with(:delivered, payload)
|
12
|
+
describe '.notifier' do
|
13
|
+
it 'returns an instance of Mailgun::Tracking::Notifier' do
|
14
|
+
expect(described_class.notifier).to be_instance_of(Mailgun::Tracking::Notifier)
|
47
15
|
end
|
48
16
|
end
|
49
17
|
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/fixture.rb
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class FixtureFinder
|
4
|
-
FIXTURE_PATH = File.expand_path('../fixtures', __dir__)
|
5
|
-
|
6
4
|
def initialize(file)
|
7
5
|
@file = file
|
6
|
+
@fixture_path = File.expand_path('../fixtures', dir)
|
8
7
|
end
|
9
8
|
|
10
9
|
def find
|
11
|
-
File.read(
|
10
|
+
File.read(@fixture_path + '/' + @file)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def dir
|
16
|
+
File.dirname(__FILE__)
|
12
17
|
end
|
13
18
|
end
|
14
19
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
RSpec.shared_examples :subscriber do
|
2
|
+
describe '#call' do
|
3
|
+
let(:callable) { proc {} }
|
4
|
+
let(:payload) { fixture('delivered.json') }
|
5
|
+
|
6
|
+
before { allow(callable).to receive(:call).with(payload) }
|
7
|
+
|
8
|
+
it 'calls the callable' do
|
9
|
+
subscriber.call(payload)
|
10
|
+
|
11
|
+
expect(callable).to have_received(:call).with(payload)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailgun-tracking
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Chubchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Integration
|
13
|
+
description: Integration with Mailgun Webhooks
|
14
14
|
email:
|
15
15
|
- artem.chubchenko@gmail.com
|
16
16
|
executables: []
|
@@ -20,17 +20,27 @@ files:
|
|
20
20
|
- lib/mailgun/tracking.rb
|
21
21
|
- lib/mailgun/tracking/exceptions.rb
|
22
22
|
- lib/mailgun/tracking/listener.rb
|
23
|
-
- lib/mailgun/tracking/
|
23
|
+
- lib/mailgun/tracking/middleware.rb
|
24
|
+
- lib/mailgun/tracking/notifier.rb
|
25
|
+
- lib/mailgun/tracking/railtie.rb
|
24
26
|
- lib/mailgun/tracking/signature.rb
|
27
|
+
- lib/mailgun/tracking/subscriber.rb
|
28
|
+
- lib/mailgun/tracking/subscriber/all_messages.rb
|
29
|
+
- lib/mailgun/tracking/subscriber/evented.rb
|
25
30
|
- lib/mailgun/tracking/version.rb
|
26
31
|
- spec/fixtures/delivered.json
|
27
32
|
- spec/mailgun/tracking/listener_spec.rb
|
28
|
-
- spec/mailgun/tracking/
|
33
|
+
- spec/mailgun/tracking/middleware_spec.rb
|
34
|
+
- spec/mailgun/tracking/notifier_spec.rb
|
29
35
|
- spec/mailgun/tracking/signature_spec.rb
|
36
|
+
- spec/mailgun/tracking/subscriber/all_messages_spec.rb
|
37
|
+
- spec/mailgun/tracking/subscriber/evented_spec.rb
|
38
|
+
- spec/mailgun/tracking/subscriber_spec.rb
|
30
39
|
- spec/mailgun/tracking_spec.rb
|
31
40
|
- spec/spec_helper.rb
|
32
41
|
- spec/support/fixture.rb
|
33
42
|
- spec/support/rack_helpers.rb
|
43
|
+
- spec/support/shared_examples/subscriber.rb
|
34
44
|
homepage: https://github.com/chubchenko/mailgun-tracking
|
35
45
|
licenses:
|
36
46
|
- MIT
|
@@ -43,7 +53,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
53
|
requirements:
|
44
54
|
- - ">="
|
45
55
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
56
|
+
version: 1.9.3
|
47
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
58
|
requirements:
|
49
59
|
- - ">="
|
@@ -54,13 +64,18 @@ rubyforge_project:
|
|
54
64
|
rubygems_version: 2.5.1
|
55
65
|
signing_key:
|
56
66
|
specification_version: 4
|
57
|
-
summary: Integration
|
67
|
+
summary: Integration with Mailgun Webhooks
|
58
68
|
test_files:
|
59
69
|
- spec/fixtures/delivered.json
|
60
70
|
- spec/spec_helper.rb
|
61
71
|
- spec/mailgun/tracking_spec.rb
|
62
72
|
- spec/mailgun/tracking/listener_spec.rb
|
63
|
-
- spec/mailgun/tracking/
|
73
|
+
- spec/mailgun/tracking/middleware_spec.rb
|
74
|
+
- spec/mailgun/tracking/notifier_spec.rb
|
75
|
+
- spec/mailgun/tracking/subscriber_spec.rb
|
64
76
|
- spec/mailgun/tracking/signature_spec.rb
|
77
|
+
- spec/mailgun/tracking/subscriber/evented_spec.rb
|
78
|
+
- spec/mailgun/tracking/subscriber/all_messages_spec.rb
|
65
79
|
- spec/support/fixture.rb
|
66
80
|
- spec/support/rack_helpers.rb
|
81
|
+
- spec/support/shared_examples/subscriber.rb
|