Sha256: 765a93510d045202b26c826554ece65a52563ddc92ca659be512a5379105a3a1

Contents?: true

Size: 467 Bytes

Versions: 10

Compression:

Stored size: 467 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)
      prefix = if host && host.content_source
                 "http://#{@host.content_source.hostname}"
               else
                 Setting[:foreman_url].sub(/\Ahttps/, 'http')
               end

      "#{prefix}/pub/#{SETTINGS[:katello][:consumer_cert_rpm]}"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katello-2.4.5 app/helpers/katello/katello_urls_helper.rb
katello-2.4.4 app/helpers/katello/katello_urls_helper.rb
katello-2.4.3 app/helpers/katello/katello_urls_helper.rb
katello-2.4.2 app/helpers/katello/katello_urls_helper.rb
katello-3.0.0.rc1 app/helpers/katello/katello_urls_helper.rb
katello-2.4.1 app/helpers/katello/katello_urls_helper.rb
katello-2.4.0 app/helpers/katello/katello_urls_helper.rb
katello-2.4.0.rc3 app/helpers/katello/katello_urls_helper.rb
katello-2.4.0.rc2 app/helpers/katello/katello_urls_helper.rb
katello-2.4.0.rc1 app/helpers/katello/katello_urls_helper.rb