mrsk 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mrsk/commands/auditor.rb +10 -10
- data/lib/mrsk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba5c8ba9da8547dd3ca0e986f41304de9155100135392e23028c7d820d593e2c
|
4
|
+
data.tar.gz: 677ac4a60d8a494bb8ef20abb0993750a846eb5ea86c7ca2060b042dcdda846a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88a8e0b9ac488cc4b3e5dd634b7a474d522b2f26c2e751998026b077676a8867f7f2837327a3b864328440c1a852929f81691aafd301f6a887b299a8b4d133f1
|
7
|
+
data.tar.gz: 65508caaa6955884c408494f9c9ac42df5921b8fc183301406854a411088a7fbfefef3572b74cf109d213fa4b4985d5b878ce9ef66bda6eb346c80c5e404a95c
|
@@ -4,7 +4,7 @@ class Mrsk::Commands::Auditor < Mrsk::Commands::Base
|
|
4
4
|
# Runs remotely
|
5
5
|
def record(line)
|
6
6
|
append \
|
7
|
-
[ :echo,
|
7
|
+
[ :echo, tagged_record_line(line) ],
|
8
8
|
audit_log_file
|
9
9
|
end
|
10
10
|
|
@@ -12,7 +12,7 @@ class Mrsk::Commands::Auditor < Mrsk::Commands::Base
|
|
12
12
|
def broadcast(line)
|
13
13
|
if broadcast_cmd = config.audit_broadcast_cmd
|
14
14
|
pipe \
|
15
|
-
[ :echo,
|
15
|
+
[ :echo, tagged_broadcast_line(line) ],
|
16
16
|
broadcast_cmd
|
17
17
|
end
|
18
18
|
end
|
@@ -26,19 +26,19 @@ class Mrsk::Commands::Auditor < Mrsk::Commands::Base
|
|
26
26
|
"mrsk-#{config.service}-audit.log"
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
30
|
-
"'#{
|
29
|
+
def tagged_record_line(line)
|
30
|
+
"'#{recorded_at_tag} #{performer_tag} #{line}'"
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
34
|
-
"
|
33
|
+
def tagged_broadcast_line(line)
|
34
|
+
"'#{performer_tag} #{line}'"
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
|
37
|
+
def performer_tag
|
38
|
+
"[#{`whoami`.strip}]"
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
42
|
-
Time.now.to_fs(:db)
|
41
|
+
def recorded_at_tag
|
42
|
+
"[#{Time.now.to_fs(:db)}]"
|
43
43
|
end
|
44
44
|
end
|
data/lib/mrsk/version.rb
CHANGED