Class: Proxy::OpenSCAP::ContentParser
Instance Attribute Summary
Attributes inherited from ShellWrapper
#script_name
Instance Method Summary
collapse
#close_unlink, #exception_message, #execute_shell_command, #prepare_in_file, #script_location, #unique_filename
Constructor Details
Returns a new instance of ContentParser.
5
6
7
8
|
# File 'lib/smart_proxy_openscap/content_parser.rb', line 5
def initialize(type)
@type = type
@script_name = 'smart-proxy-scap-validation'
end
|
Instance Method Details
#command(in_file, out_file) ⇒ Object
26
27
28
|
# File 'lib/smart_proxy_openscap/content_parser.rb', line 26
def command(in_file, out_file)
"#{script_location} #{in_file.path} #{out_file.path} #{@type}"
end
|
#failure_message ⇒ Object
22
23
24
|
# File 'lib/smart_proxy_openscap/content_parser.rb', line 22
def failure_message
"Failure when running script which validates scap files"
end
|
#in_filename ⇒ Object
18
19
20
|
# File 'lib/smart_proxy_openscap/content_parser.rb', line 18
def in_filename
"#{super}-#{@type}-validate-"
end
|
#out_filename ⇒ Object
14
15
16
|
# File 'lib/smart_proxy_openscap/content_parser.rb', line 14
def out_filename
"#{in_filename}json-"
end
|
#validate(scap_file) ⇒ Object
10
11
12
|
# File 'lib/smart_proxy_openscap/content_parser.rb', line 10
def validate(scap_file)
execute_shell_command scap_file
end
|