Class: Katello::RepoDiscovery

Inherits:
Object
  • Object
show all
Includes:
Util::HttpProxy
Defined in:
app/lib/katello/repo_discovery.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::HttpProxy

#proxy, #proxy_host, #proxy_port, #proxy_scheme, #proxy_uri

Class Method Details

.class_for(content_type) ⇒ Object



7
8
9
10
11
# File 'app/lib/katello/repo_discovery.rb', line 7

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

Instance Method Details

#uri(url) ⇒ Object



13
14
15
16
17
18
# File 'app/lib/katello/repo_discovery.rb', line 13

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