From d0179d03b604e079718e7a07da01505c0a7165e5 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 5 Dec 2012 14:56:59 +0400 Subject: [PATCH] #751: add url to file-store into the application.yml --- app/views/platforms/product_build_lists/_results.html.haml | 3 +-- bin/file-store.rb | 2 +- lib/abf_worker/rpm_worker_observer.rb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/platforms/product_build_lists/_results.html.haml b/app/views/platforms/product_build_lists/_results.html.haml index dae2dc053..228bfc64d 100644 --- a/app/views/platforms/product_build_lists/_results.html.haml +++ b/app/views/platforms/product_build_lists/_results.html.haml @@ -13,8 +13,7 @@ %tr - sha1 = item['sha1'] - filename = item['file_name'] - - url = 'http://file-store.rosalinux.ru/api/v1/file_stores/' - - url << sha1 + - url = "#{APP_CONFIG['file_store_url']}/#{sha1}" - url << '.log?show=true' if filename =~ /.*\.(log|txt)$/ %td= link_to filename, url %td= sha1 diff --git a/bin/file-store.rb b/bin/file-store.rb index 390121568..631b0067a 100755 --- a/bin/file-store.rb +++ b/bin/file-store.rb @@ -9,7 +9,7 @@ old_sources = if File.exist? abf_yml [] end #MAX_SIZE = 2 * 1024 * 1024 # 2.megabytes -url = 'http://file-store.rosalinux.ru/api/v1/file_stores.json' +url = "#{APP_CONFIG['file_store_url']}.json" #url = 'http://localhost:3001/api/v1/file_stores.json' rclient = RestClient::Resource.new(url, :user => ARGF.argv[0]) # user auth token diff --git a/lib/abf_worker/rpm_worker_observer.rb b/lib/abf_worker/rpm_worker_observer.rb index 811b85261..854d8acfa 100644 --- a/lib/abf_worker/rpm_worker_observer.rb +++ b/lib/abf_worker/rpm_worker_observer.rb @@ -49,7 +49,7 @@ module AbfWorker select{ |r| r['file_name'] !~ /.*\.log$/ }.first sha1 = container ? container['sha1'] : nil bl.results = options['results'] - bl.container_path = "http://file-store.rosalinux.ru/api/v1/file_stores/#{sha1}" if sha1 + bl.container_path = "#{APP_CONFIG['file_store_url']}/#{sha1}" if sha1 bl.save! end end