small refactoring

This commit is contained in:
Vokhmin Alexey V 2012-12-29 20:19:11 +04:00
parent 233e22e341
commit e1cc324b9d
1 changed files with 1 additions and 2 deletions

View File

@ -27,8 +27,7 @@ namespace :new_core do
bl = bls.first bl = bls.first
puts "[#{Time.zone.now}] - where build_lists.id #{bl.id}" puts "[#{Time.zone.now}] - where build_lists.id #{bl.id}"
archive = bl.results.find{ |r| r['file_name'] =~ /.*\.tar\.gz$/ } sha1 = bl.results.find{ |r| r['file_name'] =~ /.*\.tar\.gz$/ }['sha1']
sha1 = archive['sha1']
root_folder = "#{bl.save_to_platform.path}/repository/#{bl.arch.name}/main" root_folder = "#{bl.save_to_platform.path}/repository/#{bl.arch.name}/main"
system "cd #{root_folder} && curl -L -O http://file-store.rosalinux.ru/api/v1/file_stores/#{sha1}" system "cd #{root_folder} && curl -L -O http://file-store.rosalinux.ru/api/v1/file_stores/#{sha1}"