Sha256: 183e691765479d1a4013cfc5650b4eb1779307cf279261f7828824f3e769b677

Contents?: true

Size: 547 Bytes

Versions: 47

Compression:

Stored size: 547 Bytes

Contents

require 'uri'
module Katello
  module KatelloUrlsHelper
    def host(url)
      URI(url).host unless url.nil?
    end

    def subscription_manager_configuration_url(host = nil, rpm = true)
      prefix = if host && host.content_source
                 "http://#{@host.content_source.hostname}"
               else
                 Setting[:foreman_url].sub(/\Ahttps/, 'http')
               end
      config = rpm ? SETTINGS[:katello][:consumer_cert_rpm] : SETTINGS[:katello][:consumer_cert_sh]

      "#{prefix}/pub/#{config}"
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
katello-3.5.2 app/helpers/katello/katello_urls_helper.rb
katello-3.6.0 app/helpers/katello/katello_urls_helper.rb
katello-3.6.0.1.rc2 app/helpers/katello/katello_urls_helper.rb
katello-3.6.0.rc2 app/helpers/katello/katello_urls_helper.rb
katello-3.6.0.rc1 app/helpers/katello/katello_urls_helper.rb
katello-3.5.1.1 app/helpers/katello/katello_urls_helper.rb
katello-3.5.1 app/helpers/katello/katello_urls_helper.rb
katello-3.5.0.1 app/helpers/katello/katello_urls_helper.rb
katello-3.5.0 app/helpers/katello/katello_urls_helper.rb
katello-3.5.0.rc2 app/helpers/katello/katello_urls_helper.rb
katello-3.5.0.rc1 app/helpers/katello/katello_urls_helper.rb
katello-3.4.5 app/helpers/katello/katello_urls_helper.rb
katello-3.4.4 app/helpers/katello/katello_urls_helper.rb
katello-3.4.2 app/helpers/katello/katello_urls_helper.rb
katello-3.4.1 app/helpers/katello/katello_urls_helper.rb
katello-3.4.0.2 app/helpers/katello/katello_urls_helper.rb
katello-3.4.0.1 app/helpers/katello/katello_urls_helper.rb
katello-3.3.2 app/helpers/katello/katello_urls_helper.rb
katello-3.4.0 app/helpers/katello/katello_urls_helper.rb
katello-3.4.0.rc2 app/helpers/katello/katello_urls_helper.rb