stream_auditor 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stream_auditor.rb +10 -7
- data/lib/stream_auditor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8488edaba8fccd140d3d180c6c62f673a72b7de
|
4
|
+
data.tar.gz: 33ca4e621d0840c20cf70faf122c29c81a920ea0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 619ec08f251c7cbf22a22741b6de277dd323b543b1a71cfe46dc8eeb1ae88d1f89803981e8b0e67ece338bd8eef0799f1f70e19828ede70d8fa8a5b9477dd676
|
7
|
+
data.tar.gz: 271e6439e3881fe8e74f9a65e0337b3ed360b8da3876c929499d51b2f8fad753979ac7cb0f7de9e7a58cc12051c1bf911ab5ac905223719197cd729a1ca4887d
|
data/lib/stream_auditor.rb
CHANGED
@@ -7,10 +7,10 @@ require "fileutils"
|
|
7
7
|
#
|
8
8
|
# This implementation supports auditing to:
|
9
9
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
10
|
+
# * an already open {IO} object (or anything that implements +IO#<<+ and +IO#flush+),
|
11
|
+
# * the standard error stream ($stderr),
|
12
|
+
# * the standard output stream ($stdout), or
|
13
|
+
# * a file.
|
14
14
|
#
|
15
15
|
# Developers should not need to work directly with this class. Instead, they should configure it through the
|
16
16
|
# {http://www.rubydoc.info/gems/soar_auditing_provider/SoarAuditingProvider/AuditingProvider SOAR auditing provider}.
|
@@ -50,7 +50,7 @@ class StreamAuditor < SoarAuditorApi::AuditorAPI
|
|
50
50
|
# The stream is immediately flushed after the data is written.
|
51
51
|
#
|
52
52
|
# @param [Object] data
|
53
|
-
# the
|
53
|
+
# the +String+ (or +Object+ with +to_s+ method) to write.
|
54
54
|
# If the string is not newline-terminated, a newline is added.
|
55
55
|
#
|
56
56
|
def audit(data)
|
@@ -59,7 +59,7 @@ class StreamAuditor < SoarAuditorApi::AuditorAPI
|
|
59
59
|
end
|
60
60
|
|
61
61
|
##
|
62
|
-
# Apply the configuration supplied to {#initialize}
|
62
|
+
# Apply the configuration supplied to {http://www.rubydoc.info/gems/soar_auditor_api/SoarAuditorApi/AuditorAPI#initialize-instance_method initialize}
|
63
63
|
#
|
64
64
|
# @param [Hash] configuration
|
65
65
|
# This method accepts +nil+ or a {Hash}, but the auditor API only calls
|
@@ -69,7 +69,8 @@ class StreamAuditor < SoarAuditorApi::AuditorAPI
|
|
69
69
|
#
|
70
70
|
# * +adaptor+ - ignored (for compatibility with the SOAR auditing provider
|
71
71
|
# * +stream+ - the stream to audit to, one of:
|
72
|
-
#
|
72
|
+
#
|
73
|
+
# * an {IO} object (or anything that implements +IO#<<+ and +IO#flush+)
|
73
74
|
# * the string +$stderr+ for the standard error stream
|
74
75
|
# * the string +$stdout+ for the standard output stream
|
75
76
|
# * the string path to a file
|
@@ -103,6 +104,8 @@ class StreamAuditor < SoarAuditorApi::AuditorAPI
|
|
103
104
|
# @return [true] if the configuration is valid
|
104
105
|
# @return [false] if the configuration is invalid
|
105
106
|
#
|
107
|
+
# @see #configure
|
108
|
+
#
|
106
109
|
def configuration_is_valid?(configuration)
|
107
110
|
return false unless (configuration.keys - ["adaptor", "stream"]).empty?
|
108
111
|
|