mandrill_mailer 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -2
- data/README.md +21 -0
- data/lib/mandrill_mailer/rspec_helper.rb +1 -1
- data/lib/mandrill_mailer/rspec_helpers/from_matcher.rb +2 -2
- data/lib/mandrill_mailer/rspec_helpers/merge_var_matcher.rb +2 -2
- data/lib/mandrill_mailer/rspec_helpers/subject_matcher.rb +2 -2
- data/lib/mandrill_mailer/rspec_helpers/template_matcher.rb +2 -2
- data/lib/mandrill_mailer/rspec_helpers/to_email_matcher.rb +2 -2
- data/lib/mandrill_mailer/version.rb +1 -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: f49c59c5f497b38f55180880f6f32101ab993cf1
|
4
|
+
data.tar.gz: 041619bafe686899e7f6e63fa4f0aa8b41960ab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6c7baeff76a0fefb88d27af5452348e52676c28da4c5557a1a3b153f669153231a0118bf058b6c8f4bf0640576ef175c4618def99e2ed1d459b977dfddb81f5
|
7
|
+
data.tar.gz: 42092ee4de2138c8d416dc6d16c9c31ebe98791f85b5aa7ce8dadcb1457ba86927e98f066bd59992cdc343dd39f2258489f55682551a5eab6825c35d43f69c79
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,13 @@
|
|
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.
|
5
|
+
## 1.4.0 - 2016-04-28
|
6
|
+
### Changed
|
7
|
+
- Update deprecated RSpec failure methods in RSpec helpers.
|
8
|
+
|
9
|
+
## 1.3.0 - 2016-03-02
|
6
10
|
### Added
|
7
|
-
- Fixed an issue where deliver_later functionality was not working as intended when inheriting from the mailer classes. via @eric1234
|
11
|
+
- Fixed an issue where deliver_later functionality was not working as intended when inheriting from the mailer classes. via @eric1234
|
8
12
|
|
9
13
|
## 1.2.0 - 2015-12-22
|
10
14
|
### Added
|
data/README.md
CHANGED
@@ -336,6 +336,27 @@ Or depending on how up to date things are, try adding the following to `config/i
|
|
336
336
|
This should enable you to use this mailer the same way you use ActionMailer.
|
337
337
|
More info: https://github.com/mperham/sidekiq/wiki/Delayed-Extensions#actionmailer
|
338
338
|
|
339
|
+
## Using Resque
|
340
|
+
|
341
|
+
Create a job:
|
342
|
+
```ruby
|
343
|
+
class SendUserMailJob
|
344
|
+
def initialize(user_id)
|
345
|
+
@user_id = user_id
|
346
|
+
end
|
347
|
+
|
348
|
+
def work
|
349
|
+
user = User.find(@user_id)
|
350
|
+
UserMailer.send_user_email(user).deliver
|
351
|
+
end
|
352
|
+
end
|
353
|
+
```
|
354
|
+
|
355
|
+
Send your job to Resque:
|
356
|
+
```ruby
|
357
|
+
resque = Resque.new
|
358
|
+
resque << SendUserMailJob.new(<user id>)
|
359
|
+
```
|
339
360
|
|
340
361
|
## Using an interceptor
|
341
362
|
You can set a mailer interceptor to override any params used when you deliver an e-mail.
|
@@ -21,13 +21,13 @@ RSpec::Matchers.define :be_from do |expected_options|
|
|
21
21
|
!bool_arr.compact.any? {|i| i == false}
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
failure_message do |actual|
|
25
25
|
<<-MESSAGE.strip_heredoc
|
26
26
|
Expected from vars: #{mailer_from_email(mailer).inspect} to be: #{expected_options.inspect}.
|
27
27
|
MESSAGE
|
28
28
|
end
|
29
29
|
|
30
|
-
|
30
|
+
failure_message_when_negated do |actual|
|
31
31
|
<<-MESSAGE.strip_heredoc
|
32
32
|
Expected from vars: #{mailer_from_email(mailer).inspect} to not be: #{expected_options.inspect}.
|
33
33
|
MESSAGE
|
@@ -24,13 +24,13 @@ RSpec::Matchers.define :have_merge_data do |expected_data|
|
|
24
24
|
has_match
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
failure_message do |actual|
|
28
28
|
<<-MESSAGE.strip_heredoc
|
29
29
|
Expected merge variables: #{merge_vars_from(actual).inspect} to include data: #{expected_data.inspect} but it does not.
|
30
30
|
MESSAGE
|
31
31
|
end
|
32
32
|
|
33
|
-
|
33
|
+
failure_message do |actual|
|
34
34
|
<<-MESSAGE.strip_heredoc
|
35
35
|
Expected merge variables: #{merge_vars_from(actual).inspect} to not include data: #{expected_data.inspect} but it does.
|
36
36
|
MESSAGE
|
@@ -17,13 +17,13 @@ RSpec::Matchers.define :have_subject do |expected_subject|
|
|
17
17
|
mailer_subject(mailer) == expected_subject
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
failure_message do |actual|
|
21
21
|
<<-MESSAGE.strip_heredoc
|
22
22
|
Expected subject: #{mailer_subject(mailer).inspect} to be: #{expected_subject.inspect}.
|
23
23
|
MESSAGE
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
failure_message_when_negated do |actual|
|
27
27
|
<<-MESSAGE.strip_heredoc
|
28
28
|
Expected subject: #{mailer_subject(mailer).inspect} to not be: #{expected_subject.inspect}.
|
29
29
|
MESSAGE
|
@@ -17,13 +17,13 @@ RSpec::Matchers.define :use_template do |expected_template|
|
|
17
17
|
mailer_template(mailer) == expected_template
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
failure_message do |actual|
|
21
21
|
<<-MESSAGE.strip_heredoc
|
22
22
|
Expected template: #{mailer_template(mailer).inspect} to be: #{expected_template.inspect}.
|
23
23
|
MESSAGE
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
failure_message_when_negated do |actual|
|
27
27
|
<<-MESSAGE.strip_heredoc
|
28
28
|
Expected template: #{mailer_template(mailer).inspect} to not be: #{expected_template.inspect}.
|
29
29
|
MESSAGE
|
@@ -40,13 +40,13 @@ RSpec::Matchers.define :send_email_to do |expected_to|
|
|
40
40
|
opts_found
|
41
41
|
end
|
42
42
|
|
43
|
-
|
43
|
+
failure_message do |actual|
|
44
44
|
<<-MESSAGE.strip_heredoc
|
45
45
|
Expected to variables: #{mailer_to_data(mailer).inspect} to include data: #{expected_to.inspect} but it does not.
|
46
46
|
MESSAGE
|
47
47
|
end
|
48
48
|
|
49
|
-
|
49
|
+
failure_message_when_negated do |actual|
|
50
50
|
<<-MESSAGE.strip_heredoc
|
51
51
|
Expected to variables: #{mailer_to_data(mailer).inspect} to not include data: #{expected_to.inspect} but it does.
|
52
52
|
MESSAGE
|
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.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Rensel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|