actionmailer 7.1.6 → 7.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e78a52de8bad55a81cd6f6f15707bed0b76fc47cabc0df12f2c8a4580ff9a174
4
- data.tar.gz: d4369407e030f290b5e851408de29433bd4a04dba387eeeb06a2b85c859c74e8
3
+ metadata.gz: ea95f7b9ad1d651201aa13e40109d61ab1403758f1765d567d8e76451b4d3b6a
4
+ data.tar.gz: b4818f516ae894b13d0987b8e6fd0f0230372520cd41c1f5a7018cf2ee4a2e22
5
5
  SHA512:
6
- metadata.gz: 4c0ff468dfba324450a002cc2bdc63cad4f5cfba0915e9700e63df7f4d288e02e75533b0bf78a5324f8119fec74568b5a51b485f0ae54c7522562f7fd8a7f377
7
- data.tar.gz: cb0097798a1922759be6f46ffb887e5442a042f666a043c398b75ee4d30c5c55c520f48473f4de2186a302d90fbd5ddde5bc22c43c938422bc8fc9a42f87e227
6
+ metadata.gz: 8f62423584f6958284713572300ef0fbd90ab2a9ff80778fe4063c283d348ce38e481bb3a2817e02ed508050dd792ea438f00f9b8ea1830fe0a85997d9fe7fbc
7
+ data.tar.gz: ec7a1e310e44cf49424ec0dd3adb81486f0811ec8d5078d44352fbecde3c1417342681bbba91a1d4ce232ec18661c5feaa02eb412c508a5f6c786161b5968350
data/CHANGELOG.md CHANGED
@@ -1,31 +1,31 @@
1
- ## Rails 7.1.6 (October 28, 2025) ##
1
+ ## Rails 7.2.3 (October 28, 2025) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 7.1.5.2 (August 13, 2025) ##
6
+ ## Rails 7.2.2.2 (August 13, 2025) ##
7
7
 
8
8
  * No changes.
9
9
 
10
10
 
11
- ## Rails 7.1.5.1 (December 10, 2024) ##
11
+ ## Rails 7.2.2.1 (December 10, 2024) ##
12
12
 
13
13
  * No changes.
14
14
 
15
15
 
16
- ## Rails 7.1.5 (October 30, 2024) ##
16
+ ## Rails 7.2.2 (October 30, 2024) ##
17
17
 
18
18
  * No changes.
19
19
 
20
20
 
21
- ## Rails 7.1.4.2 (October 23, 2024) ##
21
+ ## Rails 7.2.1.2 (October 23, 2024) ##
22
22
 
23
23
  * Fix NoMethodError in `block_format` helper
24
24
 
25
25
  *Michael Leimstaedtner*
26
26
 
27
27
 
28
- ## Rails 7.1.4.1 (October 15, 2024) ##
28
+ ## Rails 7.2.1.1 (October 15, 2024) ##
29
29
 
30
30
  * Avoid regex backtracking in `block_format` helper
31
31
 
@@ -34,186 +34,19 @@
34
34
  *John Hawthorn*
35
35
 
36
36
 
37
- ## Rails 7.1.4 (August 22, 2024) ##
37
+ ## Rails 7.2.1 (August 22, 2024) ##
38
38
 
39
39
  * No changes.
40
40
 
41
41
 
42
- ## Rails 7.1.3.4 (June 04, 2024) ##
42
+ ## Rails 7.2.0 (August 09, 2024) ##
43
43
 
