mandrill_mailer 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +4 -2
- data/lib/mandrill_mailer/message_mailer.rb +0 -9
- data/lib/mandrill_mailer/version.rb +1 -1
- data/spec/template_mailer_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDQ4MDA4ZWRhZDAyNDkxNjEwNjMyMjExNWEyYmQ4MWU3MTFkOTY5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjM2NDQzNjU3ZDZkMjdhY2Y0NGY3ZDVkNTI3NTIzOTFhZDc3MmQ1NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YThjN2QyYjU5NTcwZjg1YzM0M2Y3Y2E5MGJjNWE1YmMyYzc3NmY3ZGM1NGMy
|
10
|
+
NDFmYmZhZmQwYzRmM2Q4OWJkM2E1ZDQ5ZTU3YmM0ZmU3MjMxNWRjNzM1MDgy
|
11
|
+
OWIzNDc0MDQ4NjMxYTkzYzgwY2RkNzQ1MDhlNjk0MGZjOGVjYjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjljYmY5MWQyZTc2ZmJhYTQ1NTQwY2U5ZWRmZDI5ZWE1NmU1MDRiN2JlODVm
|
14
|
+
ZjJmYTUxOGU3YTAyYWMwM2U1ZDg2MzdiNzljNzlmMGI2MmUzNDdmMjNjMDYw
|
15
|
+
MmRmNTNlODkwMjNjNzhhMjkwMTBkNzljOTU5ZGU0ODc5ZDQ3NGI=
|
data/README.md
CHANGED
@@ -157,7 +157,9 @@ end
|
|
157
157
|
* `:send_at` - When this message should be sent
|
158
158
|
|
159
159
|
## Sending a message without template
|
160
|
-
Sending a message without template is similar to sending a template
|
160
|
+
Sending a message without template is similar to sending a one with a template. The biggest
|
161
|
+
change is that you have to inherit from `MandrillMailer::MessageMailer` instead of the
|
162
|
+
MandrillMailer::TemplateMailer class:
|
161
163
|
|
162
164
|
```ruby
|
163
165
|
class InvitationMailer < MandrillMailer::MessageMailer
|
@@ -321,6 +323,6 @@ Example:
|
|
321
323
|
|
322
324
|
```ruby
|
323
325
|
MandrillMailer.configure do |config|
|
324
|
-
config.interceptor_params = { to: "emailtothatwillbeusedinall@emailssent.com" }
|
326
|
+
config.interceptor_params = { to: [{ email: "emailtothatwillbeusedinall@emailssent.com", name: "name" }] }
|
325
327
|
end
|
326
328
|
```
|
@@ -107,7 +107,6 @@ module MandrillMailer
|
|
107
107
|
# Public: Triggers the stored Mandrill params to be sent to the Mandrill api
|
108
108
|
def deliver
|
109
109
|
mandrill = Mandrill::API.new(api_key)
|
110
|
-
check_required_options(message)
|
111
110
|
mandrill.messages.send(message, async, ip_pool, send_at)
|
112
111
|
end
|
113
112
|
|
@@ -200,13 +199,5 @@ module MandrillMailer
|
|
200
199
|
"send_at" => send_at
|
201
200
|
}
|
202
201
|
end
|
203
|
-
|
204
|
-
|
205
|
-
def check_required_options(options)
|
206
|
-
names = ['text', 'html', 'from', 'subject', 'to']
|
207
|
-
names.each do |name|
|
208
|
-
warn("Mandrill Mailer Warn: missing required option: #{name}") unless options.has_key?(name)
|
209
|
-
end
|
210
|
-
end
|
211
202
|
end
|
212
203
|
end
|
@@ -268,7 +268,7 @@ describe MandrillMailer::TemplateMailer do
|
|
268
268
|
context "with interceptor" do
|
269
269
|
before(:each) do
|
270
270
|
@intercepted_params = {
|
271
|
-
to: { email: 'interceptedto@test.com', name: 'Mr. Interceptor' },
|
271
|
+
to: [{ email: 'interceptedto@test.com', name: 'Mr. Interceptor' }],
|
272
272
|
tags: ['intercepted-tag'],
|
273
273
|
bcc_address: 'interceptedbbc@email.com'
|
274
274
|
}
|
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: 0.4.
|
4
|
+
version: 0.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Rensel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|