2022-06-02 19:21:35 +00:00
|
|
|
* Enable connection pooling by default for `MemCacheStore` and `RedisCacheStore`.
|
|
|
|
|
|
|
|
If you want to disable connection pooling, set `:pool` option to `false` when configuring the cache store:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
config.cache_store = :mem_cache_store, "cache.example.com", pool: false
|
|
|
|
```
|
|
|
|
|
|
|
|
*fatkodima*
|
|
|
|
|
2022-05-25 00:18:54 +00:00
|
|
|
* Add `force:` support to `ActiveSupport::Cache::Store#fetch_multi`.
|
|
|
|
|
|
|
|
*fatkodima*
|
|
|
|
|
2022-05-16 19:47:55 +00:00
|
|
|
* Deprecated `:pool_size` and `:pool_timeout` options for configuring connection pooling in cache stores.
|
|
|
|
|
|
|
|
Use `pool: true` to enable pooling with default settings:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
config.cache_store = :redis_cache_store, pool: true
|
|
|
|
```
|
|
|
|
|
|
|
|
Or pass individual options via `:pool` option:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
config.cache_store = :redis_cache_store, pool: { size: 10, timeout: 2 }
|
|
|
|
```
|
|
|
|
|
|
|
|
*fatkodima*
|
|
|
|
|
2022-05-11 15:44:32 +00:00
|
|
|
* Allow #increment and #decrement methods of `ActiveSupport::Cache::Store`
|
|
|
|
subclasses to set new values.
|
|
|
|
|
|
|
|
Previously incrementing or decrementing an unset key would fail and return
|
|
|
|
nil. A default will now be assumed and the key will be created.
|
|
|
|
|
|
|
|
*Andrej Blagojević*, *Eugene Kenny*
|
|
|
|
|
2022-05-15 10:45:22 +00:00
|
|
|
* Add `skip_nil:` support to `RedisCacheStore`
|
|
|
|
|
|
|
|
*Joey Paris*
|
|
|
|
|
2022-05-11 18:20:01 +00:00
|
|
|
* `ActiveSupport::Cache::MemoryStore#write(name, val, unless_exist:true)` now
|
|
|
|
correctly writes expired keys.
|
|
|
|
|
|
|
|
*Alan Savage*
|
|
|
|
|
2022-05-02 10:02:39 +00:00
|
|
|
* `ActiveSupport::ErrorReporter` now accepts and forward a `source:` parameter.
|
|
|
|
|
|
|
|
This allow libraries to signal the origin of the errors, and reporters
|
|
|
|
to easily ignore some sources.
|
|
|
|
|
|
|
|
*Jean Boussier*
|
|
|
|
|
2022-01-05 15:37:54 +00:00
|
|
|
* Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
|
|
|
|
|
|
|
|
Add the method `ERB::Util.xml_name_escape` to escape dangerous characters
|
|
|
|
in names of tags and names of attributes, following the specification of XML.
|
|
|
|
|
|
|
|
*Álvaro Martín Fraguas*
|
|
|
|
|
2022-04-22 23:45:59 +00:00
|
|
|
* Respect `ActiveSupport::Logger.new`'s `:formatter` keyword argument
|
|
|
|
|
|
|
|
The stdlib `Logger::new` allows passing a `:formatter` keyword argument to
|
|
|
|
set the logger's formatter. Previously `ActiveSupport::Logger.new` ignored
|
|
|
|
that argument by always setting the formatter to an instance of
|
|
|
|
`ActiveSupport::Logger::SimpleFormatter`.
|
|
|
|
|
|
|
|
*Steven Harman*
|
|
|
|
|
2022-03-20 10:07:59 +00:00
|
|
|
* Deprecate preserving the pre-Ruby 2.4 behavior of `to_time`
|
|
|
|
|
|
|
|
With Ruby 2.4+ the default for +to_time+ changed from converting to the
|
|
|
|
local system time to preserving the offset of the receiver. At the time Rails
|
|
|
|
supported older versions of Ruby so a compatibility layer was added to assist
|
2022-04-22 23:45:59 +00:00
|
|
|
in the migration process. From Rails 5.0 new applications have defaulted to
|
2022-03-20 10:07:59 +00:00
|
|
|
the Ruby 2.4+ behavior and since Rails 7.0 now only supports Ruby 2.7+
|
|
|
|
this compatibility layer can be safely removed.
|
2022-04-22 23:45:59 +00:00
|
|
|
|
2022-03-20 10:07:59 +00:00
|
|
|
To minimize any noise generated the deprecation warning only appears when the
|
|
|
|
setting is configured to `false` as that is the only scenario where the
|
|
|
|
removal of the compatibility layer has any effect.
|
2022-04-22 23:45:59 +00:00
|
|
|
|
2022-03-20 10:07:59 +00:00
|
|
|
*Andrew White*
|
|
|
|
|
2022-02-19 08:52:02 +00:00
|
|
|
* `Pathname.blank?` only returns true for `Pathname.new("")`
|
|
|
|
|
|
|
|
Previously it would end up calling `Pathname#empty?` which returned true
|
|
|
|
if the path existed and was an empty directory or file.
|
|
|
|
|
|
|
|
That behavior was unlikely to be expected.
|
|
|
|
|
|
|
|
*Jean Boussier*
|
|
|
|
|
2022-01-17 18:49:31 +00:00
|
|
|
* Deprecate `Notification::Event`'s `#children` and `#parent_of?`
|
|
|
|
|
2021-07-20 15:24:51 +00:00
|
|
|
* Change default serialization format of `MessageEncryptor` from `Marshal` to `JSON` for Rails 7.1.
|
|
|
|
|
|
|
|
Existing apps are provided with an upgrade path to migrate to `JSON` as described in `guides/source/upgrading_ruby_on_rails.md`
|
|
|
|
|
|
|
|
*Zack Deveau* and *Martin Gingras*
|
|
|
|
|
2022-02-01 11:20:06 +00:00
|
|
|
* Add `ActiveSupport::TestCase#stub_const` to stub a constant for the duration of a yield.
|
|
|
|
|
|
|
|
*DHH*
|
|
|
|
|
2022-01-04 13:42:02 +00:00
|
|
|
* Fix `ActiveSupport::EncryptedConfiguration` to be compatible with Psych 4
|
|
|
|
|
|
|
|
*Stephen Sugden*
|
|
|
|
|
2022-01-12 00:47:01 +00:00
|
|
|
* Improve `File.atomic_write` error handling
|
|
|
|
|
2021-12-21 08:54:14 +00:00
|
|
|
* Fix `Class#descendants` and `DescendantsTracker#descendants` compatibility with Ruby 3.1.
|
2021-12-03 19:41:41 +00:00
|
|
|
|
2021-12-21 08:54:14 +00:00
|
|
|
[The native `Class#descendants` was reverted prior to Ruby 3.1 release](https://bugs.ruby-lang.org/issues/14394#note-33),
|
|
|
|
but `Class#subclasses` was kept, breaking the feature detection.
|
|
|
|
|
|
|
|
*Jean Boussier*
|
2021-12-03 19:41:41 +00:00
|
|
|
|
2021-12-07 15:52:30 +00:00
|
|
|
Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/activesupport/CHANGELOG.md) for previous changes.
|