soar_auditing_provider 1.4.0 → 1.5.0

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: df131b281699cdc2eddac9b0afc0765f15363fb1
4
- data.tar.gz: 9ef206637e1d09ef928c6b02c712051b6f47d86d
3
+ metadata.gz: acb15ef52a97ecdc11189901877a4111ce3951cb
4
+ data.tar.gz: 4c61680ebb1297cd2566586abdb1378870323ca9
5
5
  SHA512:
6
- metadata.gz: 5d9f18bbc8a4c529066e6373052b29c3c00be530b839cc9e657909b8a4d771df2b07a780076b7036ad0a71254b5562c4db30aeeff58f235b41ec9434bbe5d503
7
- data.tar.gz: 41aa9185c50b3c5093806957131ff8e4305486f0f09a695cd32a375093b2ca7c0e1306ee08e76dd85dd5ebcc7d8e1711aa9d09546a1f593b41f7e581048c470d
6
+ metadata.gz: 495a6b27261159f6b4d73241db05e70a56bcef0f004d8c172aa386474e10e9135c9494c597b8fcf26c43e0cf0e1600d258806121682683bbe285a645d3879271
7
+ data.tar.gz: a01384116b2f274a6baf1e6e126371025eb1aa3f219aef3c6cb01948d766cac5d129034abce0f99452557fed5cc1f6a67a871615b4c60648760021f5140f2bde
@@ -17,6 +17,8 @@ module SoarAuditingProvider
17
17
 
18
18
  public
19
19
 
20
+ DEFAULT_FLOW_ID_GENERATOR = -> { SoarFlow::ID::generate_flow_id } unless defined?(DEFAULT_FLOW_ID_GENERATOR)
21
+
20
22
  attr_accessor :startup_flow_id
21
23
  attr_accessor :service_identifier
22
24
  attr_reader :configuration
@@ -24,6 +26,7 @@ module SoarAuditingProvider
24
26
  def initialize(configuration)
25
27
  validate_provider_configuration(configuration)
26
28
  @configuration = configuration
29
+ @flow_id_generator = @configuration["flow_id_generator"] || DEFAULT_FLOW_ID_GENERATOR
27
30
  super(create_auditors(configuration))
28
31
  select_auditor(configuration['default_nfrs'])
29
32
  create_auditing_worker
@@ -45,27 +48,25 @@ module SoarAuditingProvider
45
48
  end
46
49
 
47
50
  def debug(data, flow_identifier = nil)
48
- audit(:debug, format(:debug, prepend_caller_information(data), flow_identifier))
51
+ audit(:debug, data, flow_identifier)
49
52
  end
50
53
 
51
54
  def info(data, flow_identifier = nil)
52
- audit(:info, format(:info, prepend_caller_information(data), flow_identifier))
55
+ audit(:info, data, flow_identifier)
53
56
  end
54
57
 
58
+ alias_method :<<, :info
59
+
55
60
  def warn(data, flow_identifier = nil)
56
- audit(:warn, format(:warn, prepend_caller_information(data), flow_identifier))
61
+ audit(:warn, data, flow_identifier)
57
62
  end
58
63
 
59
64
  def error(data, flow_identifier = nil)
60
- audit(:error, format(:error, prepend_caller_information(data), flow_identifier))
65
+ audit(:error, data, flow_identifier)
61
66
  end
62
67
 
63
68
  def fatal(data, flow_identifier = nil)
64
- audit(:fatal, format(:fatal, prepend_caller_information(data), flow_identifier))
65
- end
66
-
67
- def <<(data, flow_identifier = nil)
68
- audit(:info, format(:info, prepend_caller_information(data), flow_identifier))
69
+ audit(:fatal, data, flow_identifier)
69
70
  end
70
71
 
71
72
  def detailed_status
@@ -110,7 +111,13 @@ module SoarAuditingProvider
110
111
  flush
111
112
  end
112
113
 
113
- def audit(level, data)
114
+ def audit(level, data, flow_identifier = nil)
115
+ flow_identifier ||= @flow_id_generator.call
116
+ formatted_data = format(level, prepend_caller_information(data), flow_identifier)
117
+ audit_formatted(level, formatted_data)
118
+ end
119
+
120
+ def audit_formatted(level, data)
114
121
  if 'true' == @configuration['direct_auditor_call']
115
122
  super_class_caller(level, data)
116
123
  else
@@ -1,3 +1,3 @@
1
1
  module SoarAuditingProvider
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -23,11 +23,11 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'rspec', '~> 3.0'
24
24
  spec.add_development_dependency 'byebug', '~> 9.0.5'
25
25
  spec.add_development_dependency 'log4r_auditor', '~> 1.0.0'
26
- spec.add_development_dependency 'soar_flow', '~> 0.1.1'
27
26
  spec.add_development_dependency 'soar_xt', '~> 0.0.3'
28
27
 
29
28
  spec.add_dependency 'soar_auditing_provider_api', '~> 0.9.0'
30
29
  spec.add_dependency 'soar_auditing_format', '~> 0.0.5'
30
+ spec.add_dependency 'soar_flow', '~> 0.1.1'
31
31
  spec.add_dependency 'soar_thread_worker', '~> 0.2.0'
32
32
  spec.add_dependency 'soar_configured_factory', '~> 0.1.0'
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_auditing_provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-10-25 00:00:00.000000000 Z
12
+ date: 2017-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -82,61 +82,61 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  version: 1.0.0
84
84
  - !ruby/object:Gem::Dependency
85
- name: soar_flow
85
+ name: soar_xt
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 0.1.1
90
+ version: 0.0.3
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 0.1.1
97
+ version: 0.0.3
98
98
  - !ruby/object:Gem::Dependency
99
- name: soar_xt
99
+ name: soar_auditing_provider_api
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 0.0.3
105
- type: :development
104
+ version: 0.9.0
105
+ type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: 0.0.3
111
+ version: 0.9.0
112
112
  - !ruby/object:Gem::Dependency
113
- name: soar_auditing_provider_api
113
+ name: soar_auditing_format
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: 0.9.0
118
+ version: 0.0.5
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: 0.9.0
125
+ version: 0.0.5
126
126
  - !ruby/object:Gem::Dependency
127
- name: soar_auditing_format
127
+ name: soar_flow
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: 0.0.5
132
+ version: 0.1.1
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: 0.0.5
139
+ version: 0.1.1
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: soar_thread_worker
142
142
  requirement: !ruby/object:Gem::Requirement
@@ -223,3 +223,4 @@ signing_key:
223
223
  specification_version: 4
224
224
  summary: SOAR architecture auditing provider
225
225
  test_files: []
226
+ has_rdoc: