Sha256: ad114bd8e36be91fbbd39b32f8d7984001a0789ba46c6b7c23320c0828f464ca

Contents?: true

Size: 560 Bytes

Versions: 16

Compression:

Stored size: 560 Bytes

Contents

require 'uri'

module Katello
  class RepoDiscovery
    include Katello::Util::HttpProxy

    def self.class_for(content_type)
      repo_discovery_class = RepositoryTypeManager.find_repository_type(content_type)&.repo_discovery_class
      fail _("Content type does not support repo discovery") unless repo_discovery_class
      repo_discovery_class
    end

    def uri(url)
      #add a / on the end, as directories require it or else
      #  They will get double slahes on them
      url += '/' unless url.ends_with?('/')
      URI(url)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-4.16.0 app/lib/katello/repo_discovery.rb
katello-4.15.1 app/lib/katello/repo_discovery.rb
katello-4.16.0.rc2 app/lib/katello/repo_discovery.rb
katello-4.16.0.rc1 app/lib/katello/repo_discovery.rb
katello-4.14.3 app/lib/katello/repo_discovery.rb
katello-4.14.2 app/lib/katello/repo_discovery.rb
katello-4.15.0 app/lib/katello/repo_discovery.rb
katello-4.15.0.rc2 app/lib/katello/repo_discovery.rb
katello-4.15.0.rc1 app/lib/katello/repo_discovery.rb
katello-4.14.1 app/lib/katello/repo_discovery.rb
katello-4.14.0 app/lib/katello/repo_discovery.rb
katello-4.14.0.rc3 app/lib/katello/repo_discovery.rb
katello-4.14.0.rc2 app/lib/katello/repo_discovery.rb
katello-4.14.0.rc1.1 app/lib/katello/repo_discovery.rb
katello-4.14.0.rc1 app/lib/katello/repo_discovery.rb
katello-4.13.1 app/lib/katello/repo_discovery.rb