Sha256: 48b1491b7257e259e7a781d031abcb01ce9b94feef6744af48725213c642b40e

Contents?: true

Size: 448 Bytes

Versions: 10

Compression:

Stored size: 448 Bytes

Contents

module ForemanOpenscap
  module LogExtensions
    extend ActiveSupport::Concern
    included do
      SCAP_RESULT = %w(pass fail error unknown notapplicable notchecked notselected informational fixed)
      validate :scap_result
    end

    private

    def scap_result
      if report.is_a? ForemanOpenscap::ArfReport
        errors.add(:result, _('is not included in SCAP_RESULT')) unless SCAP_RESULT.include? result
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_openscap-0.7.1 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.7 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.0 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.6 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.5 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.4 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.3 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.2 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.1 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.6.0 app/models/concerns/foreman_openscap/log_extensions.rb