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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b141e34f2d12708db9048dc5375f7c97154908a
4
- data.tar.gz: 4b041a95db219bc04bba1db52edcbe26d80fd247
3
+ metadata.gz: bb4aa63218033ccf4340f3604dd2e269480e362c
4
+ data.tar.gz: b391fcad06be6a5895df2e02d7ee47959b433f9b
5
5
  SHA512:
6
- metadata.gz: f546529af360715b1ae2355df808ec6234aa17d31482b21b0e0ddbd2b6190c9f805b9a1cba03e823adcc4b0d522c86792859848868f85570623b595651703dad
7
- data.tar.gz: 9477f60ce47dafc1e124cd0afb1da00d2bf4d8bc1d2d2a29eeef949c5dae1ce0803e2d8628c06b99233900d19ed67ebc27182f27a7f2c02b0ea16b0ff64edbd8
6
+ metadata.gz: 46afabe284fa2c4d3a6375cfef6a73a8d09517f06799e33d5e619571115d7c6fd8605ce67aee2d75d6c83dfb36ef6802b1dc3550f65c2b9f24ad3f4f871c0ec0
7
+ data.tar.gz: 0214e74df375fde905767e1fa0a51e2707754b3be02be37895e34234be908740787463f09e6e274efb3b101d11968ccf337015376285d4ed1b8db77f3eb58269
@@ -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
- @maingun_client ||= Client.new(api_key, domain)
123
+ @mailgun_client ||= Client.new(api_key, domain)
119
124
  end
120
125
  end
121
126
  end
@@ -1,3 +1,3 @@
1
1
  module Mailgun
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
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.7.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-04-03 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer