diff --git a/.gitignore b/.gitignore index 1b7e28ae3e..4996ff5ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ public/stylesheets public/images public/spree config/abr.yml +config/heroku_env.rb NERD_tree* diff --git a/config/environments/development.rb b/config/environments/development.rb index 173f84b9da..349ffc0a72 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -28,3 +28,8 @@ Openfoodweb::Application.configure do # Expands the lines which load the assets config.assets.debug = true end + + +# Load heroku vars from local file +heroku_env = File.join(Rails.root, 'config', 'heroku_env.rb') +load(heroku_env) if File.exists?(heroku_env) diff --git a/config/initializers/comfortable_mexican_sofa.rb b/config/initializers/comfortable_mexican_sofa.rb index 67872b3276..ee69720dac 100644 --- a/config/initializers/comfortable_mexican_sofa.rb +++ b/config/initializers/comfortable_mexican_sofa.rb @@ -36,9 +36,13 @@ ComfortableMexicanSofa.configure do |config| # filesystem see: http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/Filesystem config.upload_file_options = { :storage => 's3', - :s3_credentials => Rails.root.join('config', 's3.yml') + :s3_credentials => { + :bucket => ENV['S3_BUCKET'], + :access_key_id => ENV['S3_KEY'], + :secret_access_key => ENV['S3_SECRET'] + } } - + # Sofa allows you to setup entire site from files. Database is updated with each # request (if necessary). Please note that database entries are destroyed if there's # no corresponding file. Fixtures are disabled by default. diff --git a/config/s3.yml b/config/s3.yml deleted file mode 100644 index 55742d4434..0000000000 --- a/config/s3.yml +++ /dev/null @@ -1,8 +0,0 @@ -development: - bucket: openfoodweb_test - access_key_id: AKIAJ3EE2EKGP36D4PUA - secret_access_key: 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 -production: - bucket: openfoodweb_production - access_key_id: AKIAJ3EE2EKGP36D4PUA - secret_access_key: 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 \ No newline at end of file