44
- * No changes.
45
-
46
-
47
- ## Rails 7.1.3.3 (May 16, 2024) ##
48
-
49
- * No changes.
50
-
51
-
52
- ## Rails 7.1.3.2 (February 21, 2024) ##
53
-
54
- * No changes.
55
-
56
-
57
- ## Rails 7.1.3.1 (February 21, 2024) ##
58
-
59
- * No changes.
60
-
61
-
62
- ## Rails 7.1.3 (January 16, 2024) ##
63
-
64
- * No changes.
65
-
66
-
67
- ## Rails 7.1.2 (November 10, 2023) ##
68
-
69
- * No changes.
70
-
71
-
72
- ## Rails 7.1.1 (October 11, 2023) ##
73
-
74
- * No changes.
75
-
76
-
77
- ## Rails 7.1.0 (October 05, 2023) ##
78
-
79
- * No changes.
80
-
81
-
82
- ## Rails 7.1.0.rc2 (October 01, 2023) ##
83
-
84
- * No changes.
85
-
86
-
87
- ## Rails 7.1.0.rc1 (September 27, 2023) ##
88
-
89
- * Introduce `ActionMailer::FormBuilder`
90
-
91
- Use the `default_form_builder` method in mailers to set the default form builder
92
- for templates rendered by that mailer. Matches the behaviour in Action Controller.
93
-
94
- *Alex Ghiculescu*
95
-
96
-
97
- ## Rails 7.1.0.beta1 (September 13, 2023) ##
98
-
99
- * Mailers are listed in alphabetical order on the mailer preview page now.
100
-
101
- *Martin Spickermann*
102
-
103
- * Deprecate passing params to `assert_enqueued_email_with` via the `:args`
104
- kwarg. `assert_enqueued_email_with` now supports a `:params` kwarg, so use
105
- that to pass params:
106
-
107
- ```ruby
108
- # BEFORE
109
- assert_enqueued_email_with MyMailer, :my_method, args: { my_param: "value" }
110
-
111
- # AFTER
112
- assert_enqueued_email_with MyMailer, :my_method, params: { my_param: "value" }
113
- ```
114
-
115
- To specify named mailer args as a Hash, wrap the Hash in an array:
116
-
117
- ```ruby
118
- assert_enqueued_email_with MyMailer, :my_method, args: [{ my_arg: "value" }]
119
- # OR
120
- assert_enqueued_email_with MyMailer, :my_method, args: [my_arg: "value"]
121
- ```
122
-
123
- *Jonathan Hefner*
124
-
125
- * Accept procs for args and params in `assert_enqueued_email_with`
126
-
127
- ```ruby
128
- assert_enqueued_email_with DeliveryJob, params: -> p { p[:token] =~ /\w+/ } do
129
- UserMailer.with(token: user.generate_token).email_verification.deliver_later
130
- end
131
- ```
132
-
133
- *Max Chernyak*
134
-
135
- * Added `*_deliver` callbacks to `ActionMailer::Base` that wrap mail message delivery.
136
-
137
- Example:
138
-
139
- ```ruby
140
- class EventsMailer < ApplicationMailer
141
- after_deliver do
142
- User.find_by(email: message.to.first).update(email_provider_id: message.message_id, emailed_at: Time.current)
143
- end
144
- end
145
- ```
146
-
147
- *Ben Sheldon*
148
-
149
- * Added `deliver_enqueued_emails` to `ActionMailer::TestHelper`. This method
150
- delivers all enqueued email jobs.
151
-
152
- Example:
153
-
154
- ```ruby
155
- def test_deliver_enqueued_emails
156
- deliver_enqueued_emails do
157
- ContactMailer.welcome.deliver_later
158
- end
159
- assert_emails 1
160
- end
161
- ```
162
-
163
- *Andrew Novoselac*
164
-
165
- * The `deliver_later_queue_name` used by the default mailer job can now be
166
- configured on a per-mailer basis. Previously this was only configurable
167
- for all mailers via `ActionMailer::Base`.
168
-
169
- Example:
170
-
171
- ```ruby
172
- class EventsMailer < ApplicationMailer
173
- self.deliver_later_queue_name = :throttled_mailer
174
- end
175
- ```
176
-
177
- *Jeffrey Hardy*
178
-
179
- * Email previews now include an expandable section to show all headers.
180
-
181
- Headers like `Message-ID` for threading or email service provider specific
182
- features like analytics tags or account metadata can now be viewed directly
183
- in the mailer preview.
184
-
185
- *Matt Swanson*
186
-
187
- * Default `ActionMailer::Parameterized#params` to an empty `Hash`
188
-
189
- *Sean Doyle*
190
-
191
- * Introduce the `capture_emails` test helper.
192
-
193
- Returns all emails that are sent in a block.
194
-
195
- ```ruby
196
- def test_emails
197
- emails = capture_emails do
198
- ContactMailer.welcome.deliver_now
199
- ContactMailer.welcome.deliver_later
200
- end
201
- assert_email "Hi there", emails.first.subject
202
- end
203
- ```
204
-
205
- *Alex Ghiculescu*
206
-
207
- * Added ability to download `.eml` file for the email preview.
208
-
209
- *Igor Kasyanchuk*
44
+ * Remove deprecated params via `:args` for `assert_enqueued_email_with`.
210
45
 
