actionmailer 7.1.4.2 → 7.2.0.beta1

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: '028f5fe54dfad6d22795238963e55d2232c095a2e7a955e5971ac5d917715988'
4
- data.tar.gz: 82c6f8882c15a75f58ce51f8ca537e8f0362cd1682cc86c212f4624b7a157321
3
+ metadata.gz: fb3256479066f6e71da2f41cb8a37cd1b14f3bd42d8e5e77ae5718b307cd2f62
4
+ data.tar.gz: 9291f3df95d95b264683c027560a7942ccc609871eddc79f1f266a3d9a668d8c
5
5
  SHA512:
6
- metadata.gz: 18728155a6fedec0f89021f7abedf0d879c6965b2f1172f00316dd8fd94d59f95ebfb447d478cd2d36eae821be831ae13659e1c46b70f4012d15951f859ba090
7
- data.tar.gz: 8870365d9c3953dde24effb823e2f51b58bd415d8b13abbfa324f155f5324904626253dffbc281765c18983c07d6eadc8c87032dcf62f99732784fa01c8b4411
6
+ metadata.gz: 0243c77d172d2431deda2bc81d240357f8eaaeb48b069eef03eb3e7113c59dba5251d9c95c61350e90cfcf20080ab3f79f001c176b1fe231cb5bfd9ef27a51f0
7
+ data.tar.gz: 537da0a128c3e07b1b895cc11616d188193a9a440d6c5150244b75d4efeabe6c2e9fcebebd08fa58c0be55ecd46ac0ae365147187aa444a780726e5d0dc9d69b
data/CHANGELOG.md CHANGED
@@ -1,197 +1,11 @@
1
- ## Rails 7.1.4.2 (October 23, 2024) ##
1
+ ## Rails 7.2.0.beta1 (May 29, 2024) ##
2
2
 
3
- * Fix NoMethodError in `block_format` helper
3
+ * Remove deprecated params via `:args` for `assert_enqueued_email_with`.
4
4
 
5
- *Michael Leimstaedtner*
5
+ *Rafael Mendonça França*
6
6
 
7
+ * Remove deprecated `config.action_mailer.preview_path`.
7
8
 
8
- ## Rails 7.1.4.1 (October 15, 2024) ##
9
+ *Rafael Mendonça França*
9
10
 
