* Update Travis.yml * Update README * Update README * Adjust test to not rely on env vars * Update encryption * Refactor * Update env key * Stub AWS calls * Create ApplicationConfig * Fix specs * Fix lint * Update ApplicationConfig * Remove travis env vars * Fix lint * Extend character limit to 100 * Add env to travis * Take out auto-restart after deploy * Immediately discarded test cache * Stub GA in request specs * Stub Pusher * Fix broken specs * Update fixture * Add CodeClimate id * Change CodeClimate key * Remove merge mistakes * WIP * Add Envied gem & Change README * Add missing keys * Add missing key * Update fixture * Fix broken spec * Add Slack Notification for Travis * Fix wording * Fix typo
19 lines
565 B
Ruby
19 lines
565 B
Ruby
require "carrierwave/storage/abstract"
|
|
require "carrierwave/storage/file"
|
|
require "carrierwave/storage/fog"
|
|
|
|
CarrierWave.configure do |config|
|
|
if Rails.env.development? || Rails.env.test?
|
|
config.storage = :file
|
|
else
|
|
# config.fog_provider = 'fog-aws'
|
|
config.storage = :fog
|
|
config.fog_credentials = {
|
|
provider: "AWS",
|
|
aws_access_key_id: ApplicationConfig["AWS_ID"],
|
|
aws_secret_access_key: ApplicationConfig["AWS_SECRET"],
|
|
region: "us-east-1",
|
|
}
|
|
config.fog_directory = ApplicationConfig["AWS_BUCKET_NAME"]
|
|
end
|
|
end
|