mail-notify 0.0.2 → 0.0.3
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 +4 -4
- data/lib/mail/notify/delivery_method.rb +5 -6
- data/lib/mail/notify/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: 69a9c571a11fcd6408c96f59ee72d96a26d3dc6a219e94bed97d0bb4968246b9
|
|
4
|
+
data.tar.gz: e209c731e194acdd646c15bbeb797825c2a9fff3967ae2734ea028fb7e931111
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3fa78ee0398c01f41b045be39c623dc3a1cd969947b9f22539910e2be37f2779be89470a62e23f9f64d82160a30936b6c7516b2c5cac9e5d4a49dba4d76967b
|
|
7
|
+
data.tar.gz: 56b927b676e0da0bf58774ba09336c975a04d995ab87a9c973b8379262a26be0c33f2ead74996e1aa0d6ee127e5ffbd31968eb3479b459110f3da6a8fe1113a5
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Mail
|
|
4
4
|
module Notify
|
|
5
5
|
class DeliveryMethod
|
|
6
|
-
attr_accessor :settings
|
|
6
|
+
attr_accessor :settings, :response
|
|
7
7
|
|
|
8
8
|
def initialize(settings)
|
|
9
9
|
@settings = settings
|
|
@@ -11,8 +11,7 @@ module Mail
|
|
|
11
11
|
|
|
12
12
|
def deliver!(mail)
|
|
13
13
|
@mail = mail
|
|
14
|
-
@personalisation = Personalisation.new(
|
|
15
|
-
initialize_params
|
|
14
|
+
@personalisation = Personalisation.new(mail)
|
|
16
15
|
send_email
|
|
17
16
|
end
|
|
18
17
|
|
|
@@ -22,8 +21,8 @@ module Mail
|
|
|
22
21
|
@client ||= Notifications::Client.new(@settings[:api_key])
|
|
23
22
|
end
|
|
24
23
|
|
|
25
|
-
def
|
|
26
|
-
|
|
24
|
+
def email_params
|
|
25
|
+
{
|
|
27
26
|
email_address: @mail.to.first,
|
|
28
27
|
template_id: @mail[:template_id].to_s,
|
|
29
28
|
personalisation: @personalisation.to_h
|
|
@@ -31,7 +30,7 @@ module Mail
|
|
|
31
30
|
end
|
|
32
31
|
|
|
33
32
|
def send_email
|
|
34
|
-
client.send_email(
|
|
33
|
+
@response = client.send_email(email_params)
|
|
35
34
|
end
|
|
36
35
|
end
|
|
37
36
|
end
|
data/lib/mail/notify/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mail-notify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stuart Harrison
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|