10
- * Avoid regex backtracking in `block_format` helper
11
-
12
- [CVE-2024-47889]
13
-
14
-
15
- ## Rails 7.1.4 (August 22, 2024) ##
16
-
17
- * No changes.
18
-
19
-
20
- ## Rails 7.1.3.4 (June 04, 2024) ##
21
-
22
- * No changes.
23
-
24
-
25
- ## Rails 7.1.3.3 (May 16, 2024) ##
26
-
27
- * No changes.
28
-
29
-
30
- ## Rails 7.1.3.2 (February 21, 2024) ##
31
-
32
- * No changes.
33
-
34
-
35
- ## Rails 7.1.3.1 (February 21, 2024) ##
36
-
37
- * No changes.
38
-
39
-
40
- ## Rails 7.1.3 (January 16, 2024) ##
41
-
42
- * No changes.
43
-
44
-
45
- ## Rails 7.1.2 (November 10, 2023) ##
46
-
47
- * No changes.
48
-
49
-
50
- ## Rails 7.1.1 (October 11, 2023) ##
51
-
52
- * No changes.
53
-
54
-
55
- ## Rails 7.1.0 (October 05, 2023) ##
56
-
57
- * No changes.
58
-
59
-
60
- ## Rails 7.1.0.rc2 (October 01, 2023) ##
61
-
62
- * No changes.
63
-
64
-
65
- ## Rails 7.1.0.rc1 (September 27, 2023) ##
66
-
67
- * Introduce `ActionMailer::FormBuilder`
68
-
69
- Use the `default_form_builder` method in mailers to set the default form builder
70
- for templates rendered by that mailer. Matches the behaviour in Action Controller.
71
-
72
- *Alex Ghiculescu*
73
-
74
-
75
- ## Rails 7.1.0.beta1 (September 13, 2023) ##
76
-
77
- * Mailers are listed in alphabetical order on the mailer preview page now.
78
-
79
- *Martin Spickermann*
80
-
81
- * Deprecate passing params to `assert_enqueued_email_with` via the `:args`
82
- kwarg. `assert_enqueued_email_with` now supports a `:params` kwarg, so use
83
- that to pass params:
84
-
85
- ```ruby
86
- # BEFORE
87
- assert_enqueued_email_with MyMailer, :my_method, args: { my_param: "value" }
88
-
89
- # AFTER
90
- assert_enqueued_email_with MyMailer, :my_method, params: { my_param: "value" }
91
- ```
92
-
93
- To specify named mailer args as a Hash, wrap the Hash in an array:
94
-
95
- ```ruby
96
- assert_enqueued_email_with MyMailer, :my_method, args: [{ my_arg: "value" }]
97
- # OR
98
- assert_enqueued_email_with MyMailer, :my_method, args: [my_arg: "value"]
99
- ```
100
-
101
- *Jonathan Hefner*
102
-
103
- * Accept procs for args and params in `assert_enqueued_email_with`
104
-
105
- ```ruby
106
- assert_enqueued_email_with DeliveryJob, params: -> p { p[:token] =~ /\w+/ } do
107
- UserMailer.with(token: user.generate_token).email_verification.deliver_later
108
- end
109
- ```
110
-
111
- *Max Chernyak*
112
-
113
- * Added `*_deliver` callbacks to `ActionMailer::Base` that wrap mail message delivery.
114
-
115
- Example:
116
-
117
- ```ruby
118
- class EventsMailer < ApplicationMailer
119
- after_deliver do
120
- User.find_by(email: message.to.first).update(email_provider_id: message.message_id, emailed_at: Time.current)
121
- end
122
- end
123
- ```
124
-
125
- *Ben Sheldon*
126
-
127
- * Added `deliver_enqueued_emails` to `ActionMailer::TestHelper`. This method
128
- delivers all enqueued email jobs.
129
-
130
- Example:
131
-
132
- ```ruby
133
- def test_deliver_enqueued_emails
134
- deliver_enqueued_emails do
135
- ContactMailer.welcome.deliver_later
136
- end
137
- assert_emails 1
138
- end
139
- ```
140
-
141
- *Andrew Novoselac*
142
-
143
- * The `deliver_later_queue_name` used by the default mailer job can now be
144
- configured on a per-mailer basis. Previously this was only configurable
145
- for all mailers via `ActionMailer::Base`.
146
-
147
- Example:
148
-
149
- ```ruby
150
- class EventsMailer < ApplicationMailer
151
- self.deliver_later_queue_name = :throttled_mailer
152
- end
153
- ```
154
-
155
- *Jeffrey Hardy*
156
-
157
- * Email previews now include an expandable section to show all headers.
158
-
159
- Headers like `Message-ID` for threading or email service provider specific
160
- features like analytics tags or account metadata can now be viewed directly
161
- in the mailer preview.
162
-
163
- *Matt Swanson*
164
-
165
- * Default `ActionMailer::Parameterized#params` to an empty `Hash`
166
-
167
- *Sean Doyle*
168
-
169
- * Introduce the `capture_emails` test helper.
170
-
171
- Returns all emails that are sent in a block.
172
-
173
- ```ruby
174
- def test_emails
175
- emails = capture_emails do
176
- ContactMailer.welcome.deliver_now
177
- ContactMailer.welcome.deliver_later
178
- end
179
- assert_email "Hi there", emails.first.subject
180
- end
181
- ```
182
-
183
- *Alex Ghiculescu*
184
-
185
- * Added ability to download `.eml` file for the email preview.
186
-
187
- *Igor Kasyanchuk*
188
-
189
- * Support multiple preview paths for mailers.
190
-
191
- Option `config.action_mailer.preview_path` is deprecated in favor of
192
- `config.action_mailer.preview_paths`. Appending paths to this configuration option
193
- will cause those paths to be used in the search for mailer previews.
194
-
195
- *fatkodima*
196
-
197
- Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/actionmailer/CHANGELOG.md) for previous changes.
11
+ Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actionmailer/CHANGELOG.md) for previous changes.
@@ -625,17 +625,16 @@ module ActionMailer
625
625
  payload[:perform_deliveries] = mail.perform_deliveries
626
626
  end
627
627
 
628
- def method_missing(method_name, *args)
629
- if action_methods.include?(method_name.to_s)
630
- MessageDelivery.new(self, method_name, *args)
628
+ def method_missing(method_name, ...)
629
+ if action_methods.include?(method_name.name)
630
+ MessageDelivery.new(self, method_name, ...)
631
631
  else
632
632
  super
633
633
  end
634
634
  end
635
- ruby2_keywords(:method_missing)
636
635
 
637
636
  def respond_to_missing?(method, include_all = false)
638
- action_methods.include?(method.to_s) || super
637
+ action_methods.include?(method.name) || super
639
638
  end
640
639
  end
641
640
 
@@ -669,7 +668,7 @@ module ActionMailer
669
668
  true
