collectiveidea / audited

Audited (formerly acts_as_audited) is an ORM extension that logs all changes to your Rails models.
MIT License
3.34k stars 645 forks source link

Replace RequestStore with ActiveSupport::CurrentAttributes #702

Closed punkisdead closed 2 months ago

punkisdead commented 2 months ago

Based on the work done here: https://github.com/collectiveidea/audited/pull/673 by @the-spectator

punkisdead commented 2 months ago

Since ActiveSupport::CurrentAttributes was introduced in Rails 5.2 Rails 5.2 Release I had to increase the minimum required version of activesupport and activerecord to 5.2.

I'm not entirely sure why the Fiber spec would pass on Rails 7.0 and not previous versions, but I'm not entirely sure we need that spec in this gem? ¯\_(ツ)_/¯

Even in current Rails, the default isolation level is set to :thread according to Configuring Rails

danielmorrison commented 2 months ago

👋 I think this a reasonable time to cut support for those old Rails versions. Up for cleaning up the build matrix? Otherwise I will in a bit.

punkisdead commented 2 months ago

I can take a look at it...

danielmorrison commented 2 months ago

I can't remember offhand why we added the fiber spec. Probably sanity check for… something. 🤷

punkisdead commented 2 months ago

I can't remember offhand why we added the fiber spec. Probably sanity check for… something. 🤷

It was added by @the-spectator in his PR.

punkisdead commented 2 months ago

giphy