velocity_audited 5.1.5 → 6.0.4
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/lib/audited/auditor.rb +6 -3
- data/lib/audited/sweeper.rb +7 -7
- data/lib/audited/version.rb +1 -1
- data/velocity_audited-6.0.1.gem +0 -0
- data/velocity_audited-6.0.2.gem +0 -0
- data/velocity_audited-6.0.3.gem +0 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e058582ca733876bad833335b319e2da7351a1a712ec4d4702c16a85973190e2
|
4
|
+
data.tar.gz: 3bb43b22af1c2cb17cd9fe23c927d25e8a084c5aadded00d937c8f2c75e24733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5a0f851ecd39cd7090d16afb241176f7d01252febf0fc11ad0951f08858491d475c9805d4fc8915d33a1612499af294ebfe0ce1209809602eafba3e8534c22e
|
7
|
+
data.tar.gz: 71e71db5ffa01a88a23df2787be6ca5d062a67e1090deb28b256fb88ce6160efc4e39f63cb9ac7e408a47cc384d88668306d8103bde445cb178e1305c1090a1f
|
data/lib/audited/auditor.rb
CHANGED
@@ -309,11 +309,13 @@ module VelocityAudited
|
|
309
309
|
|
310
310
|
def write_audit(attrs)
|
311
311
|
self.audit_comment = nil
|
312
|
-
attrs[:
|
312
|
+
attrs[:log_type] = "db_audit"
|
313
|
+
attrs[:record_id] = id
|
314
|
+
attrs[:model] = self.class.base_class.name
|
313
315
|
attrs = add_metadata(attrs)
|
314
316
|
if auditing_enabled
|
315
317
|
attrs[:associated] = send(audit_associated_with) unless audit_associated_with.nil?
|
316
|
-
logger.
|
318
|
+
logger.info(attrs.to_json)
|
317
319
|
end
|
318
320
|
end
|
319
321
|
|
@@ -321,8 +323,9 @@ module VelocityAudited
|
|
321
323
|
attrs[:client] = ::VelocityAudited.store[:client]
|
322
324
|
attrs[:origin] = ::VelocityAudited.store[:origin]
|
323
325
|
attrs[:user_agent] = ::VelocityAudited.store[:user_agent]
|
324
|
-
attrs[:ip] = ::VelocityAudited.store[:
|
326
|
+
attrs[:ip] = ::VelocityAudited.store[:current_remote_address]
|
325
327
|
attrs[:uid] = ::VelocityAudited.store[:uid]
|
328
|
+
attrs[:request_id] = ::VelocityAudited.store[:request_id]
|
326
329
|
attrs
|
327
330
|
end
|
328
331
|
|
data/lib/audited/sweeper.rb
CHANGED
@@ -8,9 +8,9 @@ module VelocityAudited
|
|
8
8
|
current_user: :current_user,
|
9
9
|
origin: :origin,
|
10
10
|
user_agent: :user_agent,
|
11
|
-
ip: :ip,
|
12
11
|
uid: :uid,
|
13
|
-
client: :client
|
12
|
+
client: :client,
|
13
|
+
request_id: :request_id
|
14
14
|
}
|
15
15
|
|
16
16
|
delegate :store, to: ::VelocityAudited
|
@@ -43,11 +43,7 @@ module VelocityAudited
|
|
43
43
|
def user_agent
|
44
44
|
controller.try(:request).try(:headers)['User-Agent']
|
45
45
|
end
|
46
|
-
|
47
|
-
def ip
|
48
|
-
controller.try(:request).try(:headers)['HTTP_X_FORWARDED_FOR']
|
49
|
-
end
|
50
|
-
|
46
|
+
|
51
47
|
def uid
|
52
48
|
controller.try(:request).try(:headers)['uid']
|
53
49
|
end
|
@@ -56,6 +52,10 @@ module VelocityAudited
|
|
56
52
|
controller.try(:request).try(:headers)['client']
|
57
53
|
end
|
58
54
|
|
55
|
+
def request_id
|
56
|
+
controller.try(:request).try(:uuid)
|
57
|
+
end
|
58
|
+
|
59
59
|
def controller
|
60
60
|
store[:current_controller]
|
61
61
|
end
|
data/lib/audited/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: velocity_audited
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Keepers
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2022-01-18 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
@@ -233,6 +233,9 @@ files:
|
|
233
233
|
- test/install_generator_test.rb
|
234
234
|
- test/test_helper.rb
|
235
235
|
- test/upgrade_generator_test.rb
|
236
|
+
- velocity_audited-6.0.1.gem
|
237
|
+
- velocity_audited-6.0.2.gem
|
238
|
+
- velocity_audited-6.0.3.gem
|
236
239
|
homepage: https://github.com/Velocity-Engineering/audited
|
237
240
|
licenses:
|
238
241
|
- MIT
|