mailgun_rails 0.7.0 → 0.8.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/deliverer.rb +7 -2
- data/lib/mailgun/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb4aa63218033ccf4340f3604dd2e269480e362c
|
4
|
+
data.tar.gz: b391fcad06be6a5895df2e02d7ee47959b433f9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46afabe284fa2c4d3a6375cfef6a73a8d09517f06799e33d5e619571115d7c6fd8605ce67aee2d75d6c83dfb36ef6802b1dc3550f65c2b9f24ad3f4f871c0ec0
|
7
|
+
data.tar.gz: 0214e74df375fde905767e1fa0a51e2707754b3be02be37895e34234be908740787463f09e6e274efb3b101d11968ccf337015376285d4ed1b8db77f3eb58269
|
data/lib/mailgun/deliverer.rb
CHANGED
@@ -16,7 +16,12 @@ module Mailgun
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def deliver!(rails_message)
|
19
|
-
mailgun_client.send_message build_mailgun_message_for(rails_message)
|
19
|
+
response = mailgun_client.send_message build_mailgun_message_for(rails_message)
|
20
|
+
if response.code == 200
|
21
|
+
mailgun_message_id = JSON.parse(response.to_str)["id"]
|
22
|
+
rails_message.message_id = mailgun_message_id
|
23
|
+
end
|
24
|
+
response
|
20
25
|
end
|
21
26
|
|
22
27
|
private
|
@@ -115,7 +120,7 @@ module Mailgun
|
|
115
120
|
end
|
116
121
|
|
117
122
|
def mailgun_client
|
118
|
-
@
|
123
|
+
@mailgun_client ||= Client.new(api_key, domain)
|
119
124
|
end
|
120
125
|
end
|
121
126
|
end
|
data/lib/mailgun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailgun_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jorge Manrubia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|