mailgun_rails 0.6.3 → 0.6.4

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: 928d8547984f87cab1c813bdc332f4fc9c2db2a0
4
- data.tar.gz: c0ba0816d17b70886c89dfb8342410f35cf59e4d
3
+ metadata.gz: 3eb3586b44fc3032dfcf6cf3778c9a9b4565eee6
4
+ data.tar.gz: e7ff6e3420013419dfab185574d2515361707212
5
5
  SHA512:
6
- metadata.gz: 0b2d8935fd66a38dad0a2d2af03a243b6d5fcf607a14c593a15961c4c4b8aaa480772f71eb8631164e5cc88135aa3d912d671464a29a29098d1a3cb20c561ea9
7
- data.tar.gz: c6f1ac7917f95871ec6115348ec57636338d6fef7edd6c473227191047a50c5080606c5440efb5ffcf81bae59f7006ee94fe446caea45481244f5016d5c7acb6
6
+ metadata.gz: f41934b3860ff3f6e828a7e85dd773be5010a0db8920d26014a464d1d0fb6d3653bf5a9b923c114825a868b445fb2c559cffc60ebead81d3ded711e47e78d5c7
7
+ data.tar.gz: c5610c1de48dea927f680c16d6e360fb40d730d9e409c71bad054f658b86ef09e0ec4d9b40d635d36ff5ea6ea3a4ec953adc604319b0512eeb9240da8d1b0322
@@ -32,16 +32,16 @@ module Mailgun
32
32
  def transform_mailgun_attributes_from_rails(rails_message, mailgun_message)
33
33
  transform_reply_to rails_message, mailgun_message if rails_message.reply_to
34
34
  transform_mailgun_variables rails_message, mailgun_message
35
+ transform_mailgun_options rails_message, mailgun_message
35
36
  transform_mailgun_recipient_variables rails_message, mailgun_message
36
37
  transform_custom_headers rails_message, mailgun_message
37
- transform_o_headers rails_message, mailgun_message
38
38
  end
39
39
 
40
40
  def build_basic_mailgun_message_for(rails_message)
41
41
  {:from => rails_message[:from].formatted, :to => rails_message[:to].formatted, :subject => rails_message.subject,
42
42
  :html => extract_html(rails_message), :text => extract_text(rails_message)}
43
43
  end
44
-
44
+
45
45
  def transform_reply_to(rails_message, mailgun_message)
46
46
  mailgun_message['h:Reply-To'] = rails_message[:reply_to].formatted.first
47
47
  end
@@ -69,17 +69,17 @@ module Mailgun
69
69
  end
70
70
  end
71
71
 
72
+ def transform_mailgun_options(rails_message, mailgun_message)
73
+ rails_message.mailgun_options.try(:each) do |name, value|
74
+ mailgun_message["o:#{name}"] = value
75
+ end
76
+ end
77
+
72
78
  def transform_custom_headers(rails_message, mailgun_message)
73
79
  rails_message.mailgun_headers.try(:each) do |name, value|
74
80
  mailgun_message["h:#{name}"] = value
75
81
  end
76
82
  end
77
-
78
- def transform_o_headers(rails_message, mailgun_message)
79
- rails_message.mailgun_o_headers.try(:each) do |name, value|
80
- mailgun_message["o:#{name}"] = value
81
- end
82
- end
83
83
 
84
84
  def transform_mailgun_recipient_variables(rails_message, mailgun_message)
85
85
  mailgun_message['recipient-variables'] = rails_message.mailgun_recipient_variables.to_json if rails_message.mailgun_recipient_variables
@@ -1,8 +1,8 @@
1
1
  module Mail
2
2
  class Message
3
3
  attr_accessor :mailgun_variables
4
+ attr_accessor :mailgun_options
4
5
  attr_accessor :mailgun_recipient_variables
5
6
  attr_accessor :mailgun_headers
6
- attr_accessor :mailgun_o_headers
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module Mailgun
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailgun_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia