actionmailer 6.0.2.2 → 6.0.3.rc1
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 +10 -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 +2 -2
- 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 +0 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f33beaf238fbf8dd96e6d0bed3a21ee611239759034c06e71f4d289751f83f25
|
4
|
+
data.tar.gz: 0cabf1f840fcc39f14629eb15f92e8cfc947fd336cb277ea6cb4bfff0fa079a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18828662aa809bc713f59cd7539ae25a612b46be71932e8273742266c4583d132defbb441f807e065e93c37e3b7bc965b0a24176a722f891c3811066e1129c67
|
7
|
+
data.tar.gz: 461730ba1919864ab8c62685fffdf4328acb5a001d92d560854a252e051761c370c46f4659642fd96cbc5976d697ea8e5d6898c976534d47ce8621841c7dac15
|
data/CHANGELOG.md
CHANGED
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
|
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.rc1
|
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: 2020-
|
11
|
+
date: 2020-05-01 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.rc1
|
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.rc1
|
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.rc1
|
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.rc1
|
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.rc1
|
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.rc1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mail
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,10 +123,10 @@ licenses:
|
|
123
123
|
- MIT
|
124
124
|
metadata:
|
125
125
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
126
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.
|
127
|
-
documentation_uri: https://api.rubyonrails.org/v6.0.
|
128
|
-
mailing_list_uri: https://
|
129
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.
|
126
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.3.rc1/actionmailer/CHANGELOG.md
|
127
|
+
documentation_uri: https://api.rubyonrails.org/v6.0.3.rc1/
|
128
|
+
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
129
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.3.rc1/actionmailer
|
130
130
|
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
@@ -138,12 +138,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: 2.5.0
|
139
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
-
- - "
|
141
|
+
- - ">"
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
143
|
+
version: 1.3.1
|
144
144
|
requirements:
|
145
145
|
- none
|
146
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.1.2
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Email composition and delivery framework (part of Rails).
|