Sha256: 6112c2de266c37a89e01570b0ff439ab5bec33d5e281d9cc48533cb6950914ea

Contents?: true

Size: 969 Bytes

Versions: 14

Compression:

Stored size: 969 Bytes

Contents

require 'smart_proxy_openscap/storage_fs'
require 'smart_proxy_openscap/shell_wrapper'

module Proxy
  module OpenSCAP
    class OpenscapHtmlGenerator < ShellWrapper
      def initialize(cname, id, date, digest)
        @cname = cname
        @id = id
        @date = date
        @digest = digest
        @script_name = 'smart-proxy-arf-html'
      end

      def get_html
        execute_shell_command
      end

      def out_filename
        "#{super}-#{@cname}-#{@id}-#{@date}-#{@digest}-"
      end

      def command(in_file, out_file)
        "#{script_location} #{file_path_in_storage} #{out_file.path}"
      end

      def failure_message
        "Failure when running script which generates html reports"
      end

      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
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
smart_proxy_openscap-0.7.5 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.8.1 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.8.0 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.7.4 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.7.3 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.7.2 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.7.1 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.7.0 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.6.11 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.6.10 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.6.9 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.6.8 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.6.7 lib/smart_proxy_openscap/openscap_html_generator.rb
smart_proxy_openscap-0.6.6 lib/smart_proxy_openscap/openscap_html_generator.rb