actionmailer 7.0.2.4 → 7.0.3.1

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: 7270fa6d176261441e62655736844ae17aa9b1b14033db057dfe8088057acef0
4
- data.tar.gz: ef60987940ab2f617daf4a275873afeaa28e898f58500f4918ddfe8548ae8e12
3
+ metadata.gz: 3426c7c4091993c8ab91ef3eb345bbb18a45d1c08ab4db5ec181c9586be91600
4
+ data.tar.gz: 4fab86514a3c6fe93034d17f0962633a3e866c991089807ab0f4adf53a839129
5
5
  SHA512:
6
- metadata.gz: badac7a1cdd023d235a9cf16a8b811e1c7d22a43b0e01669b047c882fe4e2ed55674af07dc55c51ac377b839d7a021ce87fbf0b2a81a61d36af8ef77a8ca9d25
7
- data.tar.gz: 5ec8a9711843fbb2ae2d2900aa91555db83c297ec831a9b8c0a63bab05c67b4d4b3b50cdcf0802f2d061b64793499c4448af3a02f2709ce8340ff9b6f1a9ea5d
6
+ metadata.gz: e6adbff852112662d8c4323d2a2d25eabc7145e7507284e07be889ef1a292333bb1452320a6df7ee0a70da0e774162542f629fd360c310e4a8d1fba224187348
7
+ data.tar.gz: 3fa47cad649d4b6aa6b77a24ab1f52d4018a189336d46ab5890d32656ef926db9cd6d733a493b707df3c4c1f5bffdaf194a355f2f6f5f607f7d2193c8f8591dc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## Rails 7.0.3.1 (July 12, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.3 (May 09, 2022) ##
7
+
8
+ * No changes.
9
+
10
+
1
11
  ## Rails 7.0.2.4 (April 26, 2022) ##
2
12
 
3
13
  * No changes.
@@ -106,7 +106,7 @@ module ActionMailer
106
106
  # You got a new note!
107
107
  # <%= truncate(@note.body, length: 25) %>
108
108
  #
109
- # If you need to access the subject, from or the recipients in the view, you can do that through message object:
109
+ # If you need to access the subject, from, or the recipients in the view, you can do that through message object:
110
110
  #
111
111
  # You got a new note from <%= message.from %>!
112
112
  # <%= truncate(@note.body, length: 25) %>
@@ -149,9 +149,9 @@ module ActionMailer
149
149
  # mail = NotifierMailer.welcome(User.first) # => an ActionMailer::MessageDelivery object
150
150
  # mail.deliver_now # generates and sends the email now
151
151
  #
152
- # The <tt>ActionMailer::MessageDelivery</tt> class is a wrapper around a delegate that will call
152
+ # The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call
153
153
  # your method to generate the mail. If you want direct access to the delegator, or <tt>Mail::Message</tt>,
154
- # you can call the <tt>message</tt> method on the <tt>ActionMailer::MessageDelivery</tt> object.
154
+ # you can call the <tt>message</tt> method on the ActionMailer::MessageDelivery object.
155
155
  #
156
156
  # NotifierMailer.welcome(User.first).message # => a Mail::Message object
157
157
  #
@@ -334,14 +334,37 @@ module ActionMailer
334
334
  # end
335
335
  #
336
336
  # Callbacks in Action Mailer are implemented using
337
- # <tt>AbstractController::Callbacks</tt>, so you can define and configure
337
+ # AbstractController::Callbacks, so you can define and configure
338
338
  # callbacks in the same manner that you would use callbacks in classes that
339
- # inherit from <tt>ActionController::Base</tt>.
339
+ # inherit from ActionController::Base.
340
340
  #
341
341
  # Note that unless you have a specific reason to do so, you should prefer
342
342
  # using <tt>before_action</tt> rather than <tt>after_action</tt> in your
343
343
  # Action Mailer classes so that headers are parsed properly.
344
344
  #