670
669
  end
671
670
 
672
- def method_missing(*args)
671
+ def method_missing(...)
673
672
  nil
674
673
  end
675
674
  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,9 +8,9 @@ module ActionMailer
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 7
11
- MINOR = 1
12
- TINY = 4
13
- PRE = "2"
11
+ MINOR = 2
12
+ TINY = 0
13
+ PRE = "beta1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -25,18 +25,10 @@ module ActionMailer
25
25
  }.join("\n\n")
26
26
 
27
27
  # Make list points stand on their own line
28
- output = +""
29
- splits = formatted.split(/(\*+|\#+)/)
30
- while line = splits.shift
31
- if line.start_with?("*", "#") && splits.first&.start_with?(" ")
32
- output.chomp!(" ") while output.end_with?(" ")
33
- output << " #{line} #{splits.shift.strip}\n"
34
- else
35
- output << line
36
- end
37
- end
28
+ formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { " #{$1} #{$2.strip}\n" }
29
+ formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { " #{$1} #{$2.strip}\n" }
38
30
 
39
- output
31
+ formatted
40
32
  end
41
33
 
42
34
  # Access the mailer instance.
@@ -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
 
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.4.2
4
+ version: 7.2.0.beta1
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: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,118 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.1.4.2
19
+ version: 7.2.0.beta1
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.4.2
26
+ version: 7.2.0.beta1
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.4.2
33
+ version: 7.2.0.beta1
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.4.2
40
+ version: 7.2.0.beta1
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.4.2
47
+ version: 7.2.0.beta1
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.4.2
54
+ version: 7.2.0.beta1
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.4.2
61
+ version: 7.2.0.beta1
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.4.2
68
+ version: 7.2.0.beta1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mail
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2.5'
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: 2.5.4
79
- type: :runtime
80
- prerelease: false
81
- version_requirements: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '2.5'
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: 2.5.4
89
- - !ruby/object:Gem::Dependency
90
- name: net-imap
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: '0'
96
- type: :runtime
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- - !ruby/object:Gem::Dependency
104
- name: net-pop
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :runtime
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - ">="
115
- - !ruby/object:Gem::Version
116
- version: '0'
117
- - !ruby/object:Gem::Dependency
118
- name: net-smtp
119
71
  requirement: !ruby/object:Gem::Requirement
120
72
  requirements:
121
73
  - - ">="
122
74
  - !ruby/object:Gem::Version
123
- version: '0'
75
+ version: 2.8.0
124
76
  type: :runtime
125
77
  prerelease: false
126
78
  version_requirements: !ruby/object:Gem::Requirement
127
79
  requirements:
128
80
  - - ">="
129
81
  - !ruby/object:Gem::Version
130
- version: '0'
82
+ version: 2.8.0
131
83
  - !ruby/object:Gem::Dependency
132
84
  name: rails-dom-testing
133
85
  requirement: !ruby/object:Gem::Requirement
@@ -182,12 +134,12 @@ licenses:
182
134
  - MIT
183
135
  metadata:
184
136
  bug_tracker_uri: https://github.com/rails/rails/issues
185
- changelog_uri: https://github.com/rails/rails/blob/v7.1.4.2/actionmailer/CHANGELOG.md
186
- documentation_uri: https://api.rubyonrails.org/v7.1.4.2/
137
+ changelog_uri: https://github.com/rails/rails/blob/v7.2.0.beta1/actionmailer/CHANGELOG.md
138
+ documentation_uri: https://api.rubyonrails.org/v7.2.0.beta1/
187
139
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
188
- source_code_uri: https://github.com/rails/rails/tree/v7.1.4.2/actionmailer
140
+ source_code_uri: https://github.com/rails/rails/tree/v7.2.0.beta1/actionmailer
189
141
  rubygems_mfa_required: 'true'
190
- post_install_message:
142
+ post_install_message:
191
143
  rdoc_options: []
192
144
  require_paths:
193
145
  - lib
@@ -195,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
147
  requirements:
196
148
  - - ">="
197
149
  - !ruby/object:Gem::Version
198
- version: 2.7.0
150
+ version: 3.1.0
199
151
  required_rubygems_version: !ruby/object:Gem::Requirement
200
152
  requirements:
201
153
  - - ">="
@@ -203,8 +155,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
155
  version: '0'
204
156
  requirements:
205
157
  - none
206
- rubygems_version: 3.5.16
207
- signing_key:
158
+ rubygems_version: 3.5.10
159
+ signing_key:
208
160
  specification_version: 4
209
161
  summary: Email composition and delivery framework (part of Rails).
210
162
  test_files: []