resque_mailer 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/resque_mailer.rb +8 -2
- data/lib/resque_mailer/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a56ee6823536b15341c4bb6cf3e09e6a83b587d
|
4
|
+
data.tar.gz: ca159471c8aaea39fb393ba7aef5b776000ecd8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60c277ea5805b4fc5ac55eb58d79c59932e9d632e9362d4ce133355b0ca105420bce9c9f5575eba78d373dd1324e0211c8356b6363b8c558934b73b2a3a9007b
|
7
|
+
data.tar.gz: f415531b8704835f3d143b95095a44e75fc17a2a79166c9eae0c753ac8137ef7ce8af329115cb8ab3842c78618bbe117a3a7a699c509b3ba1a32a9f2e07d7d9e
|
data/CHANGELOG.md
CHANGED
data/lib/resque_mailer.rb
CHANGED
@@ -13,6 +13,12 @@ module Resque
|
|
13
13
|
@excluded_environments = [*envs].map { |e| e.to_sym }
|
14
14
|
end
|
15
15
|
|
16
|
+
def prepare_message(klass, action, *args)
|
17
|
+
msg = klass.send(:new)
|
18
|
+
msg.process(action, *args)
|
19
|
+
msg.message
|
20
|
+
end
|
21
|
+
|
16
22
|
def included(base)
|
17
23
|
base.extend(ClassMethods)
|
18
24
|
end
|
@@ -45,7 +51,7 @@ module Resque
|
|
45
51
|
def perform(action, serialized_args)
|
46
52
|
begin
|
47
53
|
args = ::Resque::Mailer.argument_serializer.deserialize(serialized_args)
|
48
|
-
message =
|
54
|
+
message = ::Resque::Mailer.prepare_message(self, action, *args)
|
49
55
|
if message.respond_to?(:deliver_now)
|
50
56
|
message.deliver_now
|
51
57
|
else
|
@@ -118,7 +124,7 @@ module Resque
|
|
118
124
|
end
|
119
125
|
|
120
126
|
def actual_message
|
121
|
-
@actual_message ||= @mailer_class
|
127
|
+
@actual_message ||= ::Resque::Mailer.prepare_message(@mailer_class, @method_name, *@args)
|
122
128
|
end
|
123
129
|
|
124
130
|
def deliver
|
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.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Plante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: yard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|