actionmailer 6.0.0.beta1 → 6.0.0.beta2
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 +5 -0
- data/lib/action_mailer/base.rb +3 -3
- data/lib/action_mailer/gem_version.rb +1 -1
- data/lib/action_mailer/log_subscriber.rb +2 -3
- data/lib/action_mailer/mail_delivery_job.rb +1 -1
- data/lib/action_mailer/railtie.rb +10 -6
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 902df32e11a517e44360244670752debaaf72264c39caefaf2441426c569f1c5
|
4
|
+
data.tar.gz: a59cd5d8d3e259409ccfd649bde90b0b5417dc6c47234d55675964efe79e916a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a44ffac4181d8872b4b30fd0884f282a115740969fc3323f90126799ec1bc01d44e84f4894f8f304325939005bedd097b5ac0eb88270d81d4eb44a2cbac10fa
|
7
|
+
data.tar.gz: f74fdfb248c675ef09dccf2186b0844a1a1adc0688e435c013b2d4aed103af3192666943089a1e5b3d2912169659ff3ee03afd71bceb8f2e85e0852dc6e6afc1
|
data/CHANGELOG.md
CHANGED
data/lib/action_mailer/base.rb
CHANGED
@@ -593,6 +593,7 @@ module ActionMailer
|
|
593
593
|
private
|
594
594
|
|
595
595
|
def set_payload_for_mail(payload, mail)
|
596
|
+
payload[:mail] = mail.encoded
|
596
597
|
payload[:mailer] = name
|
597
598
|
payload[:message_id] = mail.message_id
|
598
599
|
payload[:subject] = mail.subject
|
@@ -601,7 +602,6 @@ module ActionMailer
|
|
601
602
|
payload[:bcc] = mail.bcc if mail.bcc.present?
|
602
603
|
payload[:cc] = mail.cc if mail.cc.present?
|
603
604
|
payload[:date] = mail.date
|
604
|
-
payload[:mail] = mail.encoded
|
605
605
|
payload[:perform_deliveries] = mail.perform_deliveries
|
606
606
|
end
|
607
607
|
|
@@ -973,7 +973,7 @@ module ActionMailer
|
|
973
973
|
templates_name = headers[:template_name] || action_name
|
974
974
|
|
975
975
|
each_template(Array(templates_path), templates_name).map do |template|
|
976
|
-
self.formats = template.
|
976
|
+
self.formats = [template.format]
|
977
977
|
{
|
978
978
|
body: render(template: template),
|
979
979
|
content_type: template.type.to_s
|
@@ -986,7 +986,7 @@ module ActionMailer
|
|
986
986
|
if templates.empty?
|
987
987
|
raise ActionView::MissingTemplate.new(paths, name, paths, false, "mailer")
|
988
988
|
else
|
989
|
-
templates.uniq(&:
|
989
|
+
templates.uniq(&:format).each(&block)
|
990
990
|
end
|
991
991
|
end
|
992
992
|
|
@@ -10,11 +10,10 @@ module ActionMailer
|
|
10
10
|
def deliver(event)
|
11
11
|
info do
|
12
12
|
perform_deliveries = event.payload[:perform_deliveries]
|
13
|
-
recipients = Array(event.payload[:to]).join(", ")
|
14
13
|
if perform_deliveries
|
15
|
-
"
|
14
|
+
"Delivered mail #{event.payload[:message_id]} (#{event.duration.round(1)}ms)"
|
16
15
|
else
|
17
|
-
"Skipped
|
16
|
+
"Skipped delivery of mail #{event.payload[:message_id]} as `perform_deliveries` is false"
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
require "active_job"
|
4
4
|
|
5
5
|
module ActionMailer
|
6
|
-
# The <tt>ActionMailer::
|
6
|
+
# The <tt>ActionMailer::MailDeliveryJob</tt> class is used when you
|
7
7
|
# want to send emails outside of the request-response cycle. It supports
|
8
8
|
# sending either parameterized or normal mail.
|
9
9
|
#
|
@@ -59,6 +59,14 @@ module ActionMailer
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
initializer "action_mailer.set_autoload_paths" do |app|
|
63
|
+
options = app.config.action_mailer
|
64
|
+
|
65
|
+
if options.show_previews && options.preview_path
|
66
|
+
ActiveSupport::Dependencies.autoload_paths << options.preview_path
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
62
70
|
initializer "action_mailer.compile_config_methods" do
|
63
71
|
ActiveSupport.on_load(:action_mailer) do
|
64
72
|
config.compile_methods! if config.respond_to?(:compile_methods!)
|
@@ -76,12 +84,8 @@ module ActionMailer
|
|
76
84
|
|
77
85
|
if options.show_previews
|
78
86
|
app.routes.prepend do
|
79
|
-
get "/rails/mailers"
|
80
|
-
get "/rails/mailers/*path"
|
81
|
-
end
|
82
|
-
|
83
|
-
if options.preview_path
|
84
|
-
ActiveSupport::Dependencies.autoload_paths << options.preview_path
|
87
|
+
get "/rails/mailers" => "rails/mailers#index", internal: true
|
88
|
+
get "/rails/mailers/*path" => "rails/mailers#preview", internal: true
|
85
89
|
end
|
86
90
|
end
|
87
91
|
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.0.
|
4
|
+
version: 6.0.0.beta2
|
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: 2019-
|
11
|
+
date: 2019-02-25 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.0.
|
19
|
+
version: 6.0.0.beta2
|
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.0.
|
26
|
+
version: 6.0.0.beta2
|
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.0.
|
33
|
+
version: 6.0.0.beta2
|
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.0.
|
40
|
+
version: 6.0.0.beta2
|
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.0.
|
47
|
+
version: 6.0.0.beta2
|
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.0.
|
54
|
+
version: 6.0.0.beta2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mail
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,8 +122,8 @@ homepage: http://rubyonrails.org
|
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
124
|
metadata:
|
125
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.
|
126
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.
|
125
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.beta2/actionmailer
|
126
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.beta2/actionmailer/CHANGELOG.md
|
127
127
|
post_install_message:
|
128
128
|
rdoc_options: []
|
129
129
|
require_paths:
|