mandrill_mailer 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +57 -36
- data/README.md +1 -1
- data/lib/mandrill_mailer/core_mailer.rb +5 -1
- data/lib/mandrill_mailer/version.rb +1 -1
- data/spec/template_mailer_spec.rb +19 -0
- 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: 81c35ce2aca84771388aeec2c4cfc8e0d4fc5e9c
|
4
|
+
data.tar.gz: b47daef7aff42fe20029c753316387978ec31fb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b5f64d9a1ae5961b0e1b9a20fa34ce86d4176d30c71c42468858a40651b34a2863547be480dde19fcd0e37ae23705c6d5796ddfe4ce11a44b9f13db528e61f1
|
7
|
+
data.tar.gz: beec2745dfe5b470e48ae3d96ca8d7ace01a41b2b854317e17ea0bf6ad1b6da50262b927ec51f103a1ac806286b83c4f33a9e18feb2fd1b3182042c2f9ce0286
|
data/CHANGELOG.md
CHANGED
@@ -1,52 +1,73 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
4
|
|
4
|
-
|
5
|
-
- [IMPROVEMENT] Allow the mandrill api gem to be more flexible in the accepted version
|
6
|
-
which allows for the json gem to be updated internally.
|
5
|
+
## [Unreleased][unreleased]
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
## 0.6.1
|
8
|
+
### Fixed
|
9
|
+
- Correct a regression introduced in 0.6.0 that caused a TypeError exception
|
10
|
+
when no `merge_vars` were provided as arguments to `mandrill_mail`.
|
11
|
+
|
12
|
+
## 0.6.0
|
13
|
+
### Changed
|
14
|
+
- Allow for default `merge_vars` to be set on the mailer class so that every method inherits them, just like the existing default `from` and `from_name`.
|
11
15
|
|
12
|
-
|
13
|
-
|
16
|
+
## 0.5.2
|
17
|
+
### Changed
|
18
|
+
- Allow the mandrill api gem to be more flexible in the accepted version.
|
19
|
+
which allows for the json gem to be updated internally.
|
14
20
|
|
15
|
-
|
16
|
-
|
21
|
+
## 0.5.0
|
22
|
+
### Changed
|
23
|
+
- Made the file attachment and image apis compatible with mandrill api doc syntax.
|
17
24
|
|
18
|
-
|
19
|
-
|
25
|
+
## 0.4.9
|
26
|
+
### Added
|
27
|
+
- Offline support for the `MandrillMailer::Messenger` class. Thanks @arthurtalkgoal.
|
28
|
+
- Support for the Mandrill Messages api by adding a `MandrillMailer::Messenger` class. Thanks @arthurtalkgoal.
|
20
29
|
|
21
|
-
|
22
|
-
|
30
|
+
## 0.4.8
|
31
|
+
### Added
|
32
|
+
- `to=` setter to template mailer.
|
23
33
|
|
24
|
-
|
25
|
-
|
34
|
+
## 0.4.7
|
35
|
+
### Changed
|
36
|
+
- Reworked how defaults were stored so that they are accessible when being extended.
|
26
37
|
|
27
|
-
|
28
|
-
|
38
|
+
## 0.4.6
|
39
|
+
### Added
|
40
|
+
- Support for images array of embedded images.
|
29
41
|
|
30
|
-
|
31
|
-
|
42
|
+
## 0.4.5
|
43
|
+
### Fixed
|
44
|
+
- Declare `mandrill-api` gem as a runtime dependency to prevent load errors.
|
32
45
|
|
33
|
-
|
34
|
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
46
|
+
## 0.4.4
|
47
|
+
### Added
|
48
|
+
- Added `to`, `from` and `bcc` getters to `TemplateMailer` (@renz45).
|
49
|
+
- Documented how to use the gem with Sidekiq (@elado, @renz45).
|
50
|
+
- Documented fallback to Mandrill default subject on `mandrill_mail` subject (@Advocation).
|
38
51
|
|
39
|
-
|
40
|
-
-
|
52
|
+
### Fixed
|
53
|
+
- Fix `respond_to` method as it doesn't follow the way standard Ruby respond_to behaves (@tpaktop).
|
41
54
|
|
42
|
-
|
43
|
-
|
55
|
+
## 0.4.3
|
56
|
+
### Added
|
57
|
+
- Look at deliveries for offline testing.
|
58
|
+
- Intercept emails before they are sent in the config (see the specs for more info).
|
44
59
|
|
45
|
-
|
46
|
-
|
60
|
+
## 0.4.1
|
61
|
+
### Added
|
62
|
+
- Subaccount parameter.
|
47
63
|
|
48
|
-
|
64
|
+
## 0.4.0
|
65
|
+
### Changed
|
49
66
|
- Default setting for preserve_recipients no longer defaults to true. Bumping a minor version since this might have been assumed to be default and not set by some.
|
50
67
|
|
51
|
-
|
52
|
-
|
68
|
+
## 0.3.8
|
69
|
+
### Added
|
70
|
+
- This change log.
|
71
|
+
|
72
|
+
|
73
|
+
[unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.6.0...HEAD
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Mandrill Mailer
|
2
|
-
[![Build Status](https://travis-ci.org/renz45/mandrill_mailer.svg)](https://travis-ci.org/renz45/mandrill_mailer) [![Gem Version](http://img.shields.io/gem/v/mandrill_mailer.svg)](rubygems.org/gems/mandrill_mailer)
|
2
|
+
[![Build Status](https://travis-ci.org/renz45/mandrill_mailer.svg)](https://travis-ci.org/renz45/mandrill_mailer) [![Gem Version](http://img.shields.io/gem/v/mandrill_mailer.svg)](https://rubygems.org/gems/mandrill_mailer)
|
3
3
|
[![Code Climate](http://img.shields.io/codeclimate/github/renz45/mandrill_mailer.svg)](https://codeclimate.com/github/renz45/mandrill_mailer)
|
4
4
|
[![Dependencies](http://img.shields.io/gemnasium/renz45/mandrill_mailer.svg)](https://gemnasium.com/renz45/mandrill_mailer) [![Inline Documentation](http://inch-ci.org/github/renz45/mandrill_mailer.svg?branch=master)](http://inch-ci.org/github/renz45/mandrill_mailer)
|
5
5
|
|
@@ -343,7 +343,11 @@ module MandrillMailer
|
|
343
343
|
end
|
344
344
|
|
345
345
|
def merge_default_merge_vars(args)
|
346
|
-
|
346
|
+
if args
|
347
|
+
self.class.defaults[:merge_vars].merge(args)
|
348
|
+
else
|
349
|
+
self.class.defaults[:merge_vars]
|
350
|
+
end
|
347
351
|
end
|
348
352
|
|
349
353
|
# ensure only true or false is returned given arg
|
@@ -449,4 +449,23 @@ describe MandrillMailer::TemplateMailer do
|
|
449
449
|
expect(subject.bcc).to eq bcc
|
450
450
|
end
|
451
451
|
end
|
452
|
+
|
453
|
+
describe "#vars" do
|
454
|
+
subject { mailer.mandrill_mail(args) }
|
455
|
+
|
456
|
+
it "returns the vars" do
|
457
|
+
expect(subject.message["global_merge_vars"].first.values).to include(var_name)
|
458
|
+
expect(subject.message["global_merge_vars"].first.values).to include(var_content)
|
459
|
+
end
|
460
|
+
|
461
|
+
context "when no vars are set" do
|
462
|
+
before do
|
463
|
+
args.delete(:vars)
|
464
|
+
end
|
465
|
+
|
466
|
+
it "doesn't explode" do
|
467
|
+
expect { subject }.not_to raise_error
|
468
|
+
end
|
469
|
+
end
|
470
|
+
end
|
452
471
|
end
|
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.6.
|
4
|
+
version: 0.6.1
|
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-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.4.
|
131
|
+
rubygems_version: 2.4.5.1
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Transactional Mailer for Mandrill
|