Sha256: fd4b89ddeb612d63bcf4749f7766599756770de713b73b42668d05d402c837ed

Contents?: true

Size: 455 Bytes

Versions: 27

Compression:

Stored size: 455 Bytes

Contents

module ForemanOpenscap
  module LogExtensions
    extend ActiveSupport::Concern
    included do
      SCAP_RESULT = %w[pass fail error unknown notapplicable notchecked notselected informational fixed].freeze
      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

27 entries across 27 versions & 1 rubygems

Version Path
foreman_openscap-0.10.4 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.10.3 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.10.2 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.10.1 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.9.3 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.10.0 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.13 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.8.6 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.9.2 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.9.1 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.8.5 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.12 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.9.0 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.8.4 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.11 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.10 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.8.3 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.9 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.8 app/models/concerns/foreman_openscap/log_extensions.rb
foreman_openscap-0.7.7 app/models/concerns/foreman_openscap/log_extensions.rb