Class: Content::RepositoryClone

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Orchestration::Pulp::Clone
Defined in:
app/models/content/repository_clone.rb

Constant Summary collapse

REPO_PREFIX =
'/pulp/repos/'

Instance Method Summary collapse

Instance Method Details

#full_pathObject



22
23
24
25
26
27
# File 'app/models/content/repository_clone.rb', line 22

def full_path
  pulp_url = URI.parse(Setting.pulp_url)
  scheme   = (unprotected ? 'http' : 'https')
  port     = (pulp_url.port == 443 || pulp_url.port == 80 ? "" : ":#{pulp_url.port}")
  "#{scheme}://#{pulp_url.host}#{port}#{REPO_PREFIX}#{relative_path}"
end