actionmailer 6.1.3.2 → 7.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9976acd44a698073f4cfc650b53f3886dd4b2610d6d94ba69abd845787985ba
4
- data.tar.gz: 619e75ed1de8e2025bfe4f4e5c7d6aa24a709f1799adecd5188aa3a3eb9a04fc
3
+ metadata.gz: 63ba2823b2efea70f03f1920e9ad798e69729db4a5430330a3caa79664dc037c
4
+ data.tar.gz: 830f868ad57326cece793dcd0507ff50da94e87fd93c179ee70c74bd57a5e649
5
5
  SHA512:
6
- metadata.gz: 03f3b5f00630bdfbf26586e374d973ed2ddc09e44c19280d0beadc6ac7b8c006b619b14ee61a5ec31a088dba6ca08894bc813566461e3c15e673fb760b57642d
7
- data.tar.gz: fe74e73430146980bf73b36d862860e5b1ba6c97764d7b92c03112253b01c50f2ee1ab92631bbfeaa22307d08c46ade6211d8c82dde68a1dd2cff5130d768e78
6
+ metadata.gz: 260ce90dfc30dc03c68534ae1fd360abb61f66a8bfceb0c04d4546ec49a06af0f5fc70d4632007475a7f97fde2563f3a0f6ea6a78b33f6df5236bf74c31ac619
7
+ data.tar.gz: 3737e7223af639c4517c0bc1efb0d7a7fe6218efbd5773285e774e030602c0ce1154c5501772edb5913ff85d5e90bf83a65bb5cc1754e36370860a76f3d0bfe2
data/CHANGELOG.md CHANGED
@@ -1,53 +1,13 @@
1
- ## Rails 6.1.3.2 (May 05, 2021) ##
1
+ ## Rails 7.0.0.alpha2 (September 15, 2021) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 6.1.3.1 (March 26, 2021) ##
6
+ ## Rails 7.0.0.alpha1 (September 15, 2021) ##
7
7
 
8
- * No changes.
9
-
10
-
11
- ## Rails 6.1.3 (February 17, 2021) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 6.1.2.1 (February 10, 2021) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 6.1.2 (February 09, 2021) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 6.1.1 (January 07, 2021) ##
27
-
28
- * Sets default mailer queue to `"default"` in the mail assertions.
29
-
30
- *Paul Keen*
31
-
32
-
33
- ## Rails 6.1.0 (December 09, 2020) ##
34
-
35
- * Change default queue name of the deliver (`:mailers`) job to be the job adapter's
36
- default (`:default`).
37
-
38
- *Rafael Mendonça França*
39
-
40
- * Remove deprecated `ActionMailer::Base.receive` in favor of [Action Mailbox](https://github.com/rails/rails/tree/master/actionmailbox).
41
-
42
- *Rafael Mendonça França*
43
-
44
- * Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job.
45
-
46
- *bogdanvlviv*
47
-
48
- * Added `email_address_with_name` to properly escape addresses with names.
8
+ * Configures a default of 5 for both `open_timeout` and `read_timeout` for SMTP Settings.
49
9
 
50
- *Sunny Ripert*
10
+ *André Luis Leal Cardoso Junior*
51
11
 
52
12
 
53
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionmailer/CHANGELOG.md) for previous changes.
13
+ Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/actionmailer/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2004-2020 David Heinemeier Hansson
1
+ Copyright (c) 2004-2021 David Heinemeier Hansson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -409,6 +409,8 @@ module ActionMailer
409
409
  # of an OpenSSL verify constant (<tt>'none'</tt> or <tt>'peer'</tt>) or directly the constant
410
410
  # (<tt>OpenSSL::SSL::VERIFY_NONE</tt> or <tt>OpenSSL::SSL::VERIFY_PEER</tt>).
411
411
  # * <tt>:ssl/:tls</tt> Enables the SMTP connection to use SMTP/TLS (SMTPS: SMTP over direct TLS connection)
412
+ # * <tt>:open_timeout</tt> Number of seconds to wait while attempting to open a connection.
413
+ # * <tt>:read_timeout</tt> Number of seconds to wait until timing-out a read(2) call.
412
414
  #
413
415
  # * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
414
416
  # * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
@@ -433,7 +435,7 @@ module ActionMailer
433
435
  # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with
434
436
  # <tt>delivery_method :test</tt>. Most useful for unit and functional testing.
435
437
  #
436
- # * <tt>deliver_later_queue_name</tt> - The name of the queue used with <tt>deliver_later</tt>. Defaults to +mailers+.
438
+ # * <tt>deliver_later_queue_name</tt> - The name of the queue used with <tt>deliver_later</tt>.
437
439
  class Base < AbstractController::Base
438
440
  include DeliveryMethods
439
441
  include Rescuable
@@ -553,7 +555,7 @@ module ActionMailer
553
555
  # through a callback when you call <tt>:deliver</tt> on the <tt>Mail::Message</tt>,
