Class: Content::PulpConfiguration

Inherits:
Object
  • Object
show all
Defined in:
app/services/content/pulp_configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PulpConfiguration

Returns a new instance of PulpConfiguration.



5
6
7
# File 'app/services/content/pulp_configuration.rb', line 5

def initialize options = {}
  Runcible::Base.config = runcible_config.merge(options)
end

Instance Method Details

#runcible_configObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/services/content/pulp_configuration.rb', line 9

def runcible_config
  pulp_url = URI(Setting.pulp_url)
  {
    :url          => "#{pulp_url.scheme}://#{pulp_url.host}:#{pulp_url.port}",
    :api_path     => pulp_url.path,
    :user         => "admin",
    :timeout      => 60,
    :open_timeout => 60,
    :oauth        => { :oauth_secret => Setting['pulp_oauth_secret'],
                       :oauth_key    => Setting['pulp_oauth_key'] },
    :logging      => { :logger    => Rails.logger,
                       :exception => true,
                       :debug     => true }
  }
end