soar_auditor_api 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bdd6be68ece98c0610628dce3167f1299be0810
4
- data.tar.gz: 365ab594446d745fd2a45d3500ce648a4213b402
3
+ metadata.gz: 7a9ba1d77677113f3375191caebf327bfad36f1f
4
+ data.tar.gz: 9efa8269bab0e41e31cf15abecc2db0c7101dda4
5
5
  SHA512:
6
- metadata.gz: a8d3284e09c4462375862dd7201dffea6c416a0db3760fe0bc5389c00ea520fc4eb28b66e1f5b83f4e9a5462fcc5da52603ec99b803fa62fe4e0889f56465803
7
- data.tar.gz: 7973c66cc47ea40b056633a512cf0cafa67ee38489274149bb9383a9b4903aaf3299d2c841e9706c8365d2f3ced37524e35f7b609f1fd17ff6229b7f63abbec1
6
+ metadata.gz: ce4b59f664afa5a328b908e2bd0ceff3024e64911299815ff0e364fa9617eeadd1ab56b2daa17ccd3023970aa5ad858cf6d41489db01674a6f2ac1feaf7df3a0
7
+ data.tar.gz: d2ba12493e66420f096e423d7aa78ae2e93e9176e95b0eaa1fca36fb730fdbc3355ae15648460ef701ae08895d2aa0369c49b10ce44c0c0ccd957956fa083949
data/README.md CHANGED
@@ -4,7 +4,10 @@ This gem provides the auditor api for the SOAR architecture.
4
4
 
5
5
  ## State of the API
6
6
 
7
- This API is still a work in progress but should be sufficient to most auditors
7
+ This API is still a work in progress but should be sufficient for most auditors
8
+
9
+ Future work:
10
+ * The API should support the reformating of timestamps to a standardized ISO8601 format.
8
11
 
9
12
  ## Installation
10
13
 
@@ -13,7 +13,7 @@ module SoarAuditorApi
13
13
  end
14
14
 
15
15
  def configure(configuration = nil)
16
- raise ArgumentError, "Invalid configuration provided" unless configuration_is_valid(configuration)
16
+ raise ArgumentError, "Invalid configuration provided" unless configuration_is_valid?(configuration)
17
17
  @configuration = configuration
18
18
  end
19
19
 
@@ -23,32 +23,32 @@ module SoarAuditorApi
23
23
  end
24
24
 
25
25
  def debug(data)
26
- audit(DEBUG_PREFIX + data.to_s) if audit_filtered(:debug)
26
+ audit(DEBUG_PREFIX + data.to_s) if audit_filtered_out?(:debug)
27
27
  end
28
28
 
29
29
  def <<(data)
30
- audit(INFO_PREFIX + data.to_s) if audit_filtered(:info)
30
+ audit(INFO_PREFIX + data.to_s) if audit_filtered_out?(:info)
31
31
  end
32
32
 
33
33
  def info(data)
34
- audit(INFO_PREFIX + data.to_s) if audit_filtered(:info)
34
+ audit(INFO_PREFIX + data.to_s) if audit_filtered_out?(:info)
35
35
  end
36
36
 
37
37
  def warn(data)
38
- audit(WARN_PREFIX + data.to_s) if audit_filtered(:warn)
38
+ audit(WARN_PREFIX + data.to_s) if audit_filtered_out?(:warn)
39
39
  end
40
40
 
41
41
  def error(data)
42
- audit(ERROR_PREFIX + data.to_s) if audit_filtered(:error)
42
+ audit(ERROR_PREFIX + data.to_s) if audit_filtered_out?(:error)
43
43
  end
44
44
 
45
45
  def fatal(data)
46
- audit(FATAL_PREFIX + data.to_s) if audit_filtered(:fatal)
46
+ audit(FATAL_PREFIX + data.to_s) if audit_filtered_out?(:fatal)
47
47
  end
48
48
 
49
49
  #Safety to ensure that the Auditor that extends this API implements this IOC method
50
- def configuration_is_valid(configuration)
51
- raise NotImplementedError, "Method must implement configuration_is_valid method in Auditor extending the API"
50
+ def configuration_is_valid?(configuration)
51
+ raise NotImplementedError, "Method must implement configuration_is_valid? method in Auditor extending the API"
52
52
  end
53
53
 
54
54
  #Safety to ensure that the Auditor that extends this API implements this IOC method
@@ -58,7 +58,7 @@ module SoarAuditorApi
58
58
 
59
59
  private
60
60
 
61
- def audit_filtered(audit_level)
61
+ def audit_filtered_out?(audit_level)
62
62
  return @audit_levels.index(@minimum_audit_level) <= @audit_levels.index(audit_level)
63
63
  end
64
64
  end
@@ -1,3 +1,3 @@
1
1
  module SoarAuditorApi
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'byebug'
4
- gem 'soar_auditor_api', '~> 0.0.4'
4
+ gem 'soar_auditor_api', "~> 0.0.5"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_auditor_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler