resque_mailer 2.4.0 → 2.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a56ee6823536b15341c4bb6cf3e09e6a83b587d
4
- data.tar.gz: ca159471c8aaea39fb393ba7aef5b776000ecd8c
3
+ metadata.gz: 454ffe7d7fb03730950d08431e5afb614d2a0f21
4
+ data.tar.gz: c3293915bfd3260f21e26439be296f69437b2d3a
5
5
  SHA512:
6
- metadata.gz: 60c277ea5805b4fc5ac55eb58d79c59932e9d632e9362d4ce133355b0ca105420bce9c9f5575eba78d373dd1324e0211c8356b6363b8c558934b73b2a3a9007b
7
- data.tar.gz: f415531b8704835f3d143b95095a44e75fc17a2a79166c9eae0c753ac8137ef7ce8af329115cb8ab3842c78618bbe117a3a7a699c509b3ba1a32a9f2e07d7d9e
6
+ metadata.gz: d4c2ff226ccc857c1f589dc58239d89f5b4e874bf72e0b8c48081cfcaf9da2a0567a2c6984675bebe13cf4dba6eec1228e45a65e666545410a585157bd9f209e
7
+ data.tar.gz: 5451b3ca27ee8ee0594cb5efde8037eb9c2f91e7dbc60dfe3f016eef434c076a5e9cf405617cc3bacc6643a8e02a0eed0c3757572aeac26b70860d8d046735ba
@@ -1,3 +1,7 @@
1
+ ### 2.4.1 / 2016-12-10
2
+ * Symbolize argument keys to fix mailer block syntax issues (J Garcia)
3
+ * Alias method for `deliver_now` (Kurt Funai)
4
+
1
5
  ### 2.4.0 / 2016-10-05
2
6
  * Rails 5 compatibility
3
7
 
@@ -13,11 +17,11 @@
13
17
  * Remove deprecated fallback / error options in prep for 2.3.x
14
18
 
15
19
  ### 2.2.7 / 2014-10-08
16
- * Pass respond_to? inquiries through to decoy (to allow preview, etc)
20
+ * Pass respond_to? inquiries through to decoy (to allow preview, etc)
17
21
  (Ian Lesperance)
18
22
 
19
23
  ### 2.2.6 / 2013-11-13
20
- * Add action and args as arguments to the error handler lambda for
24
+ * Add action and args as arguments to the error handler lambda for
21
25
  requeuing (Ellis Berner, Austen Ito)
22
26
  * Redis client v3 support; fix unhandled exception when offline
23
27
  (Yoav Matchulsky)
@@ -25,13 +29,13 @@
25
29
  ### 2.2.5 / 2013-10-10
26
30
  * Travis Integration (Peter Goldstein)
27
31
  * ActionMailer 4.0 test compatibility (Peter Goldstein)
28
- * Added `unschedule_delivery` method for resque-scheduler integration
32
+ * Added `unschedule_delivery` method for resque-scheduler integration
29
33
  (gsdean)
30
34
 
31
35
  ### 2.2.4 / 2013-05-25
32
36
  * Compatibility for Rails 4 pre-release (Ben Woosley)
33
37
  * Fallback to synchronous is default when connection to Redis fails
34
- * Avoid lazy evaluation of mail when excluded, for use with mail_view
38
+ * Avoid lazy evaluation of mail when excluded, for use with mail_view
35
39
  (gingerlime)
36
40
 
37
41
  ### 2.2.3 / 2013-02-27
data/README.md CHANGED
@@ -6,7 +6,7 @@ A gem plugin which allows messages prepared by ActionMailer to be delivered
6
6
  asynchronously. Assumes you're using [Resque](https://github.com/resque/resque)
7
7
  for your background jobs.
8
8
 
9
- Note that recent (2.0+) versions of Resque::Mailer only work with Rails 3.x or 4.x.
9
+ Note that recent (2.0+) versions of Resque::Mailer only work with Rails 3.x or later.
10
10
  For a version compatible with Rails 2, specify v1.x in your Gemfile.
11
11
 
12
12
  ## Installation
@@ -51,6 +51,12 @@ module Resque
51
51
  def perform(action, serialized_args)
52
52
  begin
53
53
  args = ::Resque::Mailer.argument_serializer.deserialize(serialized_args)
54
+ # symbolize keys so mailer block syntax works
55
+ if args.is_a?(Array)
56
+ args = args.each_with_object([]) do |arg, o|
57
+ o << (arg.is_a?(Hash) ? arg.symbolize_keys : arg)
58
+ end
59
+ end
54
60
  message = ::Resque::Mailer.prepare_message(self, action, *args)
55
61
  if message.respond_to?(:deliver_now)
56
62
  message.deliver_now
@@ -139,6 +145,7 @@ module Resque
139
145
  end
140
146
  end
141
147
  end
148
+ alias_method :deliver_now, :deliver
142
149
 
143
150
  def deliver_at(time)
144
151
  return deliver! if environment_excluded?
@@ -179,6 +186,7 @@ module Resque
179
186
  actual_message.deliver
180
187
  end
181
188
  end
189
+ alias_method :deliver_now!, :deliver!
182
190
 
183
191
  def method_missing(method_name, *args)
184
192
  actual_message.send(method_name, *args)
@@ -1,5 +1,5 @@
1
1
  module Resque
2
2
  module Mailer
3
- VERSION = "2.4.0"
3
+ VERSION = "2.4.1"
4
4
  end
5
5
  end
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.0
4
+ version: 2.4.1
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-10-05 00:00:00.000000000 Z
11
+ date: 2016-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.5.1
92
+ rubygems_version: 2.6.7
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: Rails plugin for sending asynchronous email with ActionMailer and Resque.