554
556
  # calling +deliver_mail+ directly and passing a <tt>Mail::Message</tt> will do
555
557
  # nothing except tell the logger you sent the email.
556
- def deliver_mail(mail) #:nodoc:
558
+ def deliver_mail(mail) # :nodoc:
557
559
  ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload|
558
560
  set_payload_for_mail(payload, mail)
559
561
  yield # Let Mail do the delivery actions
@@ -589,7 +591,7 @@ module ActionMailer
589
591
  super
590
592
  end
591
593
  end
592
- ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
594
+ ruby2_keywords(:method_missing)
593
595
 
594
596
  def respond_to_missing?(method, include_all = false)
595
597
  action_methods.include?(method.to_s) || super
@@ -604,7 +606,7 @@ module ActionMailer
604
606
  @_message = Mail.new
605
607
  end
606
608
 
607
- def process(method_name, *args) #:nodoc:
609
+ def process(method_name, *args) # :nodoc:
608
610
  payload = {
609
611
  mailer: self.class.name,
610
612
  action: method_name,
@@ -617,7 +619,7 @@ module ActionMailer
617
619
  end
618
620
  end
619
621
 
620
- class NullMail #:nodoc:
622
+ class NullMail # :nodoc:
621
623
  def body; "" end
622
624
  def header; {} end
623
625
 
@@ -899,7 +901,7 @@ module ActionMailer
899
901
  end
900
902
 
901
903
  def apply_defaults(headers)
902
- default_values = self.class.default.transform_values do |value|
904
+ default_values = self.class.default.except(*headers.keys).transform_values do |value|
903
905
  compute_default(value)
904
906
  end
905
907
 
@@ -15,15 +15,15 @@ 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.2.
18
+ is deprecated and will be removed in Rails 7.0.
19
19
  Please use MailDeliveryJob instead.
20
20
  MSG
21
21
  end
22
22
 
23
- def perform(mailer, mail_method, delivery_method, *args) #:nodoc:
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
+ ruby2_keywords(:perform)
27
27
 
28
28
  private
29
29
  # "Deserialize" the mailer class name by hand in case another argument
@@ -7,10 +7,10 @@ module ActionMailer
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 6
11
- MINOR = 1
12
- TINY = 3
13
- PRE = "2"
10
+ MAJOR = 7
11
+ MINOR = 0
12
+ TINY = 0
13
+ PRE = "alpha2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -17,15 +17,15 @@ module ActionMailer
17
17
 
18
18
  include Base64
19
19
 
20
- def self.previewing_email(message) #:nodoc:
20
+ def self.previewing_email(message) # :nodoc:
21
21
  new(message).transform!
22
22
  end
23
23
 
24
- def initialize(message) #:nodoc:
24
+ def initialize(message) # :nodoc:
25
25
  @message = message
26
26
  end
27
27
 
28
- def transform! #:nodoc:
28
+ def transform! # :nodoc:
29
29
  return message if html_part.blank?
30
30
 
31
31
  html_part.body = html_part.decoded.gsub(PATTERN) do |match|
@@ -15,7 +15,7 @@ module ActionMailer
15
15
  # Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job
16
16
  # Notifier.welcome(User.first).message # a Mail::Message object
17
17
  class MessageDelivery < Delegator
18
- def initialize(mailer_class, action, *args) #:nodoc:
18
+ def initialize(mailer_class, action, *args) # :nodoc:
19
19
  @mailer_class, @action, @args = mailer_class, action, args
20
20
 
21
21
  # The mail is only processed if we try to call any methods on it.
@@ -23,15 +23,15 @@ 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
+ ruby2_keywords(:initialize)
27
27
 
28
28
  # Method calls are delegated to the Mail::Message that's ready to deliver.
29
- def __getobj__ #:nodoc:
29
+ def __getobj__ # :nodoc:
30
30
  @mail_message ||= processed_mailer.message
31
31
  end
32
32
 
33
33
  # Unused except for delegator internals (dup, marshalling).
34
- def __setobj__(mail_message) #:nodoc:
34
+ def __setobj__(mail_message) # :nodoc:
35
35
  @mail_message = mail_message
36
36
  end
37
37
 
@@ -150,7 +150,7 @@ module ActionMailer
150
150
  @mailer_class.name, @action.to_s, delivery_method.to_s, *@args)
151
151
  else
152
152
  ActiveSupport::Deprecation.warn(<<~EOM)
153
- In Rails 6.2, Action Mailer will pass the mail arguments inside the `:args` keyword argument.
153
+ In Rails 7.0, Action Mailer will pass the mail arguments inside the `:args` keyword argument.
154
154
  The `perform` method of the #{job} needs to change and forward the mail arguments
155
155
  from the `args` keyword argument.
156
156
 
@@ -115,7 +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
+ ruby2_keywords(:method_missing)
119
119
 
