actionmailer 6.1.5.1 → 7.0.0.alpha1

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: 380eb57dd0f5e53b190b55164afe8a476573018d662ec3e5dd89949eb4b85a9d
4
- data.tar.gz: 4c5354a1d01a81d791bec0f29b3cb48ac10e0875418354eb195a89b76ddd1d0b
3
+ metadata.gz: 6159118c4a22077610712d15bf29827879bafebb249106a91745882e38a45554
4
+ data.tar.gz: ef51dca707ab5c296f62d4672672d39d439edcd6dd5e9ab4e7308eeb8b969e7d
5
5
  SHA512:
6
- metadata.gz: 49df5ff03cc0ee1183cc68658c0f20671656930380284c9f2f2658a7501d505c4c82b1b578f76b88f37e076cf5f43451b18566aac1ba43722c2b25c50a23f6cb
7
- data.tar.gz: 8c8ac453f7b41e259ad2869b5171b40da6d0c47fdfae4c541fdc98b323e4e7dafdc071094b255b71d908800075a340fad47c246aa5fbb8cd669ba5dd73b05b9a
6
+ metadata.gz: 429027df6573b75fba33755ef047db4300dc218b316b12007f525a4448c9f10434c7dbfa42e43f25eb277e1e98ee5fc9cadff7d51730bd821f21a29e4d6777c0
7
+ data.tar.gz: f4b23b271e150623678ebd7a5208d853d8f2e7ecb5ed9856ed517f9249b5c12820524317f9bb0a4efbe50842c44b6a20a5386d47c25330ed112683cca6fc970c
data/CHANGELOG.md CHANGED
@@ -1,103 +1,8 @@
1
- ## Rails 6.1.5.1 (April 26, 2022) ##
1
+ ## Rails 7.0.0.alpha1 (September 15, 2021) ##
2
2
 
3
- * No changes.
3
+ * Configures a default of 5 for both `open_timeout` and `read_timeout` for SMTP Settings.
4
4
 
5
+ *André Luis Leal Cardoso Junior*
5
6
 
6
- ## Rails 6.1.5 (March 09, 2022) ##
7
7
 
8
- * No changes.
9
-
10
-
11
- ## Rails 6.1.4.7 (March 08, 2022) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 6.1.4.6 (February 11, 2022) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 6.1.4.5 (February 11, 2022) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 6.1.4.4 (December 15, 2021) ##
27
-
28
- * No changes.
29
-
30
-
31
- ## Rails 6.1.4.3 (December 14, 2021) ##
32
-
33
- * No changes.
34
-
35
-
36
- ## Rails 6.1.4.2 (December 14, 2021) ##
37
-
38
- * No changes.
39
-
40
-
41
- ## Rails 6.1.4.1 (August 19, 2021) ##
42
-
43
- * No changes.
44
-
45
-
46
- ## Rails 6.1.4 (June 24, 2021) ##
47
-
48
- * No changes.
49
-
50
-
51
- ## Rails 6.1.3.2 (May 05, 2021) ##
52
-
53
- * No changes.
54
-
55
-
56
- ## Rails 6.1.3.1 (March 26, 2021) ##
57
-
58
- * No changes.
59
-
60
-
61
- ## Rails 6.1.3 (February 17, 2021) ##
62
-
63
- * No changes.
64
-
65
-
66
- ## Rails 6.1.2.1 (February 10, 2021) ##
67
-
68
- * No changes.
69
-
70
-
71
- ## Rails 6.1.2 (February 09, 2021) ##
72
-
73
- * No changes.
74
-
75
-
76
- ## Rails 6.1.1 (January 07, 2021) ##
77
-
78
- * Sets default mailer queue to `"default"` in the mail assertions.
79
-
80
- *Paul Keen*
81
-
82
-
83
- ## Rails 6.1.0 (December 09, 2020) ##
84
-
85
- * Change default queue name of the deliver (`:mailers`) job to be the job adapter's
86
- default (`:default`).
87
-
88
- *Rafael Mendonça França*
89
-
90
- * Remove deprecated `ActionMailer::Base.receive` in favor of [Action Mailbox](https://github.com/rails/rails/tree/master/actionmailbox).
91
-
92
- *Rafael Mendonça França*
93
-
94
- * Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job.
95
-
96
- *bogdanvlviv*
97
-
98
- * Added `email_address_with_name` to properly escape addresses with names.
99
-
100
- *Sunny Ripert*
101
-
102
-
103
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionmailer/CHANGELOG.md) for previous changes.
8
+ 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-2022 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
@@ -18,3 +18,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "action_mailer/mail_with_error_handling"
3
+ require "mail"
4
4
  require "action_mailer/collector"
