rails-mailgun 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa58d03cd1bbb9b058e23af701a9339a0d4b3c59
4
- data.tar.gz: 35a65120f2ee24490c12479f12664bb0e24438bb
3
+ metadata.gz: f14e089cd0c16d50c499885cf3cae0a67d52fc37
4
+ data.tar.gz: db92547ca2c6d6cf151920f5edf3d016280c972d
5
5
  SHA512:
6
- metadata.gz: f654d9b1a0248a70874c1886146a908b2f6e73a2980c11ac8478d91e10a82dcc130588a1fc9083a93d8867692c4576bc5b30e2de1df9e7b3f7ac3d38cf565314
7
- data.tar.gz: 307674d92a587bfda5d81138a87560d86bbcff299cfa5dad501d7844d04de246da842d93aa1ac7077efd0a7664c25d530d01abafc145c40165b48d958955d9b6
6
+ metadata.gz: d361940811897cef0d898663de772909deb16a3186c4fe4624fe1e6c3764ca754c29edf6c35bd62df2f72bde920fa9c7b41a72fbfb653042c529e1e3eb966f44
7
+ data.tar.gz: fbed0dede2d4fa870f1cd7004b318ce44d2d0dcbc6c28523d065de0bd892be8f7fd5a83edaf2f5b31b4123c9debf679a4cf16043282fa9e9c2be6c2faab80f5d
data/README.md CHANGED
@@ -8,7 +8,7 @@ Mailgun integration for rails
8
8
  ## Installation
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'mailgun', git: "git://github.com/code-mancers/rails-mailgun.git"
11
+ gem 'rails-mailgun', git: "git://github.com/code-mancers/rails-mailgun.git"
12
12
 
13
13
  And then execute:
14
14
 
@@ -17,6 +17,7 @@ module RailsMailgun
17
17
 
18
18
  message_object.set_from_address( mail.from.join(' ') )
19
19
  mail.to.each { |t| message_object.add_recipient(:to, t) }
20
+ add_cc_emails_to_message_object(message_object, mail)
20
21
 
21
22
  message_object.set_subject(mail.subject)
22
23
 
@@ -42,6 +43,13 @@ module RailsMailgun
42
43
  end
43
44
  end
44
45
 
46
+ def add_cc_emails_to_message_object(message_object, mail)
47
+ return unless mail.cc.present?
48
+
49
+ cc_emails = [mail.cc].flatten
50
+ cc_emails.each { |t| message_object.add_recipient(:cc, t) }
51
+ end
52
+
45
53
  def create_tempfile_from_attachment(attachment)
46
54
  tempfile = Tempfile.new(attachment.filename)
47
55
  tempfile.binmode
@@ -1,3 +1,3 @@
1
1
  module RailsMailgun
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-mailgun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuva Kumar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-17 00:00:00.000000000 Z
11
+ date: 2014-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails