audited 5.4.1 → 5.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/audited/version.rb +1 -1
- data/lib/audited.rb +2 -2
- data/spec/audited_spec.rb +1 -5
- metadata +11 -18
- data/lib/audited/request_store.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2f155f1c224559a215a6098e8dad58c4a807e87d38cb99e9b09b21e570db0ac
|
4
|
+
data.tar.gz: 572d605d910cf1d0a6c9a3904ba9ccc95979b189fabf3912a66adb590fc40bf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22f44786ceff2b8dd4f22f97ad2b874b5fe8e9fb99d97519a47e68e272ca0409ec20ed042ed38e706defffc6ffb9bb2e12f95ee9d508dcd2ff731e9e24a598b3
|
7
|
+
data.tar.gz: dd24d3d0f51e90f683003f831d9907403e369aad7db2146f56dc8169d7feb5d83e6ff408693eef12e620e7b759a5bc7929c04d41d0ec5f3f36f79f953b6bc341
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Audited ChangeLog
|
2
2
|
|
3
|
-
## 5.4.
|
3
|
+
## 5.4.2 (2023-11-30)
|
4
|
+
|
5
|
+
- Revert replacing RequetStore with ActiveSupport::CurrentAttributes until it is fully tested.
|
6
|
+
|
7
|
+
## 5.4.1 (2023-11-30)
|
4
8
|
|
5
9
|
- Replace RequestStore with ActiveSupport::CurrentAttributes - @the-spectator
|
6
10
|
[#673](https://github.com/collectiveidea/audited/pull/673/)
|
data/lib/audited/version.rb
CHANGED
data/lib/audited.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "active_record"
|
4
|
+
require "request_store"
|
4
5
|
|
5
6
|
module Audited
|
6
7
|
class << self
|
@@ -25,7 +26,7 @@ module Audited
|
|
25
26
|
deprecator: ActiveSupport::Deprecation.new('6.0.0', 'Audited')
|
26
27
|
|
27
28
|
def store
|
28
|
-
|
29
|
+
RequestStore.store[:audited_store] ||= {}
|
29
30
|
end
|
30
31
|
|
31
32
|
def config
|
@@ -41,7 +42,6 @@ module Audited
|
|
41
42
|
end
|
42
43
|
|
43
44
|
require "audited/auditor"
|
44
|
-
require "audited/request_store"
|
45
45
|
|
46
46
|
ActiveSupport.on_load :active_record do
|
47
47
|
require "audited/audit"
|
data/spec/audited_spec.rb
CHANGED
@@ -3,16 +3,12 @@ require "spec_helper"
|
|
3
3
|
describe Audited do
|
4
4
|
describe "#store" do
|
5
5
|
describe "maintains state of store" do
|
6
|
-
let(:current_user) {
|
6
|
+
let(:current_user) { RequestStore.store[:audited_store] }
|
7
7
|
before { Audited.store[:current_user] = current_user }
|
8
8
|
|
9
9
|
it "checks store is not nil" do
|
10
10
|
expect(Audited.store[:current_user]).to eq(current_user)
|
11
11
|
end
|
12
|
-
|
13
|
-
it "when executed with Fibers" do
|
14
|
-
Fiber.new { expect(Audited.store[:current_user]).to eq(current_user) }.resume
|
15
|
-
end
|
16
12
|
end
|
17
13
|
end
|
18
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: audited
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.4.
|
4
|
+
version: 5.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Keepers
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2023-11-
|
16
|
+
date: 2023-11-08 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activerecord
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version: '5.0'
|
25
25
|
- - "<"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '7.
|
27
|
+
version: '7.2'
|
28
28
|
type: :runtime
|
29
29
|
prerelease: false
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -34,27 +34,21 @@ dependencies:
|
|
34
34
|
version: '5.0'
|
35
35
|
- - "<"
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '7.
|
37
|
+
version: '7.2'
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: request_store
|
40
40
|
requirement: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - "
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '5.0'
|
45
|
-
- - "<"
|
42
|
+
- - "~>"
|
46
43
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
44
|
+
version: '1.2'
|
48
45
|
type: :runtime
|
49
46
|
prerelease: false
|
50
47
|
version_requirements: !ruby/object:Gem::Requirement
|
51
48
|
requirements:
|
52
|
-
- - "
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '5.0'
|
55
|
-
- - "<"
|
49
|
+
- - "~>"
|
56
50
|
- !ruby/object:Gem::Version
|
57
|
-
version: '
|
51
|
+
version: '1.2'
|
58
52
|
- !ruby/object:Gem::Dependency
|
59
53
|
name: appraisal
|
60
54
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,7 +72,7 @@ dependencies:
|
|
78
72
|
version: '5.0'
|
79
73
|
- - "<"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '7.
|
75
|
+
version: '7.2'
|
82
76
|
type: :development
|
83
77
|
prerelease: false
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -88,7 +82,7 @@ dependencies:
|
|
88
82
|
version: '5.0'
|
89
83
|
- - "<"
|
90
84
|
- !ruby/object:Gem::Version
|
91
|
-
version: '7.
|
85
|
+
version: '7.2'
|
92
86
|
- !ruby/object:Gem::Dependency
|
93
87
|
name: rspec-rails
|
94
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -208,7 +202,6 @@ files:
|
|
208
202
|
- lib/audited/audit.rb
|
209
203
|
- lib/audited/auditor.rb
|
210
204
|
- lib/audited/railtie.rb
|
211
|
-
- lib/audited/request_store.rb
|
212
205
|
- lib/audited/rspec_matchers.rb
|
213
206
|
- lib/audited/sweeper.rb
|
214
207
|
- lib/audited/version.rb
|