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 +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/mandrill_mailer/arg_formatter.rb +2 -2
- data/lib/mandrill_mailer/version.rb +1 -1
- data/spec/core_mailer_spec.rb +6 -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: 6cec71a64a8a20cffa3174b760b1196f3e72846f
|
4
|
+
data.tar.gz: 72ad5d28b0e812b0513fd9bbd3c0c3f19d47e864
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 179f7ed1f504bcfc472d8db839dac2fd9bd4eef419e4304101de9ef7477ac6f3f50f513781c97395f1e3e5c9c6fc901a3e10565058b23406b055199a8fc9315d
|
7
|
+
data.tar.gz: 2914a62ac2d55f9e17f500e512b7949e6961ec033bdaad995357368033b01de642313e6ae58e33c9971820315d0e820f8c583939544baa40310dbe143dc77633
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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]
|
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],
|
data/spec/core_mailer_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|