Sha256: 660e7dd9242bd7514ac0d117250dfa7c94d4d2ecff5c52516f690855eabba36b

Contents?: true

Size: 534 Bytes

Versions: 16

Compression:

Stored size: 534 Bytes

Contents

module ForemanOpenscap
  module OpenscapProxyExtensions
    extend ActiveSupport::Concern

    included do
      belongs_to :openscap_proxy, :class_name => "SmartProxy"
    end

    def openscap_proxy_api
      return @openscap_api if @openscap_api
      proxy_url = openscap_proxy.url if openscap_proxy
      raise ::Foreman::Exception.new(N_("No OpenSCAP proxy found for %{class} with %{id}"), { :class => self.class, :id => id }) unless proxy_url
      @openscap_api = ::ProxyAPI::Openscap.new(:url => proxy_url)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_openscap-0.8.1 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.7.5 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.8.0 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.7.4 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.7.3 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.7.2 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.7.1 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.7 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.7.0 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.6 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.5 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.4 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.3 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.2 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.1 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
foreman_openscap-0.6.0 app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb