actionmailer 7.1.0.beta1 → 7.1.0.rc2

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: 201e9f4b5b87758d889f7de794ef57e593a1c29b45dba85b637b4efa968e82d8
4
- data.tar.gz: d82bf93a9b2dc6c5f3984eee4c926a1e62944e3ae879049bfe049fa2310840af
3
+ metadata.gz: 31f39c2afe0ef3b76b678ab66d821631d9f6eaf3738ed021ac74984cae7fe695
4
+ data.tar.gz: 4657914c550fed57745ac1adbd743bb9169ca05a8b5f2abb3c7dda14d6fb2d8e
5
5
  SHA512:
6
- metadata.gz: b083225f05366cf307292e36152672635f96ec03e29f883de1761e3077b4031d0c16ca7521d4d68230e1d72871ed5a07572bf429656f640d793e8fe02d0e7f1c
7
- data.tar.gz: a18ee76751cc90e5aded8835a6abb5ff472c45f8afd4ae7acdccac5f07611dbd896962fd473517891abfa3ecbc6f48e6ba3318fca70d534e20cbc590aec814bf
6
+ metadata.gz: 65099ea0f380263fc23eb532ea3b5aa7f1959d83ec5d5360be6134b24f19b06cdcbe5f22a6798fe53a75aa0ac3be9e6e80aa12154ffea2b42888b525ba274b60
7
+ data.tar.gz: 50d89242944cc4e2ace92fd2a38f2770a9ffa5a512e2e271076a56950d91f80e00a84a715cab38b7ec5c4c9e3d16d8fd70617d1444ffe4fb7ef05560749c1b86
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## Rails 7.1.0.rc2 (October 01, 2023) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.1.0.rc1 (September 27, 2023) ##
7
+
8
+ * Introduce `ActionMailer::FormBuilder`
9
+
10
+ Use the `default_form_builder` method in mailers to set the default form builder
11
+ for templates rendered by that mailer. Matches the behaviour in Action Controller.
12
+
13
+ *Alex Ghiculescu*
14
+
15
+
1
16
  ## Rails 7.1.0.beta1 (September 13, 2023) ##
2
17
 
3
18
  * Mailers are listed in alphabetical order on the mailer preview page now.
@@ -480,6 +480,7 @@ module ActionMailer
480
480
  include Rescuable
481
481
  include Parameterized
482
482
  include Previews
483
+ include FormBuilder
483
484
 
484
485
  abstract!
485
486
 
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActionMailer
4
+ # = Action Mailer Form Builder
5
+ #
6
+ # Override the default form builder for all views rendered by this
7
+ # mailer and any of its descendants. Accepts a subclass of
8
+ # ActionView::Helpers::FormBuilder.
9
+ #
10
+ # While emails typically will not include forms, this can be used
11
+ # by views that are shared between controllers and mailers.
12
+ #
13
+ # For more information, see +ActionController::FormBuilder+.
14
+ module FormBuilder
15
+ extend ActiveSupport::Concern
16
+
17
+ included do
18
+ class_attribute :_default_form_builder, instance_accessor: false
19
+ end
20
+
21
+ module ClassMethods
22
+ # Set the form builder to be used as the default for all forms
23
+ # in the views rendered by this mailer and its subclasses.
24
+ #
25
+ # ==== Parameters
26
+ # * <tt>builder</tt> - Default form builder, an instance of ActionView::Helpers::FormBuilder
27
+ def default_form_builder(builder)
28
+ self._default_form_builder = builder
29
+ end
30
+ end
31
+
32
+ # Default form builder for the mailer
33
+ def default_form_builder
34
+ self.class._default_form_builder
35
+ end
36
+ end
37
+ end
@@ -10,7 +10,7 @@ module ActionMailer
10
10
  MAJOR = 7
11
11
  MINOR = 1
12
12
  TINY = 0
13
- PRE = "beta1"
13
+ PRE = "rc2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -11,8 +11,9 @@ module ActionMailer
11
11
  # An email was delivered.
12
12
  def deliver(event)
13
13
  info do
14
- perform_deliveries = event.payload[:perform_deliveries]
15
- if perform_deliveries
14
+ if exception = event.payload[:exception_object]
15
+ "Failed delivery of mail #{event.payload[:message_id]} error_class=#{exception.class} error_message=#{exception.message.inspect}"
16
+ elsif event.payload[:perform_deliveries]
16
17
  "Delivered mail #{event.payload[:message_id]} (#{event.duration.round(1)}ms)"
17
18
  else
18
19
  "Skipped delivery of mail #{event.payload[:message_id]} as `perform_deliveries` is false"
data/lib/action_mailer.rb CHANGED
@@ -56,6 +56,7 @@ module ActionMailer
56
56
  autoload :MessageDelivery
57
57
  autoload :MailDeliveryJob
58
58
  autoload :QueuedDelivery
59
+ autoload :FormBuilder
59
60
 
60
61
  def self.eager_load!
61
62
  super
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.1.0.beta1
4
+ version: 7.1.0.rc2
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: 2023-09-13 00:00:00.000000000 Z
11
+ date: 2023-10-01 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.1.0.beta1
19
+ version: 7.1.0.rc2
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.1.0.beta1
26
+ version: 7.1.0.rc2
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.1.0.beta1
33
+ version: 7.1.0.rc2
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.1.0.beta1
40
+ version: 7.1.0.rc2
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.1.0.beta1
47
+ version: 7.1.0.rc2
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.1.0.beta1
54
+ version: 7.1.0.rc2
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.1.0.beta1
61
+ version: 7.1.0.rc2
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.1.0.beta1
68
+ version: 7.1.0.rc2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mail
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -158,6 +158,7 @@ files:
158
158
  - lib/action_mailer/collector.rb
159
159
  - lib/action_mailer/delivery_methods.rb
160
160
  - lib/action_mailer/deprecator.rb
161
+ - lib/action_mailer/form_builder.rb
161
162
  - lib/action_mailer/gem_version.rb
162
163
  - lib/action_mailer/inline_preview_interceptor.rb
163
164
  - lib/action_mailer/log_subscriber.rb
@@ -181,10 +182,10 @@ licenses:
181
182
  - MIT
182
183
  metadata:
183
184
  bug_tracker_uri: https://github.com/rails/rails/issues
184
- changelog_uri: https://github.com/rails/rails/blob/v7.1.0.beta1/actionmailer/CHANGELOG.md
185
- documentation_uri: https://api.rubyonrails.org/v7.1.0.beta1/
185
+ changelog_uri: https://github.com/rails/rails/blob/v7.1.0.rc2/actionmailer/CHANGELOG.md
186
+ documentation_uri: https://api.rubyonrails.org/v7.1.0.rc2/
186
187
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
187
- source_code_uri: https://github.com/rails/rails/tree/v7.1.0.beta1/actionmailer
188
+ source_code_uri: https://github.com/rails/rails/tree/v7.1.0.rc2/actionmailer
188
189
  rubygems_mfa_required: 'true'
189
190
  post_install_message:
190
191
  rdoc_options: []