345
+ # = Rescuing Errors
346
+ #
347
+ # +rescue+ blocks inside of a mailer method cannot rescue errors that occur
348
+ # outside of rendering -- for example, record deserialization errors in a
349
+ # background job, or errors from a third-party mail delivery service.
350
+ #
351
+ # To rescue errors that occur during any part of the mailing process, use
352
+ # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from]:
353
+ #
354
+ # class NotifierMailer < ApplicationMailer
355
+ # rescue_from ActiveJob::DeserializationError do
356
+ # # ...
357
+ # end
358
+ #
359
+ # rescue_from "SomeThirdPartyService::ApiError" do
360
+ # # ...
361
+ # end
362
+ #
363
+ # def notify(recipient)
364
+ # mail(to: recipient, subject: "Notification")
365
+ # end
366
+ # end
367
+ #
345
368
  # = Previewing emails
346
369
  #
347
370
  # You can preview your email templates visually by adding a mailer preview file to the
@@ -493,28 +516,28 @@ module ActionMailer
493
516
  end
494
517
 
495
518
  # Register an Observer which will be notified when mail is delivered.
496
- # Either a class, string or symbol can be passed in as the Observer.
519
+ # Either a class, string, or symbol can be passed in as the Observer.
497
520
  # If a string or symbol is passed in it will be camelized and constantized.
498
521
  def register_observer(observer)
499
522
  Mail.register_observer(observer_class_for(observer))
500
523
  end
501
524
 
502
525
  # Unregister a previously registered Observer.
503
- # Either a class, string or symbol can be passed in as the Observer.
526
+ # Either a class, string, or symbol can be passed in as the Observer.
504
527
  # If a string or symbol is passed in it will be camelized and constantized.
505
528
  def unregister_observer(observer)
506
529
  Mail.unregister_observer(observer_class_for(observer))
507
530
  end
508
531
 
509
532
  # Register an Interceptor which will be called before mail is sent.
510
- # Either a class, string or symbol can be passed in as the Interceptor.
533
+ # Either a class, string, or symbol can be passed in as the Interceptor.
511
534
  # If a string or symbol is passed in it will be camelized and constantized.
512
535
  def register_interceptor(interceptor)
513
536
  Mail.register_interceptor(observer_class_for(interceptor))
514
537
  end
515
538
 
516
539
  # Unregister a previously registered Interceptor.
517
- # Either a class, string or symbol can be passed in as the Interceptor.
540
+ # Either a class, string, or symbol can be passed in as the Interceptor.
518
541
  # If a string or symbol is passed in it will be camelized and constantized.
519
542
  def unregister_interceptor(interceptor)
520
543
  Mail.unregister_interceptor(observer_class_for(interceptor))
@@ -624,6 +647,7 @@ module ActionMailer
624
647
  @_message = NullMail.new unless @_mail_was_called
625
648
  end
626
649
  end
650
+ ruby2_keywords(:process)
627
651
 
628
652
  class NullMail # :nodoc:
629
653
  def body; "" end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionMailer
4
- # Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>.
4
+ # Returns the currently loaded version of Action Mailer as a <tt>Gem::Version</tt>.
5
5
  def self.gem_version
6
6
  Gem::Version.new VERSION::STRING
7
7
  end
@@ -9,8 +9,8 @@ module ActionMailer
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 2
13
- PRE = "4"
12
+ TINY = 3
13
+ PRE = "1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -63,7 +63,7 @@ module ActionMailer
63
63
  # * <tt>:priority</tt> - Enqueues the email with the specified priority
64
64
  #
65
65
  # By default, the email will be enqueued using <tt>ActionMailer::MailDeliveryJob</tt>. Each
66
- # <tt>ActionMailer::Base</tt> class can specify the job to use by setting the class variable
66
+ # ActionMailer::Base class can specify the job to use by setting the class variable
67
67
  # +delivery_job+.
68
68
  #
69
69
  # class AccountRegistrationMailer < ApplicationMailer
@@ -89,7 +89,7 @@ module ActionMailer
89
89
  # * <tt>:priority</tt> - Enqueues the email with the specified priority