211
- * Support multiple preview paths for mailers.
46
+ *Rafael Mendonça França*
212
47
 
213
- Option `config.action_mailer.preview_path` is deprecated in favor of
214
- `config.action_mailer.preview_paths`. Appending paths to this configuration option
215
- will cause those paths to be used in the search for mailer previews.
48
+ * Remove deprecated `config.action_mailer.preview_path`.
216
49
 
217
- *fatkodima*
50
+ *Rafael Mendonça França*
218
51
 
219
- Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/actionmailer/CHANGELOG.md) for previous changes.
52
+ Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actionmailer/CHANGELOG.md) for previous changes.
data/README.rdoc CHANGED
@@ -136,6 +136,6 @@ Bug reports for the Ruby on \Rails project can be filed here:
136
136
 
137
137
  * https://github.com/rails/rails/issues
138
138
 
139
- Feature requests should be discussed on the rails-core mailing list here:
139
+ Feature requests should be discussed on the rubyonrails-core forum here:
140
140
 
141
141
  * https://discuss.rubyonrails.org/c/rubyonrails-core
@@ -574,18 +574,13 @@ module ActionMailer
574
574
  attr_writer :mailer_name
575
575
  alias :controller_path :mailer_name
576
576
 
577
- # Sets the defaults through app configuration:
578
- #
579
- # config.action_mailer.default(from: "no-reply@example.org")
577
+ # Allows to set defaults through app configuration:
580
578
  #
581
- # Aliased by ::default_options=
579
+ # config.action_mailer.default_options = { from: "no-reply@example.org" }
582
580
  def default(value = nil)
583
581
  self.default_params = default_params.merge(value).freeze if value
584
582
  default_params
585
583
  end
586
- # Allows to set defaults through app configuration:
587
- #
588
- # config.action_mailer.default_options = { from: "no-reply@example.org" }
589
584
  alias :default_options= :default
590
585
 
591
586
  # Wraps an email delivery inside of ActiveSupport::Notifications instrumentation.
@@ -625,17 +620,16 @@ module ActionMailer
625
620
  payload[:perform_deliveries] = mail.perform_deliveries
626
621
  end
627
622
 
628
- def method_missing(method_name, *args)
629
- if action_methods.include?(method_name.to_s)
630
- MessageDelivery.new(self, method_name, *args)
623
+ def method_missing(method_name, ...)
624
+ if action_methods.include?(method_name.name)
625
+ MessageDelivery.new(self, method_name, ...)
631
626
  else
632
627
  super
633
628
  end
634
629
  end
635
- ruby2_keywords(:method_missing)
636
630
 
637
631
  def respond_to_missing?(method, include_all = false)
638
- action_methods.include?(method.to_s) || super
632
+ action_methods.include?(method.name) || super
639
633
  end
640
634
  end
641
635
 
@@ -669,7 +663,7 @@ module ActionMailer
669
663
  true
670
664
  end
671
665
 
672
- def method_missing(*args)
666
+ def method_missing(...)
673
667
  nil
674
668
  end
675
669
  end
@@ -32,8 +32,7 @@ module ActionMailer
32
32
 
33
33
  add_delivery_method :sendmail, Mail::Sendmail,
34
34
  location: "/usr/sbin/sendmail",
35
- # See breaking change in the mail gem - https://github.com/mikel/mail/commit/7e1196bd29815a0901d7290c82a332c0959b163a
36
- arguments: Gem::Version.new(Mail::VERSION.version) >= Gem::Version.new("2.8.0") ? %w[-i] : "-i"
35
+ arguments: %w[-i]
37
36
 
38
37
  add_delivery_method :test, Mail::TestMailer
39
38
  end
