Class: Proxy::OpenSCAP::OpenscapHtmlGenerator
- Inherits:
-
ShellWrapper
- Object
- ShellWrapper
- Proxy::OpenSCAP::OpenscapHtmlGenerator
- Defined in:
- lib/smart_proxy_openscap/openscap_html_generator.rb
Instance Method Summary collapse
- #command(in_file, out_file) ⇒ Object
- #failure_message ⇒ Object
- #file_path_in_storage ⇒ Object
- #get_html ⇒ Object
-
#initialize(cname, id, date, digest) ⇒ OpenscapHtmlGenerator
constructor
A new instance of OpenscapHtmlGenerator.
- #out_filename ⇒ Object
Constructor Details
#initialize(cname, id, date, digest) ⇒ OpenscapHtmlGenerator
Returns a new instance of OpenscapHtmlGenerator.
7 8 9 10 11 12 13 |
# File 'lib/smart_proxy_openscap/openscap_html_generator.rb', line 7 def initialize(cname, id, date, digest) @cname = cname @id = id @date = date @digest = digest @script_name = 'smart-proxy-arf-html' end |
Instance Method Details
#command(in_file, out_file) ⇒ Object
23 24 25 |
# File 'lib/smart_proxy_openscap/openscap_html_generator.rb', line 23 def command(in_file, out_file) "#{script_location} #{file_path_in_storage} #{out_file.path}" end |
#failure_message ⇒ Object
27 28 29 |
# File 'lib/smart_proxy_openscap/openscap_html_generator.rb', line 27 def "Failure when running script which generates html reports" end |
#file_path_in_storage ⇒ Object
31 32 33 34 35 |
# File 'lib/smart_proxy_openscap/openscap_html_generator.rb', line 31 def file_path_in_storage path_to_dir = Proxy::OpenSCAP::Plugin.settings.reportsdir storage = Proxy::OpenSCAP::StorageFs.new(path_to_dir, @cname, @id, @date) storage.get_path(@digest) end |
#get_html ⇒ Object
15 16 17 |
# File 'lib/smart_proxy_openscap/openscap_html_generator.rb', line 15 def get_html execute_shell_command end |
#out_filename ⇒ Object
19 20 21 |
# File 'lib/smart_proxy_openscap/openscap_html_generator.rb', line 19 def out_filename "#{super}-#{@cname}-#{@id}-#{@date}-#{@digest}-" end |