shamu 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/shamu/auditing/auditing_service.rb +1 -1
- data/lib/shamu/auditing/list_scope.rb +1 -1
- data/lib/shamu/auditing/logging_auditing_service.rb +1 -3
- data/lib/shamu/auditing/transaction.rb +1 -2
- data/lib/shamu/auditing.rb +0 -1
- data/lib/shamu/version.rb +1 -1
- metadata +1 -2
- data/lib/shamu/auditing/audit_record.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7de984c9428165d200372dc8eb38e8a9cc48958e
|
4
|
+
data.tar.gz: 87b753cfa2ad1e214a6603cbf7d78d19ce7ada40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d776c1c5812138503502f9d3f0e8ac0b9f4c1ccf0f14528153da942d1758d11c733e50aba1c6f98d1c94eaed655caf841c883f716b0ab4dd2ed45d0de7ec32a6
|
7
|
+
data.tar.gz: 881b98c5de187f163c58147b5090a7c73b1b9edd8755c5ddde163ba6955d6b097941fd27f435b9ce3f1af2f5795c1cc13cb891d5756285acb7c8277e2a4d128d
|
data/Gemfile.lock
CHANGED
@@ -18,7 +18,7 @@ module Shamu
|
|
18
18
|
|
19
19
|
# Records an auditable event in persistent storage.
|
20
20
|
# @param [Transaction] transaction
|
21
|
-
# @return [
|
21
|
+
# @return [Result] indicates if logging was successful
|
22
22
|
def commit( transaction )
|
23
23
|
fail NotImplementedError
|
24
24
|
end
|
@@ -4,9 +4,7 @@ module Shamu
|
|
4
4
|
# Writes audit logs to the {Shamu::Logger}.
|
5
5
|
class LoggingAuditingService < Services::Service
|
6
6
|
|
7
|
-
#
|
8
|
-
# @param [Transaction] transaction
|
9
|
-
# @return [AuditRecord] the persisted record.
|
7
|
+
# (see AuditingService#commit)
|
10
8
|
def commit( transaction )
|
11
9
|
logger.unknown "AUDIT TRANSACTION action: #{ transaction.action } entity: #{ transaction.entity_path } by user: #{ transaction.user_id_chain } changes: #{ transaction.changes }" # rubocop:disable Metrics/LineLength
|
12
10
|
end
|
@@ -3,7 +3,6 @@ module Shamu
|
|
3
3
|
|
4
4
|
# An audit record of a discrete change transaction.
|
5
5
|
class Transaction < Services::Request
|
6
|
-
include Shamu::Attributes
|
7
6
|
include Entities::EntityPath
|
8
7
|
|
9
8
|
# ============================================================================
|
@@ -55,4 +54,4 @@ module Shamu
|
|
55
54
|
|
56
55
|
end
|
57
56
|
end
|
58
|
-
end
|
57
|
+
end
|
data/lib/shamu/auditing.rb
CHANGED
data/lib/shamu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shamu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Alexander
|
@@ -239,7 +239,6 @@ files:
|
|
239
239
|
- lib/shamu/attributes/validators/valid_validator.rb
|
240
240
|
- lib/shamu/auditing.rb
|
241
241
|
- lib/shamu/auditing/README.md
|
242
|
-
- lib/shamu/auditing/audit_record.rb
|
243
242
|
- lib/shamu/auditing/auditing_service.rb
|
244
243
|
- lib/shamu/auditing/list_scope.rb
|
245
244
|
- lib/shamu/auditing/logging_auditing_service.rb
|
@@ -1,32 +0,0 @@
|
|
1
|
-
module Shamu
|
2
|
-
module Auditing
|
3
|
-
class AuditRecord < Entities::Entity
|
4
|
-
|
5
|
-
# ============================================================================
|
6
|
-
# @!group Attributes
|
7
|
-
#
|
8
|
-
|
9
|
-
model :record
|
10
|
-
|
11
|
-
# @!attribute
|
12
|
-
# @return [Integer]
|
13
|
-
attribute :id, on: :record
|
14
|
-
|
15
|
-
# @!attribute
|
16
|
-
# @return [String] an {EntityPath} from the root to the target entity.
|
17
|
-
attribute :entity_path, on: :record
|
18
|
-
|
19
|
-
# @!attribute
|
20
|
-
# @return [Time] when the transaction occured.
|
21
|
-
attribute :timestamp, on: :record
|
22
|
-
|
23
|
-
# @!attribute
|
24
|
-
# @return [Hash] the changes requested.
|
25
|
-
attribute :changes, on: :record
|
26
|
-
|
27
|
-
#
|
28
|
-
# @!endgroup Attributes
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|