@@ -8,8 +8,8 @@ module ActionMailer
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 7
11
- MINOR = 1
12
- TINY = 6
11
+ MINOR = 2
12
+ TINY = 3
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -6,7 +6,7 @@ module ActionMailer
6
6
  # = Action Mailer \InlinePreviewInterceptor
7
7
  #
8
8
  # Implements a mailer preview interceptor that converts image tag src attributes
9
- # that use inline cid: style URLs to data: style URLs so that they are visible
9
+ # that use inline +cid:+ style URLs to +data:+ style URLs so that they are visible
10
10
  # when previewing an HTML email in a web browser.
11
11
  #
12
12
  # This interceptor is enabled by default. To disable it, delete it from the
@@ -114,14 +114,13 @@ module ActionMailer
114
114
  end
115
115
 
116
116
  private
117
- def method_missing(method_name, *args)
118
- if @mailer.action_methods.include?(method_name.to_s)
119
- ActionMailer::Parameterized::MessageDelivery.new(@mailer, method_name, @params, *args)
117
+ def method_missing(method_name, ...)
118
+ if @mailer.action_methods.include?(method_name.name)
119
+ ActionMailer::Parameterized::MessageDelivery.new(@mailer, method_name, @params, ...)
120
120
  else
121
121
  super
122
122
  end
123
123
  end
124
- ruby2_keywords(:method_missing)
125
124
 
126
125
  def respond_to_missing?(method, include_all = false)
127
126
  @mailer.respond_to?(method, include_all)
@@ -129,11 +128,10 @@ module ActionMailer
129
128
  end
130
129
 
131
130
  class MessageDelivery < ActionMailer::MessageDelivery # :nodoc:
132
- def initialize(mailer_class, action, params, *args)
133
- super(mailer_class, action, *args)
131
+ def initialize(mailer_class, action, params, ...)
132
+ super(mailer_class, action, ...)
134
133
  @params = params
135
134
  end
136
- ruby2_keywords(:initialize)
137
135
 
138
136
  private
139
137
  def processed_mailer
@@ -25,31 +25,7 @@ module ActionMailer
25
25
  mattr_accessor :preview_interceptors, instance_writer: false, default: [ActionMailer::InlinePreviewInterceptor]
26
26
  end
27
27
 
28
- def preview_path
29
- ActionMailer.deprecator.warn(<<-MSG.squish)
30
- Using preview_path option is deprecated and will be removed in Rails 7.2.
31
- Please use preview_paths instead.
32
- MSG
33
- self.class.preview_paths.first
34
- end
35
-
36
28
  module ClassMethods
37
- def preview_path=(value)
38
- ActionMailer.deprecator.warn(<<-MSG.squish)
39
- Using preview_path= option is deprecated and will be removed in Rails 7.2.
40
- Please use preview_paths= instead.
41
- MSG
42
- self.preview_paths << value
43
- end
44
-
45
- def preview_path
46
- ActionMailer.deprecator.warn(<<-MSG.squish)
47
- Using preview_path option is deprecated and will be removed in Rails 7.2.
48
- Please use preview_paths instead.
49
- MSG
50
- self.preview_paths.first
51
- end
52
-
53
29
  # Register one or more Interceptors which will be called before mail is previewed.
54
30
  def register_preview_interceptors(*interceptors)
55
31
  interceptors.flatten.compact.each { |interceptor| register_preview_interceptor(interceptor) }
@@ -160,26 +160,6 @@ module ActionMailer
160
160
  mailer = mailer.instance_variable_get(:@mailer)
161
161
  end
162
162
 
163
- if args.is_a?(Hash)
164
- ActionMailer.deprecator.warn <<~MSG
165
- Passing a Hash to the assert_enqueued_email_with :args kwarg causes the
166
- Hash to be treated as params. This behavior is deprecated and will be
167
- removed in Rails 7.2.
168
-
169
- To specify a params Hash, use the :params kwarg:
170
-
171
- assert_enqueued_email_with MyMailer, :my_method, params: { my_param: "value" }
172
-
173
- Or, to specify named mailer args as a Hash, wrap the Hash in an array:
174
-
175
- assert_enqueued_email_with MyMailer, :my_method, args: [{ my_arg: "value" }]
176
- # OR
177
- assert_enqueued_email_with MyMailer, :my_method, args: [my_arg: "value"]
178
- MSG
179
-
180
- params, args = args, nil
181
- end
182
-
183
163
  args = Array(args) unless args.is_a?(Proc)
