mandriller 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +2 -2
- data/lib/mandriller/base.rb +2 -2
- data/lib/mandriller/version.rb +1 -1
- data/spec/mandriller/base_spec.rb +2 -2
- data/spec/support/action_mailer.rb +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 093de29e2d651df7f6be9028c871b61513873846
|
4
|
+
data.tar.gz: 403e070eb96ef9a9c5c61f2cad53a876c0501404
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 182e5ecb6542bdac2c9927fa86b4207db5f133de4e9a94868aa20d45e25a06ff69cd911068c01a1221ba41a3fa6818dd70f2c1a953a5c971e0e20921de44b656
|
7
|
+
data.tar.gz: 8c2b8a75209ff80a6baafa606a1ac500dceb83803eedd756b3690602a879aefb63729253484e45be18e22e98b8be5215ca818eb7c8605b7f6d6717ee53da2467
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -93,7 +93,7 @@ Automatically generate an HTML version of the email from the plain-text content.
|
|
93
93
|
|
94
94
|
Use an HTML template stored in your Mandrill account
|
95
95
|
|
96
|
-
- `
|
96
|
+
- `set_template 'template_name'` or `set_template 'template_name', 'block_name'`:
|
97
97
|
|
98
98
|
`template_name`
|
99
99
|
|
@@ -194,7 +194,7 @@ Specify a [dedicated IP pool](http://help.mandrill.com/entries/24182062-Can-I-ch
|
|
194
194
|
|
195
195
|
- `set_ip_pool 'dedicated_ip_pool'`
|
196
196
|
|
197
|
-
###
|
197
|
+
### set_return_path_domain
|
198
198
|
|
199
199
|
Specify a [custom domain](http://help.mandrill.com/entries/25241243-Can-I-customize-the-Return-Path-bounce-address-used-for-my-emails-) to use for the message's return-path
|
200
200
|
|
data/lib/mandriller/base.rb
CHANGED
@@ -6,8 +6,8 @@ class Mandriller::Base < ActionMailer::Base
|
|
6
6
|
include Mandriller::SettingsMethods
|
7
7
|
|
8
8
|
BOOLEAN_SETTINGS = {
|
9
|
-
|
10
|
-
|
9
|
+
auto_text: 'X-MC-Autotext',
|
10
|
+
auto_html: 'X-MC-AutoHtml',
|
11
11
|
url_strip_qs: 'X-MC-URLStripQS',
|
12
12
|
preserve_recipients: 'X-MC-PreserveRecipients',
|
13
13
|
inline_css: 'X-MC-InlineCSS',
|
data/lib/mandriller/version.rb
CHANGED
@@ -20,8 +20,8 @@ describe Mandriller::Base do
|
|
20
20
|
subject { klass.foo }
|
21
21
|
|
22
22
|
BOOLEAN_SETTINGS = {
|
23
|
-
|
24
|
-
|
23
|
+
auto_text: 'X-MC-Autotext',
|
24
|
+
auto_html: 'X-MC-AutoHtml',
|
25
25
|
url_strip_qs: 'X-MC-URLStripQS',
|
26
26
|
preserve_recipients: 'X-MC-PreserveRecipients',
|
27
27
|
inline_css: 'X-MC-InlineCSS',
|
@@ -1,7 +1,8 @@
|
|
1
|
+
deliver_method = ActionMailer.respond_to?(:version) && ActionMailer.version.to_s.to_f >= 4.2 ? :deliver_now! : :deliver!
|
1
2
|
shared_examples "with header" do |header, value|
|
2
3
|
it "sets header #{header}" do
|
3
4
|
expect {
|
4
|
-
subject.
|
5
|
+
subject.__send__(deliver_method)
|
5
6
|
}.to change { ActionMailer::Base.deliveries.count }.by(1)
|
6
7
|
m = ActionMailer::Base.deliveries.last
|
7
8
|
expect(m.header.to_s).to match(/(\r\n)?#{header}: #{value}(\r\n)?/)
|
@@ -10,7 +11,7 @@ end
|
|
10
11
|
shared_examples "without header" do |header|
|
11
12
|
it "does not set header #{header}" do
|
12
13
|
expect {
|
13
|
-
subject.
|
14
|
+
subject.__send__(deliver_method)
|
14
15
|
}.to change { ActionMailer::Base.deliveries.count }.by(1)
|
15
16
|
m = ActionMailer::Base.deliveries.last
|
16
17
|
expect(m.header.to_s).not_to match(/(\r\n)?#{header}: [^\r]*(\r\n)?/)
|
@@ -20,7 +21,7 @@ shared_examples "raise an exception" do |exception|
|
|
20
21
|
it "raises #{exception}" do
|
21
22
|
expect {
|
22
23
|
expect {
|
23
|
-
subject.
|
24
|
+
subject.__send__(deliver_method)
|
24
25
|
}.to raise_error(exception)
|
25
26
|
}.to change { ActionMailer::Base.deliveries.count }.by(0)
|
26
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mandriller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daisuke Taniwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.2.2
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Mandrill SMTP API integration for ActionMailer
|