audited 5.5.1.pre → 5.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +13 -24
- data/CHANGELOG.md +16 -2
- data/README.md +2 -1
- data/audited.gemspec +3 -3
- data/lib/audited/auditor.rb +14 -3
- data/lib/audited/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 954d29bc806e5a8e953599ce9fe59d04d52ade8e2847a9335d2cdaf2c077bfb9
|
4
|
+
data.tar.gz: b14efe205c85e13bd23bd9041e8b19b36de9b165d580831a564fb628180727bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45dc07b6e27f6d541867cb40497780e0a03b4f58900d013f39c68ffc8b02c5e988b4610df9db9453b130d46ee8fa738ab8f9840008b03066b9dc409d3500f4a8
|
7
|
+
data.tar.gz: e2dc409665f3703e6364d9192444cd84b284ee413ef4a38f6bfacbd6a46e9e51251b8b402e2bac7cbdf8bfc41e84265ba0417a92eb78715cb503c457cc5597a0
|
data/Appraisals
CHANGED
@@ -1,26 +1,8 @@
|
|
1
1
|
# Include DB adapters matching the version requirements in
|
2
2
|
# rails/activerecord/lib/active_record/connection_adapters/*adapter.rb
|
3
3
|
|
4
|
-
appraise "rails50" do
|
5
|
-
gem "rails", "~> 5.0.0"
|
6
|
-
gem "mysql2", ">= 0.3.18", "< 0.6.0"
|
7
|
-
gem "pg", ">= 0.18", "< 2.0"
|
8
|
-
gem "sqlite3", "~> 1.3.6"
|
9
|
-
gem "psych", "~> 3.1"
|
10
|
-
gem "loofah", "2.20.0"
|
11
|
-
end
|
12
|
-
|
13
|
-
appraise "rails51" do
|
14
|
-
gem "rails", "~> 5.1.4"
|
15
|
-
gem "mysql2", ">= 0.3.18", "< 0.6.0"
|
16
|
-
gem "pg", ">= 0.18", "< 2.0"
|
17
|
-
gem "sqlite3", "~> 1.3.6"
|
18
|
-
gem "psych", "~> 3.1"
|
19
|
-
gem "loofah", "2.20.0"
|
20
|
-
end
|
21
|
-
|
22
4
|
appraise "rails52" do
|
23
|
-
gem "rails", "
|
5
|
+
gem "rails", "~> 5.2.8"
|
24
6
|
gem "mysql2", ">= 0.4.4", "< 0.6.0"
|
25
7
|
gem "pg", ">= 0.18", "< 2.0"
|
26
8
|
gem "sqlite3", "~> 1.3.6"
|
@@ -29,29 +11,36 @@ appraise "rails52" do
|
|
29
11
|
end
|
30
12
|
|
31
13
|
appraise "rails60" do
|
32
|
-
gem "rails", "
|
14
|
+
gem "rails", "~> 6.0.6"
|
33
15
|
gem "mysql2", ">= 0.4.4"
|
34
16
|
gem "pg", ">= 0.18", "< 2.0"
|
35
17
|
gem "sqlite3", "~> 1.4"
|
36
18
|
end
|
37
19
|
|
38
20
|
appraise "rails61" do
|
39
|
-
gem "rails", "
|
21
|
+
gem "rails", "~> 6.1.7"
|
40
22
|
gem "mysql2", ">= 0.4.4"
|
41
23
|
gem "pg", ">= 1.1", "< 2.0"
|
42
24
|
gem "sqlite3", "~> 1.4"
|
43
25
|
end
|
44
26
|
|
45
27
|
appraise "rails70" do
|
46
|
-
gem "rails", "
|
28
|
+
gem "rails", "~> 7.0.8"
|
47
29
|
gem "mysql2", ">= 0.4.4"
|
48
30
|
gem "pg", ">= 1.1"
|
49
|
-
gem "sqlite3", "
|
31
|
+
gem "sqlite3", "~> 1.4"
|
50
32
|
end
|
51
33
|
|
52
34
|
appraise "rails71" do
|
53
|
-
gem "rails", "
|
35
|
+
gem "rails", "~> 7.1.3"
|
54
36
|
gem "mysql2", ">= 0.4.4"
|
55
37
|
gem "pg", ">= 1.1"
|
38
|
+
gem "sqlite3", "~> 1.4"
|
39
|
+
end
|
40
|
+
|
41
|
+
appraise "rails72" do
|
42
|
+
gem "rails", "~> 7.2.0"
|
43
|
+
gem "mysql2", "~> 0.5"
|
44
|
+
gem "pg", "~> 1.1"
|
56
45
|
gem "sqlite3", ">= 1.4"
|
57
46
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,25 @@
|
|
1
1
|
# Audited ChangeLog
|
2
2
|
|
3
|
-
### 5.
|
3
|
+
### 5.7.0 (2024-08-13)
|
4
|
+
|
5
|
+
- Support for Rails 7.2 and Ruby 3.3, and testing cleanups - @mattbrictson
|
6
|
+
[#723](https://github.com/collectiveidea/audited/pull/723)
|
7
|
+
- Allow max_audits to be a proc or symbol - @gmhawash
|
8
|
+
[#718](https://github.com/collectiveidea/audited/pull/718)
|
9
|
+
- Support Rails 8 - @fernandomenolli
|
10
|
+
[#717](https://github.com/collectiveidea/audited/pull/717)
|
11
|
+
|
12
|
+
|
13
|
+
### 5.6.0 (2024-04-05)
|
4
14
|
|
5
15
|
- Removed support for Rails 5.0 and 5.1.
|
6
16
|
- Replace RequestStore with ActiveSupport::CurrentAttributes - @punkisdead
|
7
17
|
[#702](https://github.com/collectiveidea/audited/pull/702)
|
8
18
|
|
19
|
+
### 5.5.0 (2024-04-02)
|
20
|
+
|
21
|
+
- Bad release. Same code as 5.4.1. Use 5.6.0 for updated features.
|
22
|
+
|
9
23
|
### 5.4.3 (2024-01-11)
|
10
24
|
|
11
25
|
- Ignore readonly columns in audit - @sriddbs
|
@@ -34,7 +48,7 @@
|
|
34
48
|
## 5.3.3 (2023-03-24)
|
35
49
|
|
36
50
|
- Use RequestStore instead of Thread.current for thread-safe requests - @tiagocassio
|
37
|
-
[#669](https://github.com/
|
51
|
+
[#669](https://github.com/c ollectiveidea/audited/pull/669)
|
38
52
|
- Clean up Touch audits - @mcyoung, @akostadinov
|
39
53
|
[#668](https://github.com/collectiveidea/audited/pull/668)
|
40
54
|
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Audited
|
|
8
8
|
**Audited** (previously acts_as_audited) is an ORM extension that logs all changes to your models. Audited can also record who made those changes, save comments and associate models related to the changes.
|
9
9
|
|
10
10
|
|
11
|
-
Audited currently (5.
|
11
|
+
Audited currently (5.6) works with Rails 7.2, 7.1, 7.0, 6.1, 6.0, 5.2.
|
12
12
|
|
13
13
|
For Rails 5.0 & 5.1, use gem version 5.4.3
|
14
14
|
For Rails 4, use gem version 4.x
|
@@ -26,6 +26,7 @@ Audited supports and is [tested against](https://github.com/collectiveidea/audit
|
|
26
26
|
* 3.0
|
27
27
|
* 3.1
|
28
28
|
* 3.2
|
29
|
+
* 3.3
|
29
30
|
|
30
31
|
Audited may work just fine with a Ruby version not listed above, but we can't guarantee that it will. If you'd like to maintain a Ruby that isn't listed, please let us know with a [pull request](https://github.com/collectiveidea/audited/pulls).
|
31
32
|
|
data/audited.gemspec
CHANGED
@@ -16,11 +16,11 @@ Gem::Specification.new do |gem|
|
|
16
16
|
|
17
17
|
gem.required_ruby_version = ">= 2.3.0"
|
18
18
|
|
19
|
-
gem.add_dependency "activerecord", ">= 5.2", "<
|
20
|
-
gem.add_dependency "activesupport", ">= 5.2", "<
|
19
|
+
gem.add_dependency "activerecord", ">= 5.2", "< 8.0"
|
20
|
+
gem.add_dependency "activesupport", ">= 5.2", "< 8.0"
|
21
21
|
|
22
22
|
gem.add_development_dependency "appraisal"
|
23
|
-
gem.add_development_dependency "rails", ">= 5.2", "<
|
23
|
+
gem.add_development_dependency "rails", ">= 5.2", "< 8.0"
|
24
24
|
gem.add_development_dependency "rspec-rails"
|
25
25
|
gem.add_development_dependency "standard"
|
26
26
|
gem.add_development_dependency "single_cov"
|
data/lib/audited/auditor.rb
CHANGED
@@ -384,13 +384,25 @@ module Audited
|
|
384
384
|
end
|
385
385
|
|
386
386
|
def combine_audits_if_needed
|
387
|
-
max_audits =
|
387
|
+
max_audits = evaluate_max_audits
|
388
|
+
|
388
389
|
if max_audits && (extra_count = audits.count - max_audits) > 0
|
389
390
|
audits_to_combine = audits.limit(extra_count + 1)
|
390
391
|
combine_audits(audits_to_combine)
|
391
392
|
end
|
392
393
|
end
|
393
394
|
|
395
|
+
def evaluate_max_audits
|
396
|
+
max_audits = case (option = audited_options[:max_audits])
|
397
|
+
when Proc then option.call
|
398
|
+
when Symbol then send(option)
|
399
|
+
else
|
400
|
+
option
|
401
|
+
end
|
402
|
+
|
403
|
+
Integer(max_audits).abs if max_audits
|
404
|
+
end
|
405
|
+
|
394
406
|
def require_comment
|
395
407
|
if auditing_enabled && audit_comment.blank?
|
396
408
|
errors.add(:audit_comment, :blank)
|
@@ -502,8 +514,7 @@ module Audited
|
|
502
514
|
audited_options[:on] = ([:create, :update, :touch, :destroy] - Audited.ignored_default_callbacks) if audited_options[:on].empty?
|
503
515
|
audited_options[:only] = Array.wrap(audited_options[:only]).map(&:to_s)
|
504
516
|
audited_options[:except] = Array.wrap(audited_options[:except]).map(&:to_s)
|
505
|
-
|
506
|
-
audited_options[:max_audits] = Integer(max_audits).abs if max_audits
|
517
|
+
audited_options[:max_audits] ||= Audited.max_audits
|
507
518
|
end
|
508
519
|
|
509
520
|
def calculate_non_audited_columns
|
data/lib/audited/version.rb
CHANGED
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
|
+
version: 5.7.0
|
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: 2024-
|
16
|
+
date: 2024-08-13 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.2'
|
25
25
|
- - "<"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '8.0'
|
28
28
|
type: :runtime
|
29
29
|
prerelease: false
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
version: '5.2'
|
35
35
|
- - "<"
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
37
|
+
version: '8.0'
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: activesupport
|
40
40
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: '5.2'
|
45
45
|
- - "<"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '8.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '5.2'
|
55
55
|
- - "<"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '
|
57
|
+
version: '8.0'
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: appraisal
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,7 +78,7 @@ dependencies:
|
|
78
78
|
version: '5.2'
|
79
79
|
- - "<"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '8.0'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -88,7 +88,7 @@ dependencies:
|
|
88
88
|
version: '5.2'
|
89
89
|
- - "<"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
91
|
+
version: '8.0'
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: rspec-rails
|
94
94
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.5.
|
236
|
+
rubygems_version: 3.5.11
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Log all changes to your models
|