5
5
  require "active_support/core_ext/string/inflections"
6
6
  require "active_support/core_ext/hash/except"
@@ -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
 
@@ -20,10 +20,10 @@ module ActionMailer
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 = 5
13
- PRE = "1"
10
+ MAJOR = 7
11
+ MINOR = 0
12
+ TINY = 0
13
+ PRE = "alpha1"
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
 
@@ -171,7 +171,7 @@ module ActionMailer
171
171
  parameters.find do |key, name|
172
172
  return true if key == :keyreq && name == :args
173
173
 
174
- key == :keyrest and name != :**
174
+ key == :keyrest
175
175
  end
176
176
  end
177
177
  end
@@ -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-2022 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
@@ -57,7 +57,7 @@ module ActionMailer
57
57
  def self.eager_load!
58
58
  super
59
59
 
60
- require "action_mailer/mail_with_error_handling"
60
+ require "mail"
61
61
  Mail.eager_autoload!
62
62
  end
63
63
  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.1.5.1
4
+ version: 7.0.0.alpha1
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: 2022-04-26 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.5.1
19
+ version: 7.0.0.alpha1
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.5.1
26
+ version: 7.0.0.alpha1
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.5.1
33
+ version: 7.0.0.alpha1
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.5.1
40
+ version: 7.0.0.alpha1
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.5.1
47
+ version: 7.0.0.alpha1
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.5.1
54
+ version: 7.0.0.alpha1
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.5.1
61
+ version: 7.0.0.alpha1
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.5.1
68
+ version: 7.0.0.alpha1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mail
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -120,7 +120,6 @@ files:
120
120
  - lib/action_mailer/log_subscriber.rb
121
121
  - lib/action_mailer/mail_delivery_job.rb
122
122
  - lib/action_mailer/mail_helper.rb
123
- - lib/action_mailer/mail_with_error_handling.rb
124
123
  - lib/action_mailer/message_delivery.rb
125
124
  - lib/action_mailer/parameterized.rb
126
125
  - lib/action_mailer/preview.rb
@@ -138,12 +137,11 @@ licenses:
138
137
  - MIT
139
138
  metadata:
140
139
  bug_tracker_uri: https://github.com/rails/rails/issues
141
- changelog_uri: https://github.com/rails/rails/blob/v6.1.5.1/actionmailer/CHANGELOG.md
142
- documentation_uri: https://api.rubyonrails.org/v6.1.5.1/
140
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.0.alpha1/actionmailer/CHANGELOG.md
141
+ documentation_uri: https://api.rubyonrails.org/v7.0.0.alpha1/
143
142
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
144
- source_code_uri: https://github.com/rails/rails/tree/v6.1.5.1/actionmailer
145
- rubygems_mfa_required: 'true'
146
- post_install_message:
143
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.0.alpha1/actionmailer
144
+ post_install_message:
147
145
  rdoc_options: []
148
146
  require_paths:
149
147
  - lib
@@ -151,16 +149,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
149
  requirements:
152
150
  - - ">="
153
151
  - !ruby/object:Gem::Version
154
- version: 2.5.0
152
+ version: 2.7.0
155
153
  required_rubygems_version: !ruby/object:Gem::Requirement
156
154
  requirements:
157
- - - ">="
155
+ - - ">"
158
156
  - !ruby/object:Gem::Version
159
- version: '0'
157
+ version: 1.3.1
160
158
  requirements:
161
159
  - none
162
160
  rubygems_version: 3.1.6
163
- signing_key:
161
+ signing_key:
164
162
  specification_version: 4
165
163
  summary: Email composition and delivery framework (part of Rails).
166
164
  test_files: []
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require "mail"
5
- rescue LoadError => error
6
- if error.message.match?(/net-smtp/)
7
- $stderr.puts "You don't have net-smtp installed in your application. Please add it to your Gemfile and run bundle install"
8
- raise
9
- end
10
- end