actionmailer 6.0.0 → 6.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionmailer might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/README.rdoc +1 -1
- data/lib/action_mailer/base.rb +2 -3
- data/lib/action_mailer/delivery_job.rb +1 -0
- data/lib/action_mailer/gem_version.rb +1 -1
- data/lib/action_mailer/mail_delivery_job.rb +7 -2
- data/lib/action_mailer/message_delivery.rb +8 -9
- data/lib/action_mailer/parameterized.rb +12 -11
- data/lib/action_mailer/preview.rb +0 -1
- data/lib/action_mailer/test_case.rb +0 -2
- data/lib/action_mailer/test_helper.rb +2 -2
- metadata +14 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '029f176ac2451d7e23bc4933f3a2d027016bc4a808c52200d3ec36fc485e9b4b'
|
4
|
+
data.tar.gz: 7a39096f7a7c29ecd7cc134f6aeaaa20204ba0ee3f9337a393ab115f19278609
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87cdb325fbf63d10c26adcfefad03f640b90286d9e545b854433b2e82f084e7ebf0875a9cb4bc5c1f7844d1b994757949b51b51f648158b5592e675112e28b8b
|
7
|
+
data.tar.gz: ac54573ee7c46ee662fa1ed4e7067ea5ef20e9618ecba7df7876499bb6d235156ee3fdfc776bb048a72267d7e92d8e3f77cb706cd1dc43cec5e1038eaee2a895
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
## Rails 6.0.3 (May 06, 2020) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 6.0.2.2 (March 19, 2020) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 6.0.2.1 (December 18, 2019) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
16
|
+
## Rails 6.0.2 (December 13, 2019) ##
|
17
|
+
|
18
|
+
* Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job.
|
19
|
+
|
20
|
+
*bogdanvlviv*
|
21
|
+
|
22
|
+
|
23
|
+
## Rails 6.0.1 (November 5, 2019) ##
|
24
|
+
|
25
|
+
* No changes.
|
26
|
+
|
27
|
+
|
1
28
|
## Rails 6.0.0 (August 16, 2019) ##
|
2
29
|
|
3
30
|
* No changes.
|
data/README.rdoc
CHANGED
@@ -138,4 +138,4 @@ Bug reports for the Ruby on Rails project can be filed here:
|
|
138
138
|
|
139
139
|
Feature requests should be discussed on the rails-core mailing list here:
|
140
140
|
|
141
|
-
* https://
|
141
|
+
* https://discuss.rubyonrails.org/c/rubyonrails-core
|
data/lib/action_mailer/base.rb
CHANGED
@@ -591,7 +591,6 @@ module ActionMailer
|
|
591
591
|
end
|
592
592
|
|
593
593
|
private
|
594
|
-
|
595
594
|
def set_payload_for_mail(payload, mail)
|
596
595
|
payload[:mail] = mail.encoded
|
597
596
|
payload[:mailer] = name
|
@@ -612,6 +611,7 @@ module ActionMailer
|
|
612
611
|
super
|
613
612
|
end
|
614
613
|
end
|
614
|
+
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
|
615
615
|
|
616
616
|
def respond_to_missing?(method, include_all = false)
|
617
617
|
action_methods.include?(method.to_s) || super
|
@@ -873,7 +873,6 @@ module ActionMailer
|
|
873
873
|
end
|
874
874
|
|
875
875
|
private
|
876
|
-
|
877
876
|
# Used by #mail to set the content type of the message.
|
878
877
|
#
|
879
878
|
# It will use the given +user_content_type+, or multipart if the mail
|
@@ -907,7 +906,7 @@ module ActionMailer
|
|
907
906
|
# If the subject has interpolations, you can pass them through the +interpolations+ parameter.
|
908
907
|
def default_i18n_subject(interpolations = {}) # :doc:
|
909
908
|
mailer_scope = self.class.mailer_name.tr("/", ".")
|
910
|
-
I18n.t(:subject, interpolations.merge(scope: [mailer_scope, action_name], default: action_name.humanize))
|
909
|
+
I18n.t(:subject, **interpolations.merge(scope: [mailer_scope, action_name], default: action_name.humanize))
|
911
910
|
end
|
912
911
|
|
913
912
|
# Emails do not support relative path links.
|
@@ -23,6 +23,7 @@ module ActionMailer
|
|
23
23
|
def perform(mailer, mail_method, delivery_method, *args) #:nodoc:
|
24
24
|
mailer.constantize.public_send(mail_method, *args).send(delivery_method)
|
25
25
|
end
|
26
|
+
ruby2_keywords(:perform) if respond_to?(:ruby2_keywords, true)
|
26
27
|
|
27
28
|
private
|
28
29
|
# "Deserialize" the mailer class name by hand in case another argument
|
@@ -13,9 +13,14 @@ module ActionMailer
|
|
13
13
|
|
14
14
|
rescue_from StandardError, with: :handle_exception_with_mailer_class
|
15
15
|
|
16
|
-
def perform(mailer, mail_method, delivery_method, args:, params: nil)
|
16
|
+
def perform(mailer, mail_method, delivery_method, args:, kwargs: nil, params: nil)
|
17
17
|
mailer_class = params ? mailer.constantize.with(params) : mailer.constantize
|
18
|
-
|
18
|
+
message = if kwargs
|
19
|
+
mailer_class.public_send(mail_method, *args, **kwargs)
|
20
|
+
else
|
21
|
+
mailer_class.public_send(mail_method, *args)
|
22
|
+
end
|
23
|
+
message.send(delivery_method)
|
19
24
|
end
|
20
25
|
|
21
26
|
private
|
@@ -23,6 +23,7 @@ module ActionMailer
|
|
23
23
|
@processed_mailer = nil
|
24
24
|
@mail_message = nil
|
25
25
|
end
|
26
|
+
ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)
|
26
27
|
|
27
28
|
# Method calls are delegated to the Mail::Message that's ready to deliver.
|
28
29
|
def __getobj__ #:nodoc:
|
@@ -136,16 +137,14 @@ module ActionMailer
|
|
136
137
|
"method*, or 3. use a custom Active Job instead of #deliver_later."
|
137
138
|
else
|
138
139
|
job = @mailer_class.delivery_job
|
139
|
-
args = arguments_for(job, delivery_method)
|
140
|
-
job.set(options).perform_later(*args)
|
141
|
-
end
|
142
|
-
end
|
143
140
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
141
|
+
if job <= MailDeliveryJob
|
142
|
+
job.set(options).perform_later(
|
143
|
+
@mailer_class.name, @action.to_s, delivery_method.to_s, args: @args)
|
144
|
+
else
|
145
|
+
job.set(options).perform_later(
|
146
|
+
@mailer_class.name, @action.to_s, delivery_method.to_s, *@args)
|
147
|
+
end
|
149
148
|
end
|
150
149
|
end
|
151
150
|
end
|
@@ -115,6 +115,7 @@ module ActionMailer
|
|
115
115
|
super
|
116
116
|
end
|
117
117
|
end
|
118
|
+
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
|
118
119
|
|
119
120
|
def respond_to_missing?(method, include_all = false)
|
120
121
|
@mailer.respond_to?(method, include_all)
|
@@ -125,6 +126,7 @@ module ActionMailer
|
|
125
126
|
def perform(mailer, mail_method, delivery_method, params, *args)
|
126
127
|
mailer.constantize.with(params).public_send(mail_method, *args).send(delivery_method)
|
127
128
|
end
|
129
|
+
ruby2_keywords(:perform) if respond_to?(:ruby2_keywords, true)
|
128
130
|
end
|
129
131
|
|
130
132
|
class MessageDelivery < ActionMailer::MessageDelivery # :nodoc:
|
@@ -132,6 +134,7 @@ module ActionMailer
|
|
132
134
|
super(mailer_class, action, *args)
|
133
135
|
@params = params
|
134
136
|
end
|
137
|
+
ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)
|
135
138
|
|
136
139
|
private
|
137
140
|
def processed_mailer
|
@@ -145,9 +148,15 @@ module ActionMailer
|
|
145
148
|
if processed?
|
146
149
|
super
|
147
150
|
else
|
148
|
-
job
|
149
|
-
|
150
|
-
job
|
151
|
+
job = delivery_job_class
|
152
|
+
|
153
|
+
if job <= MailDeliveryJob
|
154
|
+
job.set(options).perform_later(
|
155
|
+
@mailer_class.name, @action.to_s, delivery_method.to_s, params: @params, args: @args)
|
156
|
+
else
|
157
|
+
job.set(options).perform_later(
|
158
|
+
@mailer_class.name, @action.to_s, delivery_method.to_s, @params, *@args)
|
159
|
+
end
|
151
160
|
end
|
152
161
|
end
|
153
162
|
|
@@ -158,14 +167,6 @@ module ActionMailer
|
|
158
167
|
Parameterized::DeliveryJob
|
159
168
|
end
|
160
169
|
end
|
161
|
-
|
162
|
-
def arguments_for(delivery_job, delivery_method)
|
163
|
-
if delivery_job <= MailDeliveryJob
|
164
|
-
[@mailer_class.name, @action.to_s, delivery_method.to_s, params: @params, args: @args]
|
165
|
-
else
|
166
|
-
[@mailer_class.name, @action.to_s, delivery_method.to_s, @params, *@args]
|
167
|
-
end
|
168
|
-
end
|
169
170
|
end
|
170
171
|
end
|
171
172
|
end
|
@@ -22,7 +22,6 @@ module ActionMailer
|
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
25
|
-
|
26
25
|
def clear_test_deliveries
|
27
26
|
if ActionMailer::Base.delivery_method == :test
|
28
27
|
ActionMailer::Base.deliveries.clear
|
@@ -76,7 +75,6 @@ module ActionMailer
|
|
76
75
|
end
|
77
76
|
|
78
77
|
private
|
79
|
-
|
80
78
|
def initialize_test_deliveries
|
81
79
|
set_delivery_method :test
|
82
80
|
@old_perform_deliveries = ActionMailer::Base.perform_deliveries
|
@@ -152,11 +152,11 @@ module ActionMailer
|
|
152
152
|
end
|
153
153
|
|
154
154
|
private
|
155
|
-
|
156
155
|
def delivery_job_filter(job)
|
157
156
|
job_class = job.is_a?(Hash) ? job.fetch(:job) : job.class
|
158
157
|
|
159
|
-
Base.descendants.map(&:delivery_job).include?(job_class)
|
158
|
+
Base.descendants.map(&:delivery_job).include?(job_class) ||
|
159
|
+
ActionMailer::Parameterized::DeliveryJob == job_class
|
160
160
|
end
|
161
161
|
end
|
162
162
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.0.
|
19
|
+
version: 6.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.0.
|
26
|
+
version: 6.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionview
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 6.0.
|
33
|
+
version: 6.0.3
|
34
34
|
type: :runtime
|
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: 6.0.
|
40
|
+
version: 6.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activejob
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 6.0.
|
47
|
+
version: 6.0.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 6.0.
|
54
|
+
version: 6.0.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mail
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,8 +122,11 @@ homepage: https://rubyonrails.org
|
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
124
|
metadata:
|
125
|
-
|
126
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.
|
125
|
+
bug_tracker_uri: https://github.com/rails/rails/issues
|
126
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.3/actionmailer/CHANGELOG.md
|
127
|
+
documentation_uri: https://api.rubyonrails.org/v6.0.3/
|
128
|
+
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
129
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.3/actionmailer
|
127
130
|
post_install_message:
|
128
131
|
rdoc_options: []
|
129
132
|
require_paths:
|
@@ -140,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
143
|
version: '0'
|
141
144
|
requirements:
|
142
145
|
- none
|
143
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.1.2
|
144
147
|
signing_key:
|
145
148
|
specification_version: 4
|
146
149
|
summary: Email composition and delivery framework (part of Rails).
|