184
164
  queue ||= mailer.deliver_later_queue_name || ActiveJob::Base.default_queue_name
185
165
 
@@ -1,7 +1,9 @@
1
1
  <% module_namespacing do -%>
2
2
  class <%= class_name %>Mailer < ApplicationMailer
3
- <% actions.each do |action| -%>
3
+ <% actions.each_with_index do |action, index| -%>
4
+ <% if index != 0 -%>
4
5
 
6
+ <% end -%>
5
7
  # Subject can be set in your I18n file at config/locales/en.yml
6
8
  # with the following lookup:
7
9
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionmailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.6
4
+ version: 7.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -15,118 +15,70 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 7.1.6
18
+ version: 7.2.3
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 7.1.6
25
+ version: 7.2.3
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: actionpack
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 7.1.6
32
+ version: 7.2.3
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 7.1.6
39
+ version: 7.2.3
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: actionview
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - '='
45
45
  - !ruby/object:Gem::Version
46
- version: 7.1.6
46
+ version: 7.2.3
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
- version: 7.1.6
53
+ version: 7.2.3
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: activejob
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - '='
59
59
  - !ruby/object:Gem::Version
60
- version: 7.1.6
60
+ version: 7.2.3
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - '='
66
66
  - !ruby/object:Gem::Version
67
- version: 7.1.6
67
+ version: 7.2.3
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: mail
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '2.5'
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: 2.5.4
78
- type: :runtime
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "~>"
83
- - !ruby/object:Gem::Version
84
- version: '2.5'
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: 2.5.4
88
- - !ruby/object:Gem::Dependency
89
- name: net-imap
90
- requirement: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- type: :runtime
96
- prerelease: false
97
- version_requirements: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- - !ruby/object:Gem::Dependency
103
- name: net-pop
104
- requirement: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: '0'
109
- type: :runtime
110
- prerelease: false
111
- version_requirements: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- version: '0'
116
- - !ruby/object:Gem::Dependency
117
- name: net-smtp
118
70
  requirement: !ruby/object:Gem::Requirement
119
71
  requirements:
120
72
  - - ">="
121
73
  - !ruby/object:Gem::Version
122
- version: '0'
74
+ version: 2.8.0
123
75
  type: :runtime
124
76
  prerelease: false
125
77
  version_requirements: !ruby/object:Gem::Requirement
126
78
  requirements:
127
79
  - - ">="
128
80
  - !ruby/object:Gem::Version
129
- version: '0'
81
+ version: 2.8.0
130
82
  - !ruby/object:Gem::Dependency
131
83
  name: rails-dom-testing
132
84
  requirement: !ruby/object:Gem::Requirement
@@ -181,10 +133,10 @@ licenses:
181
133
  - MIT
182
134
  metadata:
183
135
  bug_tracker_uri: https://github.com/rails/rails/issues
184
- changelog_uri: https://github.com/rails/rails/blob/v7.1.6/actionmailer/CHANGELOG.md
185
- documentation_uri: https://api.rubyonrails.org/v7.1.6/
136
+ changelog_uri: https://github.com/rails/rails/blob/v7.2.3/actionmailer/CHANGELOG.md
137
+ documentation_uri: https://api.rubyonrails.org/v7.2.3/
186
138
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
187
- source_code_uri: https://github.com/rails/rails/tree/v7.1.6/actionmailer
139
+ source_code_uri: https://github.com/rails/rails/tree/v7.2.3/actionmailer
188
140
  rubygems_mfa_required: 'true'
189
141
  rdoc_options: []
190
142
  require_paths:
@@ -193,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
145
  requirements:
194
146
  - - ">="
195
147
  - !ruby/object:Gem::Version
196
- version: 2.7.0
148
+ version: 3.1.0
197
149
  required_rubygems_version: !ruby/object:Gem::Requirement
198
150
  requirements:
199
151
  - - ">="