mandrill_mailer 1.0.2 → 1.0.3

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: 71d1eac500311e4cd57b322024c815e6f369cf18
4
- data.tar.gz: 826bd16487f2d5281f3ddc6d8ba3acdd60d7a9a4
3
+ metadata.gz: 6cec71a64a8a20cffa3174b760b1196f3e72846f
4
+ data.tar.gz: 72ad5d28b0e812b0513fd9bbd3c0c3f19d47e864
5
5
  SHA512:
6
- metadata.gz: 3d759d95bd97f40669f6fcc38af767addf5c45415de171629ea8e9c89662a10fc0d85c4e7a5c12017bd78d0b7755130413728867f11a5251320a157aabfe9356
7
- data.tar.gz: dc43f30132274915203149e07483bf4b06bdc3e1fc423829cbb74426c862050345cb0d1d11dd97b1dc4e80c3db0e6ff3c6f81a76208ce7c378e9a94ff7c5b5e5
6
+ metadata.gz: 179f7ed1f504bcfc472d8db839dac2fd9bd4eef419e4304101de9ef7477ac6f3f50f513781c97395f1e3e5c9c6fc901a3e10565058b23406b055199a8fc9315d
7
+ data.tar.gz: 2914a62ac2d55f9e17f500e512b7949e6961ec033bdaad995357368033b01de642313e6ae58e33c9971820315d0e820f8c583939544baa40310dbe143dc77633
@@ -2,7 +2,7 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## 1.0.2
5
+ ## 1.0.3
6
6
  - Fix a bug where defaults in merge vars were receiving the correct defaults - Credit @kennethkalmer
7
7
 
8
8
  ## 1.0.1
@@ -99,8 +99,8 @@ module MandrillMailer
99
99
  "return_path_domain" => args[:return_path_domain],
100
100
  "merge" => boolean(args[:merge]),
101
101
  "merge_language" => args[:merge_language],
102
- "global_merge_vars" => mandrill_args(args[:vars] || args[:global_merge_vars]),
103
- "merge_vars" => merge_vars(args[:recipient_vars] || args[:merge_vars] || defaults[:merge_vars]),
102
+ "global_merge_vars" => mandrill_args(args[:vars] || args[:global_merge_vars] || defaults[:merge_vars]),
103
+ "merge_vars" => merge_vars(args[:recipient_vars] || args[:merge_vars]),
104
104
  "tags" => args[:tags],
105
105
  "subaccount" => args[:subaccount],
106
106
  "google_analytics_domains" => args[:google_analytics_domains],
@@ -1,3 +1,3 @@
1
1
  module MandrillMailer
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -98,10 +98,12 @@ describe MandrillMailer::CoreMailer do
98
98
  it "applies defaults" do
99
99
  default_from = "default name"
100
100
  default_from_email = "default@email.com"
101
+ default_merge_vars = { foo: "bar" }
101
102
 
102
103
  unique_mailer = Class.new(core_mailer) do
103
104
  default from_name: default_from,
104
- from: default_from_email
105
+ from: default_from_email,
106
+ merge_vars: default_merge_vars
105
107
  end
106
108
 
107
109
  # Create a second mailer to make sure we don't get class var pollution
@@ -115,6 +117,9 @@ describe MandrillMailer::CoreMailer do
115
117
 
116
118
  expect(new_unique_mailer.message['from_name']).to eq default_from
117
119
  expect(new_unique_mailer.message['from_email']).to eq default_from_email
120
+
121
+ global_merge_vars = [{ "name" => :foo, "content" => "bar" }]
122
+ expect(new_unique_mailer.message['global_merge_vars']).to eq global_merge_vars
118
123
  end
119
124
 
120
125
  describe "vars attribute" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandrill_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Rensel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-22 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport