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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcf5756ff80bf3ffe6dc8e5f7ce8e3696c2f0f02
4
- data.tar.gz: 875412a838c62f216bc8d1aa918dc357d4d754eb
3
+ metadata.gz: 81c35ce2aca84771388aeec2c4cfc8e0d4fc5e9c
4
+ data.tar.gz: b47daef7aff42fe20029c753316387978ec31fb2
5
5
  SHA512:
6
- metadata.gz: adaed5b204343d14875024f50683af9863a97f0a7d7659d76022646ef80fe01d27a4f86c7eeb4b4f2596fadfda8ce56358f442cd6496e389fb1fb0bd94025397
7
- data.tar.gz: bcd01547a76e87c47bcd17ce04d42685c2f8d3a9abd6ca35925db1229032047ddc0d256f0ed85688ca6cec3b05e84600898ccc3b26749070d9693b793a9c139b
6
+ metadata.gz: 2b5f64d9a1ae5961b0e1b9a20fa34ce86d4176d30c71c42468858a40651b34a2863547be480dde19fcd0e37ae23705c6d5796ddfe4ce11a44b9f13db528e61f1
7
+ data.tar.gz: beec2745dfe5b470e48ae3d96ca8d7ace01a41b2b854317e17ea0bf6ad1b6da50262b927ec51f103a1ac806286b83c4f33a9e18feb2fd1b3182042c2f9ce0286
data/CHANGELOG.md CHANGED
@@ -1,52 +1,73 @@
1
- # 0.6.0
2
- - [IMPROVEMENT] 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`.
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
- # 0.5.2
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
- # 0.5.2
9
- - [IMPROVEMENT] Allow the mandrill api gem to be more flexible in the accepted version
10
- which allows for the json gem to be updated internally.
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
- # 0.5.0
13
- - [IMPROVEMENT] Made the file attachment and image apis compatible with mandrill api doc syntax
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
- # 0.4.9
16
- - [FEATURE] Added offline support for the MandrillMailer::Messenger class. Thanks @arthurtalkgoal
21
+ ## 0.5.0
22
+ ### Changed
23
+ - Made the file attachment and image apis compatible with mandrill api doc syntax.
17
24
 
18
- # 0.4.9
19
- - [FEATURE] Added support for the Mandrill Messages api by adding a MandrillMailer::Messenger class. Thanks @arthurtalkgoal
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
- # 0.4.8
22
- - [IMPROVEMENT] Add a to= setter to the template mailer
30
+ ## 0.4.8
31
+ ### Added
32
+ - `to=` setter to template mailer.
23
33
 
24
- # 0.4.7
25
- - [IMPROVEMENT] Reworked how defaults were stored so that they are accessible when being extended
34
+ ## 0.4.7
35
+ ### Changed
36
+ - Reworked how defaults were stored so that they are accessible when being extended.
26
37
 
27
- # 0.4.6
28
- - [FEATURE] Added support for images array of embedded images
38
+ ## 0.4.6
39
+ ### Added
40
+ - Support for images array of embedded images.
29
41
 
30
- # 0.4.5
31
- - [BUGFIX] Declare `mandrill-api` gem as a runtime dependency to prevent load errors.
42
+ ## 0.4.5
43
+ ### Fixed
44
+ - Declare `mandrill-api` gem as a runtime dependency to prevent load errors.
32
45
 
33
- # 0.4.4
34
- - [FEATURE] Added `to`, `from` and `bcc` getters to `TemplateMailer`. (@renz45)
35
- - [IMPROVEMENT] Fixes respond_to method as it doesn't follow the way standard ruby respond_to behaves. (@tpaktop)
36
- - [DOCS] Documented how to use the gem with Sidekiq (@elado, @renz45)
37
- - [DOCS] Documented fallback to Mandrill default subject on `mandrill_mail` subject. (@Advocation)
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
- # 0.4.3
40
- - [FEATURE] Add the ability to look at deliveries for offline testing.
52
+ ### Fixed
53
+ - Fix `respond_to` method as it doesn't follow the way standard Ruby respond_to behaves (@tpaktop).
41
54
 
42
- # 0.4.2
43
- - [FEATURE] Add the ability to intercept emails before they are sent in the config (see the specs for more info).
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
- # 0.4.1
46
- - [FEATURE] Add subaccount parameter.
60
+ ## 0.4.1
61
+ ### Added
62
+ - Subaccount parameter.
47
63
 
48
- # 0.4.0
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
- # 0.3.8
52
- - Changelog created.
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
- self.class.defaults[:merge_vars].merge(args)
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
@@ -1,3 +1,3 @@
1
1
  module MandrillMailer
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -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.0
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-05-04 00:00:00.000000000 Z
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.6
131
+ rubygems_version: 2.4.5.1
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Transactional Mailer for Mandrill