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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af732a129a02cc2ac2022d963b5055006049a660083fb9eb28de69d31fc01fad
4
- data.tar.gz: 994f198cf6a06cbac0a0f920753a30160965bc762470153a928671ef1262a2fa
3
+ metadata.gz: 902df32e11a517e44360244670752debaaf72264c39caefaf2441426c569f1c5
4
+ data.tar.gz: a59cd5d8d3e259409ccfd649bde90b0b5417dc6c47234d55675964efe79e916a
5
5
  SHA512:
6
- metadata.gz: 0ba45855596c9f3d4b88203a88788036f2b24129e9fd71ab22b323e461d6542f8d262dcf4b036c063c1dd781d3dcbc7355b9d71801cc31dd07a41839f17de2df
7
- data.tar.gz: 3eb85af6dd23fb37d69cb3771ed118573a78fab9941bd94012bd2058a29eef507592ac29460f971dfc75b5e3b29117ce1f2179c5f4d54c1ff65ec2fe6768672e
6
+ metadata.gz: 2a44ffac4181d8872b4b30fd0884f282a115740969fc3323f90126799ec1bc01d44e84f4894f8f304325939005bedd097b5ac0eb88270d81d4eb44a2cbac10fa
7
+ data.tar.gz: f74fdfb248c675ef09dccf2186b0844a1a1adc0688e435c013b2d4aed103af3192666943089a1e5b3d2912169659ff3ee03afd71bceb8f2e85e0852dc6e6afc1
@@ -1,3 +1,8 @@
1
+ ## Rails 6.0.0.beta2 (February 25, 2019) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 6.0.0.beta1 (January 18, 2019) ##
2
7
 
3
8
  * Deprecate `ActionMailer::Base.receive` in favor of [Action Mailbox](https://github.com/rails/rails/tree/master/actionmailbox).
@@ -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.formats
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(&:formats).each(&block)
989
+ templates.uniq(&:format).each(&block)
990
990
  end
991
991
  end
992
992
 
@@ -10,7 +10,7 @@ module ActionMailer
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
12
  TINY = 0
13
- PRE = "beta1"
13
+ PRE = "beta2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -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
- "Sent mail to #{recipients} (#{event.duration.round(1)}ms)"
14
+ "Delivered mail #{event.payload[:message_id]} (#{event.duration.round(1)}ms)"
16
15
  else
17
- "Skipped sending mail to #{recipients} as `perform_deliveries` is false"
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::NewDeliveryJob</tt> class is used when you
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" => "rails/mailers#index", internal: true
80
- get "/rails/mailers/*path" => "rails/mailers#preview", internal: true
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.beta1
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-01-18 00:00:00.000000000 Z
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.beta1
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.beta1
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.beta1
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.beta1
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.beta1
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.beta1
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.beta1/actionmailer
126
- changelog_uri: https://github.com/rails/rails/blob/v6.0.0.beta1/actionmailer/CHANGELOG.md
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: