Merge pull request #754 from warpc/751-move-link-to-file-store-into-app-config
[refs #751]: add url to file-store into the application.yml
This commit is contained in:
commit
a9e94e1433
|
@ -13,8 +13,7 @@
|
||||||
%tr
|
%tr
|
||||||
- sha1 = item['sha1']
|
- sha1 = item['sha1']
|
||||||
- filename = item['file_name']
|
- filename = item['file_name']
|
||||||
- url = 'http://file-store.rosalinux.ru/api/v1/file_stores/'
|
- url = "#{APP_CONFIG['file_store_url']}/#{sha1}"
|
||||||
- url << sha1
|
|
||||||
- url << '.log?show=true' if filename =~ /.*\.(log|txt)$/
|
- url << '.log?show=true' if filename =~ /.*\.(log|txt)$/
|
||||||
%td= link_to filename, url
|
%td= link_to filename, url
|
||||||
%td= sha1
|
%td= sha1
|
||||||
|
|
|
@ -9,7 +9,7 @@ old_sources = if File.exist? abf_yml
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
#MAX_SIZE = 2 * 1024 * 1024 # 2.megabytes
|
#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'
|
#url = 'http://localhost:3001/api/v1/file_stores.json'
|
||||||
rclient = RestClient::Resource.new(url, :user => ARGF.argv[0]) # user auth token
|
rclient = RestClient::Resource.new(url, :user => ARGF.argv[0]) # user auth token
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ module AbfWorker
|
||||||
select{ |r| r['file_name'] !~ /.*\.log$/ }.first
|
select{ |r| r['file_name'] !~ /.*\.log$/ }.first
|
||||||
sha1 = container ? container['sha1'] : nil
|
sha1 = container ? container['sha1'] : nil
|
||||||
bl.results = options['results']
|
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!
|
bl.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue