Set STORAGE_URL during initialization

This commit is contained in:
Guillaume Lazzara 2016-07-05 11:50:45 +02:00
parent dfbd584b74
commit aebc673cdc
3 changed files with 4 additions and 4 deletions

View file

@ -1,11 +1,9 @@
class RemoteDownloader
DEST_URL = "https://storage.apientreprise.fr/" + CarrierWave::Uploader::Base.fog_directory + '/'
def initialize(filename)
@filename = filename
end
def url
@url ||= File.join(DEST_URL, @filename)
@url ||= File.join(STORAGE_URL, @filename)
end
end

View file

@ -72,7 +72,8 @@ set :shared_paths, [
"config/unicorn.rb",
"config/initializers/raven.rb",
'config/france_connect.yml',
'config/initializers/mailjet.rb'
'config/initializers/mailjet.rb',
'config/initializers/storage_url.rb'
]

View file

@ -0,0 +1 @@
STORAGE_URL = "https://storage.apientreprise.fr/" + CarrierWave::Uploader::Base.fog_directory + '/'