90
90
  #
91
91
  # By default, the email will be enqueued using <tt>ActionMailer::MailDeliveryJob</tt>. Each
92
- # <tt>ActionMailer::Base</tt> class can specify the job to use by setting the class variable
92
+ # ActionMailer::Base class can specify the job to use by setting the class variable
93
93
  # +delivery_job+.
94
94
  #
95
95
  # class AccountRegistrationMailer < ApplicationMailer
@@ -23,7 +23,6 @@ module ActionMailer
23
23
  options.stylesheets_dir ||= paths["public/stylesheets"].first
24
24
  options.show_previews = Rails.env.development? if options.show_previews.nil?
25
25
  options.cache_store ||= Rails.cache
26
- options.smtp_settings ||= {}
27
26
 
28
27
  if options.show_previews
29
28
  options.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/test/mailers/previews" : nil
@@ -46,9 +45,15 @@ module ActionMailer
46
45
  self.delivery_job = delivery_job.constantize
47
46
  end
48
47
 
49
- if smtp_timeout = options.delete(:smtp_timeout)
50
- options.smtp_settings[:open_timeout] ||= smtp_timeout
51
- options.smtp_settings[:read_timeout] ||= smtp_timeout
48
+ if options.smtp_settings
49
+ self.smtp_settings = options.smtp_settings
50
+ end
51
+
52
+ smtp_timeout = options.delete(:smtp_timeout)
53
+
54
+ if self.smtp_settings && smtp_timeout
55
+ self.smtp_settings[:open_timeout] ||= smtp_timeout
56
+ self.smtp_settings[:read_timeout] ||= smtp_timeout
52
57
  end
53
58
 
54
59
  options.each { |k, v| send("#{k}=", v) }
@@ -20,7 +20,7 @@ module ActionMailer # :nodoc:
20
20
  end
21
21
 
22
22
  private
23
- def process(*)
23
+ def process(...)
24
24
  handle_exceptions do
25
25
  super
26
26
  end
@@ -3,7 +3,7 @@
3
3
  require_relative "gem_version"
4
4
 
5
5
  module ActionMailer
6
- # Returns the version of the currently loaded Action Mailer as a
6
+ # Returns the currently loaded version of Action Mailer as a
7
7
  # <tt>Gem::Version</tt>.
8
8
  def self.version
9
9
  gem_version
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: 7.0.2.4
4
+ version: 7.0.3.1
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: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2022-07-12 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: 7.0.2.4
19
+ version: 7.0.3.1
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: 7.0.2.4
26
+ version: 7.0.3.1
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: 7.0.2.4
33
+ version: 7.0.3.1
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: 7.0.2.4
40
+ version: 7.0.3.1
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: 7.0.2.4
47
+ version: 7.0.3.1
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: 7.0.2.4
54
+ version: 7.0.3.1
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: 7.0.2.4
61
+ version: 7.0.3.1
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: 7.0.2.4
68
+ version: 7.0.3.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mail
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -178,10 +178,10 @@ licenses:
178
178
  - MIT
179
179
  metadata:
180
180
  bug_tracker_uri: https://github.com/rails/rails/issues
181
- changelog_uri: https://github.com/rails/rails/blob/v7.0.2.4/actionmailer/CHANGELOG.md
182
- documentation_uri: https://api.rubyonrails.org/v7.0.2.4/
181
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.3.1/actionmailer/CHANGELOG.md
182
+ documentation_uri: https://api.rubyonrails.org/v7.0.3.1/
183
183
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
184
- source_code_uri: https://github.com/rails/rails/tree/v7.0.2.4/actionmailer
184
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.3.1/actionmailer
185
185
  rubygems_mfa_required: 'true'
186
186
  post_install_message:
187
187
  rdoc_options: []
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  requirements:
201
201
  - none
202
- rubygems_version: 3.1.6
202
+ rubygems_version: 3.3.3
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Email composition and delivery framework (part of Rails).