resque_mailer 2.2.6 → 2.2.7
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/CHANGELOG.md +5 -1
- data/LICENSE +1 -1
- data/README.md +8 -9
- data/lib/resque_mailer.rb +4 -0
- data/lib/resque_mailer/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc00ecc2825ecbdfb1569db2d721e2ba1b1e7881
|
4
|
+
data.tar.gz: 4c33b71e7f01d7c077ca5c90df02906dc02ff0f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b79aae5b1b79c4e6cac2f12f9084ac8df048fded91ff9ef62b58450ff95cf30cbc455a13d77f35c60d49c944d2ce08548f3fdca7d3011b0245c9230f040e88c
|
7
|
+
data.tar.gz: 67c0d0c9dc358b4830dbc90aa525366df64a36d1326fd11551355f78b458d282eba89b7db42ebb72bd7ca474f0ae14f73e51c2efcddb9501869cb60de5e40811
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
###
|
1
|
+
### 2.2.7 / 2014-10-08
|
2
|
+
* Pass respond_to? inquiries through to decoy (to allow preview, etc)
|
3
|
+
(Ian Lesperance)
|
4
|
+
|
5
|
+
### 2.2.6 / 2013-11-13
|
2
6
|
* Add action and args as arguments to the error handler lambda for
|
3
7
|
requeuing (Ellis Berner, Austen Ito)
|
4
8
|
* Redis client v3 support; fix unhandled exception when offline
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -30,7 +30,7 @@ Include Resque::Mailer in your ActionMailer subclass(es) like this:
|
|
30
30
|
|
31
31
|
Now, when `MyMailer.subject_email(params).deliver` is called, an entry
|
32
32
|
will be created in the job queue. Your Resque workers will be able to deliver
|
33
|
-
this message for you. The queue we're using is imaginatively named
|
33
|
+
this message for you. The queue we're using is imaginatively named `mailer`,
|
34
34
|
so just make sure your workers know about it and are loading your environment:
|
35
35
|
|
36
36
|
QUEUE=mailer rake environment resque:work
|
@@ -59,9 +59,8 @@ name when starting your workers.
|
|
59
59
|
QUEUE=application_specific_mailer rake environment resque:work
|
60
60
|
|
61
61
|
Custom handling of errors that arise when sending a message is possible by
|
62
|
-
assigning a lambda to the `error_hander` attribute.
|
63
|
-
|
64
|
-
There are two supported lambdas for backwards compatiability:
|
62
|
+
assigning a lambda to the `error_hander` attribute. There are two supported
|
63
|
+
lambdas for backwards compatiability.
|
65
64
|
|
66
65
|
The first lamba will be deprecated in a future release:
|
67
66
|
|
@@ -77,10 +76,10 @@ mailers to be requeued on failure:
|
|
77
76
|
```ruby
|
78
77
|
Resque::Mailer.error_handler = lambda { |mailer, message, error, action, args|
|
79
78
|
# Necessary to re-enqueue jobs that receieve the SIGTERM signal
|
80
|
-
if
|
79
|
+
if error.is_a?(Resque::TermException)
|
81
80
|
Resque.enqueue(mailer, action, *args)
|
82
81
|
else
|
83
|
-
raise
|
82
|
+
raise error
|
84
83
|
end
|
85
84
|
}
|
86
85
|
```
|
@@ -98,7 +97,7 @@ other mailers inherit from an AsyncMailer:
|
|
98
97
|
|
99
98
|
# app/mailers/example_mailer.rb
|
100
99
|
class ExampleMailer < AsyncMailer
|
101
|
-
def say_hello(
|
100
|
+
def say_hello(user_id)
|
102
101
|
# ...
|
103
102
|
end
|
104
103
|
end
|
@@ -109,8 +108,8 @@ If [resque-scheduler](https://github.com/bvandenbos/resque-scheduler) is
|
|
109
108
|
installed, two extra methods will be available: `deliver_at` and `deliver_in`.
|
110
109
|
These will enqueue mail for delivery at a specified time in the future.
|
111
110
|
|
112
|
-
# Delivers on the 25th of December,
|
113
|
-
MyMailer.reminder_email(params).deliver_at(Time.parse('
|
111
|
+
# Delivers on the 25th of December, 2014
|
112
|
+
MyMailer.reminder_email(params).deliver_at(Time.parse('2014-12-25'))
|
114
113
|
|
115
114
|
# Delivers in 7 days
|
116
115
|
MyMailer.reminder_email(params).deliver_in(7.days)
|
data/lib/resque_mailer.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Plante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -62,13 +62,14 @@ extra_rdoc_files:
|
|
62
62
|
- CHANGELOG.md
|
63
63
|
- README.md
|
64
64
|
files:
|
65
|
-
- lib/resque_mailer/version.rb
|
66
|
-
- lib/resque_mailer.rb
|
67
|
-
- README.md
|
68
|
-
- LICENSE
|
69
65
|
- CHANGELOG.md
|
66
|
+
- LICENSE
|
67
|
+
- README.md
|
68
|
+
- lib/resque_mailer.rb
|
69
|
+
- lib/resque_mailer/version.rb
|
70
70
|
homepage: http://github.com/zapnap/resque_mailer
|
71
|
-
licenses:
|
71
|
+
licenses:
|
72
|
+
- MIT
|
72
73
|
metadata: {}
|
73
74
|
post_install_message:
|
74
75
|
rdoc_options: []
|
@@ -86,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
87
|
version: '0'
|
87
88
|
requirements: []
|
88
89
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.
|
90
|
+
rubygems_version: 2.2.2
|
90
91
|
signing_key:
|
91
92
|
specification_version: 4
|
92
93
|
summary: Rails plugin for sending asynchronous email with ActionMailer and Resque.
|