120
120
  def respond_to_missing?(method, include_all = false)
121
121
  @mailer.respond_to?(method, include_all)
@@ -126,7 +126,7 @@ module ActionMailer
126
126
  def perform(mailer, mail_method, delivery_method, params, *args)
127
127
  mailer.constantize.with(params).public_send(mail_method, *args).send(delivery_method)
128
128
  end
129
- ruby2_keywords(:perform) if respond_to?(:ruby2_keywords, true)
129
+ ruby2_keywords(:perform)
130
130
  end
131
131
 
132
132
  class MessageDelivery < ActionMailer::MessageDelivery # :nodoc:
@@ -134,7 +134,7 @@ module ActionMailer
134
134
  super(mailer_class, action, *args)
135
135
  @params = params
136
136
  end
137
- ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true)
137
+ ruby2_keywords(:initialize)
138
138
 
139
139
  private
140
140
  def processed_mailer
@@ -3,7 +3,7 @@
3
3
  require "active_support/descendants_tracker"
4
4
 
5
5
  module ActionMailer
6
- module Previews #:nodoc:
6
+ module Previews # :nodoc:
7
7
  extend ActiveSupport::Concern
8
8
 
9
9
  included do
@@ -45,6 +45,15 @@ module ActionMailer
45
45
  self.delivery_job = delivery_job.constantize
46
46
  end
47
47
 
48
+ if smtp_settings = options.delete(:smtp_settings)
49
+ self.smtp_settings = smtp_settings
50
+ end
51
+
52
+ if smtp_timeout = options.delete(:smtp_timeout)
53
+ self.smtp_settings[:open_timeout] ||= smtp_timeout
54
+ self.smtp_settings[:read_timeout] ||= smtp_timeout
55
+ end
56
+
48
57
  options.each { |k, v| send("#{k}=", v) }
49
58
  end
50
59
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module ActionMailer #:nodoc:
3
+ module ActionMailer # :nodoc:
4
4
  # Provides +rescue_from+ for mailers. Wraps mailer action processing,
5
5
  # mail job processing, and mail delivery.
6
6
  module Rescuable
@@ -8,12 +8,12 @@ module ActionMailer #:nodoc:
8
8
  include ActiveSupport::Rescuable
9
9
 
10
10
  class_methods do
11
- def handle_exception(exception) #:nodoc:
11
+ def handle_exception(exception) # :nodoc:
12
12
  rescue_with_handler(exception) || raise(exception)
13
13
  end
14
14
  end
15
15
 
16
- def handle_exceptions #:nodoc:
16
+ def handle_exceptions # :nodoc:
17
17
  yield
18
18
  rescue => exception
19
19
  rescue_with_handler(exception) || raise
data/lib/action_mailer.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  #--
4
- # Copyright (c) 2004-2020 David Heinemeier Hansson
4
+ # Copyright (c) 2004-2021 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
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.1.3.2
4
+ version: 7.0.0.alpha2
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: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.1.3.2
19
+ version: 7.0.0.alpha2
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.1.3.2
26
+ version: 7.0.0.alpha2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 6.1.3.2
33
+ version: 7.0.0.alpha2
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.1.3.2
40
+ version: 7.0.0.alpha2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: actionview
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 6.1.3.2
47
+ version: 7.0.0.alpha2
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.1.3.2
54
+ version: 7.0.0.alpha2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activejob
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 6.1.3.2
61
+ version: 7.0.0.alpha2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 6.1.3.2
68
+ version: 7.0.0.alpha2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mail
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -137,11 +137,11 @@ licenses:
137
137
  - MIT
138
138
  metadata:
139
139
  bug_tracker_uri: https://github.com/rails/rails/issues
140
- changelog_uri: https://github.com/rails/rails/blob/v6.1.3.2/actionmailer/CHANGELOG.md
141
- documentation_uri: https://api.rubyonrails.org/v6.1.3.2/
140
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.0.alpha2/actionmailer/CHANGELOG.md
141
+ documentation_uri: https://api.rubyonrails.org/v7.0.0.alpha2/
142
142
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
143
- source_code_uri: https://github.com/rails/rails/tree/v6.1.3.2/actionmailer
144
- post_install_message:
143
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.0.alpha2/actionmailer
144
+ post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths:
147
147
  - lib
@@ -149,16 +149,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 2.5.0
152
+ version: 2.7.0
153
153
  required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - ">="
155
+ - - ">"
156
156
  - !ruby/object:Gem::Version
157
- version: '0'
157
+ version: 1.3.1
158
158
  requirements:
159
159
  - none
160
- rubygems_version: 3.1.2
161
- signing_key:
160
+ rubygems_version: 3.1.6
161
+ signing_key:
162
162
  specification_version: 4
163
163
  summary: Email composition and delivery framework (part of Rails).
164
164
  test_files: []