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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 075ffba690530bca8df7f53407ca3f3ea4e3f9ca
4
- data.tar.gz: bda4e177b0b3325949c0ae481105ac6b81cdbe39
3
+ metadata.gz: f49c59c5f497b38f55180880f6f32101ab993cf1
4
+ data.tar.gz: 041619bafe686899e7f6e63fa4f0aa8b41960ab8
5
5
  SHA512:
6
- metadata.gz: 2b97eddbad1f851372304c837fe31eda9fde2212e6ceca9b0350569739ea3855d435a8e7f2215eed816fe8b95b6689efd8a83f369d36f1290e3a550d86a8fc23
7
- data.tar.gz: 4892c39bb9d2756d391d375b3b006a6c0299d4cbf122ae5112395e9b6d8f5e533141cef4a0e7ebaaa705b08909714851788ace653c4e706fdc2c95dcae00acb4
6
+ metadata.gz: e6c7baeff76a0fefb88d27af5452348e52676c28da4c5557a1a3b153f669153231a0118bf058b6c8f4bf0640576ef175c4618def99e2ed1d459b977dfddb81f5
7
+ data.tar.gz: 42092ee4de2138c8d416dc6d16c9c31ebe98791f85b5aa7ce8dadcb1457ba86927e98f066bd59992cdc343dd39f2258489f55682551a5eab6825c35d43f69c79
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ Gemfile.lock
3
3
  .DS_Store
4
4
  .ruby-version
5
5
  .ruby-gemset
6
+ .bundle
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.3.0 - 2016-3-02
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.
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # RSpec.configure do |config|
7
7
  # # ...
8
- # require "mandrill_mailer/rspec_helpers"
8
+ # require "mandrill_mailer/rspec_helper"
9
9
  # config.include MandrillMailer::RSpecHelper
10
10
  # end
11
11
  #
@@ -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
- failure_message_for_should do |actual|
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
- failure_message_for_should_not do |actual|
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
- failure_message_for_should do |actual|
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
- failure_message_for_should_not do |actual|
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
- failure_message_for_should do |actual|
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
- failure_message_for_should_not do |actual|
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
- failure_message_for_should do |actual|
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
- failure_message_for_should_not do |actual|
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
- failure_message_for_should do |actual|
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
- failure_message_for_should_not do |actual|
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
@@ -1,3 +1,3 @@
1
1
  module MandrillMailer
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  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: 1.3.0
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-03-02 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport