actionmailer 6.0.3.3 → 6.1.1
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 +12 -122
- data/MIT-LICENSE +1 -1
- data/lib/action_mailer.rb +2 -1
- data/lib/action_mailer/base.rb +47 -41
- data/lib/action_mailer/delivery_job.rb +1 -1
- data/lib/action_mailer/delivery_methods.rb +1 -1
- data/lib/action_mailer/gem_version.rb +3 -3
- data/lib/action_mailer/log_subscriber.rb +0 -6
- data/lib/action_mailer/message_delivery.rb +28 -1
- data/lib/action_mailer/preview.rb +1 -1
- data/lib/action_mailer/railtie.rb +0 -5
- data/lib/action_mailer/test_helper.rb +2 -2
- data/lib/rails/generators/mailer/USAGE +2 -3
- metadata +29 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00f824272685e39446fc6ed13c338cc7af4267ebf1bff0f054d2e9841bb1acfb
|
4
|
+
data.tar.gz: f4dc2df9e80a598e284423859edce30f8569f3e658702c13bb3363b009511d1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa013d9eebe8d3464e8898f5749d0662e2e643725f4015af59c662b7c2059bab86af8aceeba81a8777579b1df13a66728d46ac7c649ebd38a398e0290100567d
|
7
|
+
data.tar.gz: 726821207ca4b5e892e8d7b037467ac8d45eeedae6da0192fac2d3db08548290dac796a3ba7785da71b1624716ac270e67f21745f75e0d66b82519d50781e91f
|
data/CHANGELOG.md
CHANGED
@@ -1,138 +1,28 @@
|
|
1
|
-
## Rails 6.
|
1
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
2
2
|
|
3
|
-
*
|
3
|
+
* Sets default mailer queue to `"default"` in the mail assertions.
|
4
4
|
|
5
|
+
*Paul Keen*
|
5
6
|
|
6
|
-
## Rails 6.0.3.2 (June 17, 2020) ##
|
7
7
|
|
8
|
-
|
8
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
9
9
|
|
10
|
+
* Change default queue name of the deliver (`:mailers`) job to be the job adapter's
|
11
|
+
default (`:default`).
|
10
12
|
|
11
|
-
|
13
|
+
*Rafael Mendonça França*
|
12
14
|
|
13
|
-
*
|
15
|
+
* Remove deprecated `ActionMailer::Base.receive` in favor of [Action Mailbox](https://github.com/rails/rails/tree/master/actionmailbox).
|
14
16
|
|
15
|
-
|
16
|
-
## Rails 6.0.3 (May 06, 2020) ##
|
17
|
-
|
18
|
-
* No changes.
|
19
|
-
|
20
|
-
|
21
|
-
## Rails 6.0.2.2 (March 19, 2020) ##
|
22
|
-
|
23
|
-
* No changes.
|
24
|
-
|
25
|
-
|
26
|
-
## Rails 6.0.2.1 (December 18, 2019) ##
|
27
|
-
|
28
|
-
* No changes.
|
29
|
-
|
30
|
-
|
31
|
-
## Rails 6.0.2 (December 13, 2019) ##
|
17
|
+
*Rafael Mendonça França*
|
32
18
|
|
33
19
|
* Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job.
|
34
20
|
|
35
21
|
*bogdanvlviv*
|
36
22
|
|
23
|
+
* Added `email_address_with_name` to properly escape addresses with names.
|
37
24
|
|
38
|
-
|
39
|
-
|
40
|
-
* No changes.
|
41
|
-
|
42
|
-
|
43
|
-
## Rails 6.0.0 (August 16, 2019) ##
|
44
|
-
|
45
|
-
* No changes.
|
46
|
-
|
47
|
-
|
48
|
-
## Rails 6.0.0.rc2 (July 22, 2019) ##
|
49
|
-
|
50
|
-
* No changes.
|
51
|
-
|
52
|
-
|
53
|
-
## Rails 6.0.0.rc1 (April 24, 2019) ##
|
54
|
-
|
55
|
-
* No changes.
|
56
|
-
|
57
|
-
|
58
|
-
## Rails 6.0.0.beta3 (March 11, 2019) ##
|
59
|
-
|
60
|
-
* No changes.
|
61
|
-
|
62
|
-
|
63
|
-
## Rails 6.0.0.beta2 (February 25, 2019) ##
|
64
|
-
|
65
|
-
* No changes.
|
66
|
-
|
67
|
-
|
68
|
-
## Rails 6.0.0.beta1 (January 18, 2019) ##
|
69
|
-
|
70
|
-
* Deprecate `ActionMailer::Base.receive` in favor of [Action Mailbox](https://github.com/rails/rails/tree/master/actionmailbox).
|
71
|
-
|
72
|
-
*George Claghorn*
|
73
|
-
|
74
|
-
* Add `MailDeliveryJob` for delivering both regular and parameterized mail. Deprecate using `DeliveryJob` and `Parameterized::DeliveryJob`.
|
75
|
-
|
76
|
-
*Gannon McGibbon*
|
77
|
-
|
78
|
-
* Fix ActionMailer assertions not working when a Mail defines
|
79
|
-
a custom delivery job class
|
80
|
-
|
81
|
-
*Edouard Chin*
|
82
|
-
|
83
|
-
* Mails with multipart `format` blocks with implicit render now also check for
|
84
|
-
a template name in options hash instead of only using the action name.
|
85
|
-
|
86
|
-
*Marcus Ilgner*
|
87
|
-
|
88
|
-
* `ActionDispatch::IntegrationTest` includes `ActionMailer::TestHelper` module by default.
|
89
|
-
|
90
|
-
*Ricardo Díaz*
|
91
|
-
|
92
|
-
* Add `perform_deliveries` to a payload of `deliver.action_mailer` notification.
|
93
|
-
|
94
|
-
*Yoshiyuki Kinjo*
|
95
|
-
|
96
|
-
* Change delivery logging message when `perform_deliveries` is false.
|
97
|
-
|
98
|
-
*Yoshiyuki Kinjo*
|
99
|
-
|
100
|
-
* Allow call `assert_enqueued_email_with` with no block.
|
101
|
-
|
102
|
-
Example:
|
103
|
-
```
|
104
|
-
def test_email
|
105
|
-
ContactMailer.welcome.deliver_later
|
106
|
-
assert_enqueued_email_with ContactMailer, :welcome
|
107
|
-
end
|
108
|
-
|
109
|
-
def test_email_with_arguments
|
110
|
-
ContactMailer.welcome("Hello", "Goodbye").deliver_later
|
111
|
-
assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
|
112
|
-
end
|
113
|
-
```
|
114
|
-
|
115
|
-
*bogdanvlviv*
|
116
|
-
|
117
|
-
* Ensure mail gem is eager autoloaded when eager load is true to prevent thread deadlocks.
|
118
|
-
|
119
|
-
*Samuel Cochran*
|
120
|
-
|
121
|
-
* Perform email jobs in `assert_emails`.
|
122
|
-
|
123
|
-
*Gannon McGibbon*
|
124
|
-
|
125
|
-
* Add `Base.unregister_observer`, `Base.unregister_observers`,
|
126
|
-
`Base.unregister_interceptor`, `Base.unregister_interceptors`,
|
127
|
-
`Base.unregister_preview_interceptor` and `Base.unregister_preview_interceptors`.
|
128
|
-
This makes it possible to dynamically add and remove email observers and
|
129
|
-
interceptors at runtime in the same way they're registered.
|
130
|
-
|
131
|
-
*Claudio Ortolina*, *Kota Miyake*
|
132
|
-
|
133
|
-
* Rails 6 requires Ruby 2.5.0 or newer.
|
134
|
-
|
135
|
-
*Jeremy Daer*, *Kasper Timm Hansen*
|
25
|
+
*Sunny Ripert*
|
136
26
|
|
137
27
|
|
138
|
-
Please check [
|
28
|
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionmailer/CHANGELOG.md) for previous changes.
|
data/MIT-LICENSE
CHANGED
data/lib/action_mailer.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c) 2004-
|
4
|
+
# Copyright (c) 2004-2020 David Heinemeier Hansson
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining
|
7
7
|
# a copy of this software and associated documentation files (the
|
@@ -67,4 +67,5 @@ autoload :Mime, "action_dispatch/http/mime_type"
|
|
67
67
|
ActiveSupport.on_load(:action_view) do
|
68
68
|
ActionView::Base.default_formats ||= Mime::SET.symbols
|
69
69
|
ActionView::Template::Types.delegate_to Mime
|
70
|
+
ActionView::LookupContext::DetailsKey.clear
|
70
71
|
end
|
data/lib/action_mailer/base.rb
CHANGED
@@ -16,11 +16,11 @@ module ActionMailer
|
|
16
16
|
#
|
17
17
|
# To use Action Mailer, you need to create a mailer model.
|
18
18
|
#
|
19
|
-
# $ rails generate mailer Notifier
|
19
|
+
# $ bin/rails generate mailer Notifier
|
20
20
|
#
|
21
21
|
# The generated model inherits from <tt>ApplicationMailer</tt> which in turn
|
22
22
|
# inherits from <tt>ActionMailer::Base</tt>. A mailer model defines methods
|
23
|
-
# used to generate an email message. In these methods, you can
|
23
|
+
# used to generate an email message. In these methods, you can set up variables to be used in
|
24
24
|
# the mailer views, options on the mail itself such as the <tt>:from</tt> address, and attachments.
|
25
25
|
#
|
26
26
|
# class ApplicationMailer < ActionMailer::Base
|
@@ -455,10 +455,6 @@ module ActionMailer
|
|
455
455
|
|
456
456
|
PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [:@_action_has_layout]
|
457
457
|
|
458
|
-
def _protected_ivars # :nodoc:
|
459
|
-
PROTECTED_IVARS
|
460
|
-
end
|
461
|
-
|
462
458
|
helper ActionMailer::MailHelper
|
463
459
|
|
464
460
|
class_attribute :delivery_job, default: ::ActionMailer::DeliveryJob
|
@@ -551,32 +547,6 @@ module ActionMailer
|
|
551
547
|
# config.action_mailer.default_options = { from: "no-reply@example.org" }
|
552
548
|
alias :default_options= :default
|
553
549
|
|
554
|
-
# Receives a raw email, parses it into an email object, decodes it,
|
555
|
-
# instantiates a new mailer, and passes the email object to the mailer
|
556
|
-
# object's +receive+ method.
|
557
|
-
#
|
558
|
-
# If you want your mailer to be able to process incoming messages, you'll
|
559
|
-
# need to implement a +receive+ method that accepts the raw email string
|
560
|
-
# as a parameter:
|
561
|
-
#
|
562
|
-
# class MyMailer < ActionMailer::Base
|
563
|
-
# def receive(mail)
|
564
|
-
# # ...
|
565
|
-
# end
|
566
|
-
# end
|
567
|
-
def receive(raw_mail)
|
568
|
-
ActiveSupport::Deprecation.warn(<<~MESSAGE.squish)
|
569
|
-
ActionMailer::Base.receive is deprecated and will be removed in Rails 6.1.
|
570
|
-
Use Action Mailbox to process inbound email.
|
571
|
-
MESSAGE
|
572
|
-
|
573
|
-
ActiveSupport::Notifications.instrument("receive.action_mailer") do |payload|
|
574
|
-
mail = Mail.new(raw_mail)
|
575
|
-
set_payload_for_mail(payload, mail)
|
576
|
-
new.receive(mail)
|
577
|
-
end
|
578
|
-
end
|
579
|
-
|
580
550
|
# Wraps an email delivery inside of <tt>ActiveSupport::Notifications</tt> instrumentation.
|
581
551
|
#
|
582
552
|
# This method is actually called by the <tt>Mail::Message</tt> object itself
|
@@ -590,6 +560,14 @@ module ActionMailer
|
|
590
560
|
end
|
591
561
|
end
|
592
562
|
|
563
|
+
# Returns an email in the format "Name <email@example.com>".
|
564
|
+
def email_address_with_name(address, name)
|
565
|
+
Mail::Address.new.tap do |builder|
|
566
|
+
builder.address = address
|
567
|
+
builder.display_name = name
|
568
|
+
end.to_s
|
569
|
+
end
|
570
|
+
|
593
571
|
private
|
594
572
|
def set_payload_for_mail(payload, mail)
|
595
573
|
payload[:mail] = mail.encoded
|
@@ -657,6 +635,11 @@ module ActionMailer
|
|
657
635
|
self.class.mailer_name
|
658
636
|
end
|
659
637
|
|
638
|
+
# Returns an email in the format "Name <email@example.com>".
|
639
|
+
def email_address_with_name(address, name)
|
640
|
+
self.class.email_address_with_name(address, name)
|
641
|
+
end
|
642
|
+
|
660
643
|
# Allows you to pass random and unusual headers to the new <tt>Mail::Message</tt>
|
661
644
|
# object which will add them to itself.
|
662
645
|
#
|
@@ -738,7 +721,7 @@ module ActionMailer
|
|
738
721
|
end
|
739
722
|
|
740
723
|
class LateAttachmentsProxy < SimpleDelegator
|
741
|
-
def inline;
|
724
|
+
def inline; self end
|
742
725
|
def []=(_name, _content); _raise_error end
|
743
726
|
|
744
727
|
private
|
@@ -859,8 +842,9 @@ module ActionMailer
|
|
859
842
|
@_mail_was_called = true
|
860
843
|
|
861
844
|
create_parts_from_responses(message, responses)
|
845
|
+
wrap_inline_attachments(message)
|
862
846
|
|
863
|
-
#
|
847
|
+
# Set up content type, reapply charset and handle parts order
|
864
848
|
message.content_type = set_content_type(message, content_type, headers[:content_type])
|
865
849
|
message.charset = charset
|
866
850
|
|
@@ -888,7 +872,7 @@ module ActionMailer
|
|
888
872
|
when user_content_type.present?
|
889
873
|
user_content_type
|
890
874
|
when m.has_attachments?
|
891
|
-
if m.attachments.
|
875
|
+
if m.attachments.all?(&:inline?)
|
892
876
|
["multipart", "related", params]
|
893
877
|
else
|
894
878
|
["multipart", "mixed", params]
|
@@ -915,12 +899,9 @@ module ActionMailer
|
|
915
899
|
end
|
916
900
|
|
917
901
|
def apply_defaults(headers)
|
918
|
-
default_values = self.class.default.
|
919
|
-
|
920
|
-
|
921
|
-
compute_default(value)
|
922
|
-
]
|
923
|
-
end.to_h
|
902
|
+
default_values = self.class.default.transform_values do |value|
|
903
|
+
compute_default(value)
|
904
|
+
end
|
924
905
|
|
925
906
|
headers_with_defaults = headers.reverse_merge(default_values)
|
926
907
|
headers_with_defaults[:subject] ||= default_i18n_subject
|
@@ -989,6 +970,27 @@ module ActionMailer
|
|
989
970
|
end
|
990
971
|
end
|
991
972
|
|
973
|
+
def wrap_inline_attachments(message)
|
974
|
+
# If we have both types of attachment, wrap all the inline attachments
|
975
|
+
# in multipart/related, but not the actual attachments
|
976
|
+
if message.attachments.detect(&:inline?) && message.attachments.detect { |a| !a.inline? }
|
977
|
+
related = Mail::Part.new
|
978
|
+
related.content_type = "multipart/related"
|
979
|
+
mixed = [ related ]
|
980
|
+
|
981
|
+
message.parts.each do |p|
|
982
|
+
if p.attachment? && !p.inline?
|
983
|
+
mixed << p
|
984
|
+
else
|
985
|
+
related.add_part(p)
|
986
|
+
end
|
987
|
+
end
|
988
|
+
|
989
|
+
message.parts.clear
|
990
|
+
mixed.each { |c| message.add_part(c) }
|
991
|
+
end
|
992
|
+
end
|
993
|
+
|
992
994
|
def create_parts_from_responses(m, responses)
|
993
995
|
if responses.size == 1 && !m.has_attachments?
|
994
996
|
responses[0].each { |k, v| m[k] = v }
|
@@ -1020,6 +1022,10 @@ module ActionMailer
|
|
1020
1022
|
"action_mailer"
|
1021
1023
|
end
|
1022
1024
|
|
1025
|
+
def _protected_ivars
|
1026
|
+
PROTECTED_IVARS
|
1027
|
+
end
|
1028
|
+
|
1023
1029
|
ActiveSupport.run_load_hooks(:action_mailer, self)
|
1024
1030
|
end
|
1025
1031
|
end
|
@@ -15,7 +15,7 @@ module ActionMailer
|
|
15
15
|
before_perform do
|
16
16
|
ActiveSupport::Deprecation.warn <<~MSG.squish
|
17
17
|
Sending mail with DeliveryJob and Parameterized::DeliveryJob
|
18
|
-
is deprecated and will be removed in Rails 6.
|
18
|
+
is deprecated and will be removed in Rails 6.2.
|
19
19
|
Please use MailDeliveryJob instead.
|
20
20
|
MSG
|
21
21
|
end
|
@@ -49,7 +49,7 @@ module ActionMailer
|
|
49
49
|
# arguments: '-i'
|
50
50
|
def add_delivery_method(symbol, klass, default_options = {})
|
51
51
|
class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings")
|
52
|
-
|
52
|
+
public_send(:"#{symbol}_settings=", default_options)
|
53
53
|
self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze
|
54
54
|
end
|
55
55
|
|
@@ -20,12 +20,6 @@ module ActionMailer
|
|
20
20
|
debug { event.payload[:mail] }
|
21
21
|
end
|
22
22
|
|
23
|
-
# An email was received.
|
24
|
-
def receive(event)
|
25
|
-
info { "Received mail (#{event.duration.round(1)}ms)" }
|
26
|
-
debug { event.payload[:mail] }
|
27
|
-
end
|
28
|
-
|
29
23
|
# An email was generated.
|
30
24
|
def process(event)
|
31
25
|
debug do
|
@@ -53,12 +53,14 @@ module ActionMailer
|
|
53
53
|
# Notifier.welcome(User.first).deliver_later!
|
54
54
|
# Notifier.welcome(User.first).deliver_later!(wait: 1.hour)
|
55
55
|
# Notifier.welcome(User.first).deliver_later!(wait_until: 10.hours.from_now)
|
56
|
+
# Notifier.welcome(User.first).deliver_later!(priority: 10)
|
56
57
|
#
|
57
58
|
# Options:
|
58
59
|
#
|
59
60
|
# * <tt>:wait</tt> - Enqueue the email to be delivered with a delay
|
60
61
|
# * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time
|
61
62
|
# * <tt>:queue</tt> - Enqueue the email on the specified queue
|
63
|
+
# * <tt>:priority</tt> - Enqueues the email with the specified priority
|
62
64
|
#
|
63
65
|
# By default, the email will be enqueued using <tt>ActionMailer::DeliveryJob</tt>. Each
|
64
66
|
# <tt>ActionMailer::Base</tt> class can specify the job to use by setting the class variable
|
@@ -77,12 +79,14 @@ module ActionMailer
|
|
77
79
|
# Notifier.welcome(User.first).deliver_later
|
78
80
|
# Notifier.welcome(User.first).deliver_later(wait: 1.hour)
|
79
81
|
# Notifier.welcome(User.first).deliver_later(wait_until: 10.hours.from_now)
|
82
|
+
# Notifier.welcome(User.first).deliver_later(priority: 10)
|
80
83
|
#
|
81
84
|
# Options:
|
82
85
|
#
|
83
86
|
# * <tt>:wait</tt> - Enqueue the email to be delivered with a delay.
|
84
87
|
# * <tt>:wait_until</tt> - Enqueue the email to be delivered at (after) a specific date / time.
|
85
88
|
# * <tt>:queue</tt> - Enqueue the email on the specified queue.
|
89
|
+
# * <tt>:priority</tt> - Enqueues the email with the specified priority
|
86
90
|
#
|
87
91
|
# By default, the email will be enqueued using <tt>ActionMailer::DeliveryJob</tt>. Each
|
88
92
|
# <tt>ActionMailer::Base</tt> class can specify the job to use by setting the class variable
|
@@ -138,14 +142,37 @@ module ActionMailer
|
|
138
142
|
else
|
139
143
|
job = @mailer_class.delivery_job
|
140
144
|
|
141
|
-
if job
|
145
|
+
if use_new_args?(job)
|
142
146
|
job.set(options).perform_later(
|
143
147
|
@mailer_class.name, @action.to_s, delivery_method.to_s, args: @args)
|
148
|
+
elsif job <= DeliveryJob
|
149
|
+
job.set(options).perform_later(
|
150
|
+
@mailer_class.name, @action.to_s, delivery_method.to_s, *@args)
|
144
151
|
else
|
152
|
+
ActiveSupport::Deprecation.warn(<<~EOM)
|
153
|
+
In Rails 6.2, Action Mailer will pass the mail arguments inside the `:args` keyword argument.
|
154
|
+
The `perform` method of the #{job} needs to change and forward the mail arguments
|
155
|
+
from the `args` keyword argument.
|
156
|
+
|
157
|
+
The `perform` method should now look like:
|
158
|
+
|
159
|
+
`def perform(mailer, mail_method, delivery, args:)`
|
160
|
+
EOM
|
161
|
+
|
145
162
|
job.set(options).perform_later(
|
146
163
|
@mailer_class.name, @action.to_s, delivery_method.to_s, *@args)
|
147
164
|
end
|
148
165
|
end
|
149
166
|
end
|
167
|
+
|
168
|
+
def use_new_args?(job)
|
169
|
+
parameters = job.public_instance_method(:perform).parameters
|
170
|
+
|
171
|
+
parameters.find do |key, name|
|
172
|
+
return true if key == :keyreq && name == :args
|
173
|
+
|
174
|
+
key == :keyrest
|
175
|
+
end
|
176
|
+
end
|
150
177
|
end
|
151
178
|
end
|
@@ -18,11 +18,6 @@ module ActionMailer
|
|
18
18
|
paths = app.config.paths
|
19
19
|
options = app.config.action_mailer
|
20
20
|
|
21
|
-
if app.config.force_ssl
|
22
|
-
options.default_url_options ||= {}
|
23
|
-
options.default_url_options[:protocol] ||= "https"
|
24
|
-
end
|
25
|
-
|
26
21
|
options.assets_dir ||= paths["public"].first
|
27
22
|
options.javascripts_dir ||= paths["public/javascripts"].first
|
28
23
|
options.stylesheets_dir ||= paths["public/stylesheets"].first
|
@@ -123,13 +123,13 @@ module ActionMailer
|
|
123
123
|
# ContactMailer.with(email: 'user@example.com').welcome.deliver_later
|
124
124
|
# end
|
125
125
|
# end
|
126
|
-
def assert_enqueued_email_with(mailer, method, args: nil, queue: "
|
126
|
+
def assert_enqueued_email_with(mailer, method, args: nil, queue: ActionMailer::Base.deliver_later_queue_name || "default", &block)
|
127
127
|
args = if args.is_a?(Hash)
|
128
128
|
[mailer.to_s, method.to_s, "deliver_now", params: args, args: []]
|
129
129
|
else
|
130
130
|
[mailer.to_s, method.to_s, "deliver_now", args: Array(args)]
|
131
131
|
end
|
132
|
-
assert_enqueued_with(job: mailer.delivery_job, args: args, queue: queue, &block)
|
132
|
+
assert_enqueued_with(job: mailer.delivery_job, args: args, queue: queue.to_s, &block)
|
133
133
|
end
|
134
134
|
|
135
135
|
# Asserts that no emails are enqueued for later delivery.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Description:
|
2
2
|
============
|
3
|
-
|
3
|
+
Generates a new mailer and its views. Passes the mailer name, either
|
4
4
|
CamelCased or under_scored, and an optional list of emails as arguments.
|
5
5
|
|
6
6
|
This generates a mailer class in app/mailers and invokes your template
|
@@ -8,10 +8,9 @@ Description:
|
|
8
8
|
|
9
9
|
Example:
|
10
10
|
========
|
11
|
-
rails generate mailer Notifications signup forgot_password invoice
|
11
|
+
bin/rails generate mailer Notifications signup forgot_password invoice
|
12
12
|
|
13
13
|
creates a Notifications mailer class, views, and test:
|
14
14
|
Mailer: app/mailers/notifications_mailer.rb
|
15
15
|
Views: app/views/notifications_mailer/signup.text.erb [...]
|
16
16
|
Test: test/mailers/notifications_mailer_test.rb
|
17
|
-
|
metadata
CHANGED
@@ -1,57 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.1.1
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: actionpack
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - '='
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.
|
33
|
+
version: 6.1.1
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - '='
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.
|
40
|
+
version: 6.1.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: actionview
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - '='
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: 6.
|
47
|
+
version: 6.1.1
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - '='
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: 6.
|
54
|
+
version: 6.1.1
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: activejob
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - '='
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 6.
|
61
|
+
version: 6.1.1
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - '='
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 6.
|
68
|
+
version: 6.1.1
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: mail
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,11 +137,11 @@ licenses:
|
|
123
137
|
- MIT
|
124
138
|
metadata:
|
125
139
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
126
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.
|
127
|
-
documentation_uri: https://api.rubyonrails.org/v6.
|
140
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.1/actionmailer/CHANGELOG.md
|
141
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.1/
|
128
142
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
129
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.
|
130
|
-
post_install_message:
|
143
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.1/actionmailer
|
144
|
+
post_install_message:
|
131
145
|
rdoc_options: []
|
132
146
|
require_paths:
|
133
147
|
- lib
|
@@ -143,8 +157,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
157
|
version: '0'
|
144
158
|
requirements:
|
145
159
|
- none
|
146
|
-
rubygems_version: 3.
|
147
|
-
signing_key:
|
160
|
+
rubygems_version: 3.2.3
|
161
|
+
signing_key:
|
148
162
|
specification_version: 4
|
149
163
|
summary: Email composition and delivery framework (part of Rails).
|
150
164
|
test_files: []
|