#133: added comments

This commit is contained in:
Vokhmin Alexey V 2013-05-16 21:44:56 +04:00
parent da288fb843
commit c6178a81ab
2 changed files with 3 additions and 6 deletions

View File

@ -409,12 +409,6 @@ class BuildList < ActiveRecord::Base
repos = include_repos
include_repos_hash = {}.tap do |h|
Repository.where(:id => (repos | (extra_repositories || [])) ).each do |repo|
# Path looks like:
# http://abf-downloads.rosalinux.ru/rosa-server2012/repository/x86_64/base/
# http://abf-downloads.rosalinux.ru/uname_personal/repository/rosa-server2012/x86_64/base/
# so, we should append:
# - release
# - updates
path = repo.platform.public_downloads_url(
repo.platform.main? ? nil : build_for_platform.name,
arch.name,

View File

@ -91,6 +91,9 @@ class Platform < ActiveRecord::Base
Rails.root.join("public", "downloads", name)
end
# Returns URL to repository, for example:
# - http://abf-downloads.rosalinux.ru/rosa-server2012/repository/x86_64/base/
# - http://abf-downloads.rosalinux.ru/uname_personal/repository/rosa-server2012/x86_64/base/
def public_downloads_url(subplatform_name = nil, arch = nil, repo = nil)
"#{APP_CONFIG['downloads_url']}/#{name}/repository/".tap do |url|
url << "#{subplatform_name}/" if subplatform_name.present?