rails-rfc6570 3.5.1 → 3.6.0
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/lib/rails/rfc6570/version.rb +2 -2
- data/rails-rfc6570.gemspec +1 -1
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.1.1/CHANGELOG.md +477 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.1.1/CHANGELOG.md +139 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.1.1/CHANGELOG.md +465 -0
- data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/CHANGELOG.md +55 -46
- data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/README.md +6 -6
- data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/addressable.gemspec +6 -6
- data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/README.md +299 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-2.16.0/json.gemspec +62 -0
- data/vendor/bundle/ruby/3.4.0/gems/{minitest-5.25.5 → minitest-5.26.2}/README.rdoc +10 -8
- data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/CHANGELOG.md +8 -0
- data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/README.md +38 -29
- data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/CHANGELOG.md +81 -14
- data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/README.md +8 -0
- data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/rake.gemspec +1 -1
- data/vendor/bundle/ruby/3.4.0/specifications/{actionpack-8.0.3.gemspec → actionpack-8.1.1.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{actionview-8.0.3.gemspec → actionview-8.1.1.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{activesupport-8.0.3.gemspec → activesupport-8.1.1.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{addressable-2.8.7.gemspec → addressable-2.8.8.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{bigdecimal-3.2.3.gemspec → bigdecimal-3.3.1.gemspec} +2 -2
- data/vendor/bundle/ruby/3.4.0/specifications/{connection_pool-2.5.4.gemspec → connection_pool-2.5.5.gemspec} +2 -2
- data/vendor/bundle/ruby/3.4.0/specifications/json-2.16.0.gemspec +0 -0
- data/vendor/bundle/ruby/3.4.0/specifications/{minitest-5.25.5.gemspec → minitest-5.26.2.gemspec} +6 -6
- data/vendor/bundle/ruby/3.4.0/specifications/{public_suffix-6.0.2.gemspec → public_suffix-7.0.0.gemspec} +5 -5
- data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.2.1.gemspec → rack-3.2.4.gemspec} +2 -2
- data/vendor/bundle/ruby/3.4.0/specifications/{rake-13.3.0.gemspec → rake-13.3.1.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{rspec-3.13.1.gemspec → rspec-3.13.2.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{rspec-core-3.13.5.gemspec → rspec-core-3.13.6.gemspec} +4 -4
- data/vendor/bundle/ruby/3.4.0/specifications/{rspec-mocks-3.13.5.gemspec → rspec-mocks-3.13.7.gemspec} +5 -5
- data/vendor/bundle/ruby/3.4.0/specifications/{uri-1.0.3.gemspec → uri-1.1.1.gemspec} +4 -4
- metadata +55 -55
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.3/CHANGELOG.md +0 -285
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.3/CHANGELOG.md +0 -129
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.3/CHANGELOG.md +0 -309
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/README.md +0 -138
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.1/benchmark.gemspec +0 -32
- data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.1.gemspec +0 -23
- /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.3 → actionpack-8.1.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.3 → actionview-8.1.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.3 → activesupport-8.1.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{addressable-2.8.7 → addressable-2.8.8}/LICENSE.txt +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.2.3 → bigdecimal-3.3.1}/bigdecimal.gemspec +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.4 → connection_pool-2.5.5}/connection_pool.gemspec +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.2 → public_suffix-7.0.0}/LICENSE.txt +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.1 → rack-3.2.4}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/MIT-LICENSE +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.3.0 → rake-13.3.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/LICENSE.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.1 → rspec-3.13.2}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/LICENSE.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.5 → rspec-core-3.13.6}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/LICENSE.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.5 → rspec-mocks-3.13.7}/README.md +0 -0
- /data/vendor/bundle/ruby/3.4.0/gems/{uri-1.0.3 → uri-1.1.1}/README.md +0 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
## Rails 8.1.1 (October 28, 2025) ##
|
|
2
|
+
|
|
3
|
+
* No changes.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Rails 8.1.0 (October 22, 2025) ##
|
|
7
|
+
|
|
8
|
+
* Remove deprecated passing a Time object to `Time#since`.
|
|
9
|
+
|
|
10
|
+
*Rafael Mendonça França*
|
|
11
|
+
|
|
12
|
+
* Remove deprecated `Benchmark.ms` method. It is now defined in the `benchmark` gem.
|
|
13
|
+
|
|
14
|
+
*Rafael Mendonça França*
|
|
15
|
+
|
|
16
|
+
* Remove deprecated addition for `Time` instances with `ActiveSupport::TimeWithZone`.
|
|
17
|
+
|
|
18
|
+
*Rafael Mendonça França*
|
|
19
|
+
|
|
20
|
+
* Remove deprecated support for `to_time` to preserve the system local time. It will now always preserve the receiver
|
|
21
|
+
timezone.
|
|
22
|
+
|
|
23
|
+
*Rafael Mendonça França*
|
|
24
|
+
|
|
25
|
+
* Deprecate `config.active_support.to_time_preserves_timezone`.
|
|
26
|
+
|
|
27
|
+
*Rafael Mendonça França*
|
|
28
|
+
|
|
29
|
+
* Standardize event name formatting in `assert_event_reported` error messages.
|
|
30
|
+
|
|
31
|
+
The event name in failure messages now uses `.inspect` (e.g., `name: "user.created"`)
|
|
32
|
+
to match `assert_events_reported` and provide type clarity between strings and symbols.
|
|
33
|
+
This only affects tests that assert on the failure message format itself.
|
|
34
|
+
|
|
35
|
+
*George Ma*
|
|
36
|
+
|
|
37
|
+
* Fix `Enumerable#sole` to return the full tuple instead of just the first element of the tuple.
|
|
38
|
+
|
|
39
|
+
*Olivier Bellone*
|
|
40
|
+
|
|
41
|
+
* Fix parallel tests hanging when worker processes die abruptly.
|
|
42
|
+
|
|
43
|
+
Previously, if a worker process was killed (e.g., OOM killed, `kill -9`) during parallel
|
|
44
|
+
test execution, the test suite would hang forever waiting for the dead worker.
|
|
45
|
+
|
|
46
|
+
*Joshua Young*
|
|
47
|
+
|
|
48
|
+
* Add `config.active_support.escape_js_separators_in_json`.
|
|
49
|
+
|
|
50
|
+
Introduce a new framework default to skip escaping LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) in JSON.
|
|
51
|
+
|
|
52
|
+
Historically these characters were not valid inside JavaScript literal strings but that changed in ECMAScript 2019.
|
|
53
|
+
As such it's no longer a concern in modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset.
|
|
54
|
+
|
|
55
|
+
*Étienne Barrié*, *Jean Boussier*
|
|
56
|
+
|
|
57
|
+
* Fix `NameError` when `class_attribute` is defined on instance singleton classes.
|
|
58
|
+
|
|
59
|
+
Previously, calling `class_attribute` on an instance's singleton class would raise
|
|
60
|
+
a `NameError` when accessing the attribute through the instance.
|
|
61
|
+
|
|
62
|
+
```ruby
|
|
63
|
+
object = MyClass.new
|
|
64
|
+
object.singleton_class.class_attribute :foo, default: "bar"
|
|
65
|
+
object.foo # previously raised NameError, now returns "bar"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
*Joshua Young*
|
|
69
|
+
|
|
70
|
+
* Introduce `ActiveSupport::Testing::EventReporterAssertions#with_debug_event_reporting`
|
|
71
|
+
to enable event reporter debug mode in tests.
|
|
72
|
+
|
|
73
|
+
The previous way to enable debug mode is by using `#with_debug` on the
|
|
74
|
+
event reporter itself, which is too verbose. This new helper will help
|
|
75
|
+
clear up any confusion on how to test debug events.
|
|
76
|
+
|
|
77
|
+
*Gannon McGibbon*
|
|
78
|
+
|
|
79
|
+
* Add `ActiveSupport::StructuredEventSubscriber` for consuming notifications and
|
|
80
|
+
emitting structured event logs. Events may be emitted with the `#emit_event`
|
|
81
|
+
or `#emit_debug_event` methods.
|
|
82
|
+
|
|
83
|
+
```ruby
|
|
84
|
+
class MyStructuredEventSubscriber < ActiveSupport::StructuredEventSubscriber
|
|
85
|
+
def notification(event)
|
|
86
|
+
emit_event("my.notification", data: 1)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
*Adrianna Chang*
|
|
92
|
+
|
|
93
|
+
* `ActiveSupport::FileUpdateChecker` does not depend on `Time.now` to prevent unecessary reloads with time travel test helpers
|
|
94
|
+
|
|
95
|
+
*Jan Grodowski*
|
|
96
|
+
|
|
97
|
+
* Add `ActiveSupport::Cache::Store#namespace=` and `#namespace`.
|
|
98
|
+
|
|
99
|
+
Can be used as an alternative to `Store#clear` in some situations such as parallel
|
|
100
|
+
testing.
|
|
101
|
+
|
|
102
|
+
*Nick Schwaderer*
|
|
103
|
+
|
|
104
|
+
* Create `parallel_worker_id` helper for running parallel tests. This allows users to
|
|
105
|
+
know which worker they are currently running in.
|
|
106
|
+
|
|
107
|
+
*Nick Schwaderer*
|
|
108
|
+
|
|
109
|
+
* Make the cache of `ActiveSupport::Cache::Strategy::LocalCache::Middleware` updatable.
|
|
110
|
+
|
|
111
|
+
If the cache client at `Rails.cache` of a booted application changes, the corresponding
|
|
112
|
+
mounted middleware needs to update in order for request-local caches to be setup properly.
|
|
113
|
+
Otherwise, redundant cache operations will erroneously hit the datastore.
|
|
114
|
+
|
|
115
|
+
*Gannon McGibbon*
|
|
116
|
+
|
|
117
|
+
* Add `assert_events_reported` test helper for `ActiveSupport::EventReporter`.
|
|
118
|
+
|
|
119
|
+
This new assertion allows testing multiple events in a single block, regardless of order:
|
|
120
|
+
|
|
121
|
+
```ruby
|
|
122
|
+
assert_events_reported([
|
|
123
|
+
{ name: "user.created", payload: { id: 123 } },
|
|
124
|
+
{ name: "email.sent", payload: { to: "user@example.com" } }
|
|
125
|
+
]) do
|
|
126
|
+
create_user_and_send_welcome_email
|
|
127
|
+
end
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
*George Ma*
|
|
131
|
+
|
|
132
|
+
* Add `ActiveSupport::TimeZone#standard_name` method.
|
|
133
|
+
|
|
134
|
+
``` ruby
|
|
135
|
+
zone = ActiveSupport::TimeZone['Hawaii']
|
|
136
|
+
# Old way
|
|
137
|
+
ActiveSupport::TimeZone::MAPPING[zone.name]
|
|
138
|
+
# New way
|
|
139
|
+
zone.standard_name # => 'Pacific/Honolulu'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
*Bogdan Gusiev*
|
|
143
|
+
|
|
144
|
+
* Add Structured Event Reporter, accessible via `Rails.event`.
|
|
145
|
+
|
|
146
|
+
The Event Reporter provides a unified interface for producing structured events in Rails
|
|
147
|
+
applications:
|
|
148
|
+
|
|
149
|
+
```ruby
|
|
150
|
+
Rails.event.notify("user.signup", user_id: 123, email: "user@example.com")
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
It supports adding tags to events:
|
|
154
|
+
|
|
155
|
+
```ruby
|
|
156
|
+
Rails.event.tagged("graphql") do
|
|
157
|
+
# Event includes tags: { graphql: true }
|
|
158
|
+
Rails.event.notify("user.signup", user_id: 123, email: "user@example.com")
|
|
159
|
+
end
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
As well as context:
|
|
163
|
+
```ruby
|
|
164
|
+
# All events will contain context: {request_id: "abc123", shop_id: 456}
|
|
165
|
+
Rails.event.set_context(request_id: "abc123", shop_id: 456)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Events are emitted to subscribers. Applications register subscribers to
|
|
169
|
+
control how events are serialized and emitted. Subscribers must implement
|
|
170
|
+
an `#emit` method, which receives the event hash:
|
|
171
|
+
|
|
172
|
+
```ruby
|
|
173
|
+
class LogSubscriber
|
|
174
|
+
def emit(event)
|
|
175
|
+
payload = event[:payload].map { |key, value| "#{key}=#{value}" }.join(" ")
|
|
176
|
+
source_location = event[:source_location]
|
|
177
|
+
log = "[#{event[:name]}] #{payload} at #{source_location[:filepath]}:#{source_location[:lineno]}"
|
|
178
|
+
Rails.logger.info(log)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
*Adrianna Chang*
|
|
184
|
+
|
|
185
|
+
* Make `ActiveSupport::Logger` `#freeze`-friendly.
|
|
186
|
+
|
|
187
|
+
*Joshua Young*
|
|
188
|
+
|
|
189
|
+
* Make `ActiveSupport::Gzip.compress` deterministic based on input.
|
|
190
|
+
|
|
191
|
+
`ActiveSupport::Gzip.compress` used to include a timestamp in the output,
|
|
192
|
+
causing consecutive calls with the same input data to have different output
|
|
193
|
+
if called during different seconds. It now always sets the timestamp to `0`
|
|
194
|
+
so that the output is identical for any given input.
|
|
195
|
+
|
|
196
|
+
*Rob Brackett*
|
|
197
|
+
|
|
198
|
+
* Given an array of `Thread::Backtrace::Location` objects, the new method
|
|
199
|
+
`ActiveSupport::BacktraceCleaner#clean_locations` returns an array with the
|
|
200
|
+
clean ones:
|
|
201
|
+
|
|
202
|
+
```ruby
|
|
203
|
+
clean_locations = backtrace_cleaner.clean_locations(caller_locations)
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Filters and silencers receive strings as usual. However, the `path`
|
|
207
|
+
attributes of the locations in the returned array are the original,
|
|
208
|
+
unfiltered ones, since locations are immutable.
|
|
209
|
+
|
|
210
|
+
*Xavier Noria*
|
|
211
|
+
|
|
212
|
+
* Improve `CurrentAttributes` and `ExecutionContext` state managment in test cases.
|
|
213
|
+
|
|
214
|
+
Previously these two global state would be entirely cleared out whenever calling
|
|
215
|
+
into code that is wrapped by the Rails executor, typically Action Controller or
|
|
216
|
+
Active Job helpers:
|
|
217
|
+
|
|
218
|
+
```ruby
|
|
219
|
+
test "#index works" do
|
|
220
|
+
CurrentUser.id = 42
|
|
221
|
+
get :index
|
|
222
|
+
CurrentUser.id == nil
|
|
223
|
+
end
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Now re-entering the executor properly save and restore that state.
|
|
227
|
+
|
|
228
|
+
*Jean Boussier*
|
|
229
|
+
|
|
230
|
+
* The new method `ActiveSupport::BacktraceCleaner#first_clean_location`
|
|
231
|
+
returns the first clean location of the caller's call stack, or `nil`.
|
|
232
|
+
Locations are `Thread::Backtrace::Location` objects. Useful when you want to
|
|
233
|
+
report the application-level location where something happened as an object.
|
|
234
|
+
|
|
235
|
+
*Xavier Noria*
|
|
236
|
+
|
|
237
|
+
* FileUpdateChecker and EventedFileUpdateChecker ignore changes in Gem.path now.
|
|
238
|
+
|
|
239
|
+
*Ermolaev Andrey*, *zzak*
|
|
240
|
+
|
|
241
|
+
* The new method `ActiveSupport::BacktraceCleaner#first_clean_frame` returns
|
|
242
|
+
the first clean frame of the caller's backtrace, or `nil`. Useful when you
|
|
243
|
+
want to report the application-level frame where something happened as a
|
|
244
|
+
string.
|
|
245
|
+
|
|
246
|
+
*Xavier Noria*
|
|
247
|
+
|
|
248
|
+
* Always clear `CurrentAttributes` instances.
|
|
249
|
+
|
|
250
|
+
Previously `CurrentAttributes` instance would be reset at the end of requests.
|
|
251
|
+
Meaning its attributes would be re-initialized.
|
|
252
|
+
|
|
253
|
+
This is problematic because it assume these objects don't hold any state
|
|
254
|
+
other than their declared attribute, which isn't always the case, and
|
|
255
|
+
can lead to state leak across request.
|
|
256
|
+
|
|
257
|
+
Now `CurrentAttributes` instances are abandoned at the end of a request,
|
|
258
|
+
and a new instance is created at the start of the next request.
|
|
259
|
+
|
|
260
|
+
*Jean Boussier*, *Janko Marohnić*
|
|
261
|
+
|
|
262
|
+
* Add public API for `before_fork_hook` in parallel testing.
|
|
263
|
+
|
|
264
|
+
Introduces a public API for calling the before fork hooks implemented by parallel testing.
|
|
265
|
+
|
|
266
|
+
```ruby
|
|
267
|
+
parallelize_before_fork do
|
|
268
|
+
# perform an action before test processes are forked
|
|
269
|
+
end
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
*Eileen M. Uchitelle*
|
|
273
|
+
|
|
274
|
+
* Implement ability to skip creating parallel testing databases.
|
|
275
|
+
|
|
276
|
+
With parallel testing, Rails will create a database per process. If this isn't
|
|
277
|
+
desirable or you would like to implement databases handling on your own, you can
|
|
278
|
+
now turn off this default behavior.
|
|
279
|
+
|
|
280
|
+
To skip creating a database per process, you can change it via the
|
|
281
|
+
`parallelize` method:
|
|
282
|
+
|
|
283
|
+
```ruby
|
|
284
|
+
parallelize(workers: 10, parallelize_databases: false)
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
or via the application configuration:
|
|
288
|
+
|
|
289
|
+
```ruby
|
|
290
|
+
config.active_support.parallelize_databases = false
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
*Eileen M. Uchitelle*
|
|
294
|
+
|
|
295
|
+
* Allow to configure maximum cache key sizes
|
|
296
|
+
|
|
297
|
+
When the key exceeds the configured limit (250 bytes by default), it will be truncated and
|
|
298
|
+
the digest of the rest of the key appended to it.
|
|
299
|
+
|
|
300
|
+
Note that previously `ActiveSupport::Cache::RedisCacheStore` allowed up to 1kb cache keys before
|
|
301
|
+
truncation, which is now reduced to 250 bytes.
|
|
302
|
+
|
|
303
|
+
```ruby
|
|
304
|
+
config.cache_store = :redis_cache_store, { max_key_size: 64 }
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
*fatkodima*
|
|
308
|
+
|
|
309
|
+
* Use `UNLINK` command instead of `DEL` in `ActiveSupport::Cache::RedisCacheStore` for non-blocking deletion.
|
|
310
|
+
|
|
311
|
+
*Aron Roh*
|
|
312
|
+
|
|
313
|
+
* Add `Cache#read_counter` and `Cache#write_counter`
|
|
314
|
+
|
|
315
|
+
```ruby
|
|
316
|
+
Rails.cache.write_counter("foo", 1)
|
|
317
|
+
Rails.cache.read_counter("foo") # => 1
|
|
318
|
+
Rails.cache.increment("foo")
|
|
319
|
+
Rails.cache.read_counter("foo") # => 2
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
*Alex Ghiculescu*
|
|
323
|
+
|
|
324
|
+
* Introduce ActiveSupport::Testing::ErrorReporterAssertions#capture_error_reports
|
|
325
|
+
|
|
326
|
+
Captures all reported errors from within the block that match the given
|
|
327
|
+
error class.
|
|
328
|
+
|
|
329
|
+
```ruby
|
|
330
|
+
reports = capture_error_reports(IOError) do
|
|
331
|
+
Rails.error.report(IOError.new("Oops"))
|
|
332
|
+
Rails.error.report(IOError.new("Oh no"))
|
|
333
|
+
Rails.error.report(StandardError.new)
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
assert_equal 2, reports.size
|
|
337
|
+
assert_equal "Oops", reports.first.error.message
|
|
338
|
+
assert_equal "Oh no", reports.last.error.message
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
*Andrew Novoselac*
|
|
342
|
+
|
|
343
|
+
* Introduce ActiveSupport::ErrorReporter#add_middleware
|
|
344
|
+
|
|
345
|
+
When reporting an error, the error context middleware will be called with the reported error
|
|
346
|
+
and base execution context. The stack may mutate the context hash. The mutated context will
|
|
347
|
+
then be passed to error subscribers. Middleware receives the same parameters as `ErrorReporter#report`.
|
|
348
|
+
|
|
349
|
+
*Andrew Novoselac*, *Sam Schmidt*
|
|
350
|
+
|
|
351
|
+
* Change execution wrapping to report all exceptions, including `Exception`.
|
|
352
|
+
|
|
353
|
+
If a more serious error like `SystemStackError` or `NoMemoryError` happens,
|
|
354
|
+
the error reporter should be able to report these kinds of exceptions.
|
|
355
|
+
|
|
356
|
+
*Gannon McGibbon*
|
|
357
|
+
|
|
358
|
+
* `ActiveSupport::Testing::Parallelization.before_fork_hook` allows declaration of callbacks that
|
|
359
|
+
are invoked immediately before forking test workers.
|
|
360
|
+
|
|
361
|
+
*Mike Dalessio*
|
|
362
|
+
|
|
363
|
+
* Allow the `#freeze_time` testing helper to accept a date or time argument.
|
|
364
|
+
|
|
365
|
+
```ruby
|
|
366
|
+
Time.current # => Sun, 09 Jul 2024 15:34:49 EST -05:00
|
|
367
|
+
freeze_time Time.current + 1.day
|
|
368
|
+
sleep 1
|
|
369
|
+
Time.current # => Mon, 10 Jul 2024 15:34:49 EST -05:00
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
*Joshua Young*
|
|
373
|
+
|
|
374
|
+
* `ActiveSupport::JSON` now accepts options
|
|
375
|
+
|
|
376
|
+
It is now possible to pass options to `ActiveSupport::JSON`:
|
|
377
|
+
```ruby
|
|
378
|
+
ActiveSupport::JSON.decode('{"key": "value"}', symbolize_names: true) # => { key: "value" }
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
*matthaigh27*
|
|
382
|
+
|
|
383
|
+
* `ActiveSupport::Testing::NotificationAssertions`'s `assert_notification` now matches against payload subsets by default.
|
|
384
|
+
|
|
385
|
+
Previously the following assertion would fail due to excess key vals in the notification payload. Now with payload subset matching, it will pass.
|
|
386
|
+
|
|
387
|
+
```ruby
|
|
388
|
+
assert_notification("post.submitted", title: "Cool Post") do
|
|
389
|
+
ActiveSupport::Notifications.instrument("post.submitted", title: "Cool Post", body: "Cool Body")
|
|
390
|
+
end
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Additionally, you can now persist a matched notification for more customized assertions.
|
|
394
|
+
|
|
395
|
+
```ruby
|
|
396
|
+
notification = assert_notification("post.submitted", title: "Cool Post") do
|
|
397
|
+
ActiveSupport::Notifications.instrument("post.submitted", title: "Cool Post", body: Body.new("Cool Body"))
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
assert_instance_of(Body, notification.payload[:body])
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
*Nicholas La Roux*
|
|
404
|
+
|
|
405
|
+
* Deprecate `String#mb_chars` and `ActiveSupport::Multibyte::Chars`.
|
|
406
|
+
|
|
407
|
+
These APIs are a relic of the Ruby 1.8 days when Ruby strings weren't encoding
|
|
408
|
+
aware. There is no legitimate reasons to need these APIs today.
|
|
409
|
+
|
|
410
|
+
*Jean Boussier*
|
|
411
|
+
|
|
412
|
+
* Deprecate `ActiveSupport::Configurable`
|
|
413
|
+
|
|
414
|
+
*Sean Doyle*
|
|
415
|
+
|
|
416
|
+
* `nil.to_query("key")` now returns `key`.
|
|
417
|
+
|
|
418
|
+
Previously it would return `key=`, preventing round tripping with `Rack::Utils.parse_nested_query`.
|
|
419
|
+
|
|
420
|
+
*Erol Fornoles*
|
|
421
|
+
|
|
422
|
+
* Avoid wrapping redis in a `ConnectionPool` when using `ActiveSupport::Cache::RedisCacheStore` if the `:redis`
|
|
423
|
+
option is already a `ConnectionPool`.
|
|
424
|
+
|
|
425
|
+
*Joshua Young*
|
|
426
|
+
|
|
427
|
+
* Alter `ERB::Util.tokenize` to return :PLAIN token with full input string when string doesn't contain ERB tags.
|
|
428
|
+
|
|
429
|
+
*Martin Emde*
|
|
430
|
+
|
|
431
|
+
* Fix a bug in `ERB::Util.tokenize` that causes incorrect tokenization when ERB tags are preceded by multibyte characters.
|
|
432
|
+
|
|
433
|
+
*Martin Emde*
|
|
434
|
+
|
|
435
|
+
* Add `ActiveSupport::Testing::NotificationAssertions` module to help with testing `ActiveSupport::Notifications`.
|
|
436
|
+
|
|
437
|
+
*Nicholas La Roux*, *Yishu See*, *Sean Doyle*
|
|
438
|
+
|
|
439
|
+
* `ActiveSupport::CurrentAttributes#attributes` now will return a new hash object on each call.
|
|
440
|
+
|
|
441
|
+
Previously, the same hash object was returned each time that method was called.
|
|
442
|
+
|
|
443
|
+
*fatkodima*
|
|
444
|
+
|
|
445
|
+
* `ActiveSupport::JSON.encode` supports CIDR notation.
|
|
446
|
+
|
|
447
|
+
Previously:
|
|
448
|
+
|
|
449
|
+
```ruby
|
|
450
|
+
ActiveSupport::JSON.encode(IPAddr.new("172.16.0.0/24")) # => "\"172.16.0.0\""
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
After this change:
|
|
454
|
+
|
|
455
|
+
```ruby
|
|
456
|
+
ActiveSupport::JSON.encode(IPAddr.new("172.16.0.0/24")) # => "\"172.16.0.0/24\""
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
*Taketo Takashima*
|
|
460
|
+
|
|
461
|
+
* Make `ActiveSupport::FileUpdateChecker` faster when checking many file-extensions.
|
|
462
|
+
|
|
463
|
+
*Jonathan del Strother*
|
|
464
|
+
|
|
465
|
+
Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/activesupport/CHANGELOG.md) for previous changes.
|