Skip to content

Commit

Permalink
Merge pull request #4 from Yoomee/bug/aws-config-testing
Browse files Browse the repository at this point in the history
remove requirement for S3 setup in text env
  • Loading branch information
gr-eg authored Jun 17, 2016
2 parents 1ff6d5d + 8b5a76c commit ba3f953
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions config/initializers/refile.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
require "refile/s3"

aws = {
access_key_id: ENV['S3_ACCESS_KEY_ID'],
secret_access_key: ENV['S3_SECRET_ACCESS_KEY'],
region: ENV['S3_REGION'],
bucket: ENV['S3_BUCKET_NAME']
}
unless Rails.env.test?
aws = {
access_key_id: ENV['S3_ACCESS_KEY_ID'],
secret_access_key: ENV['S3_SECRET_ACCESS_KEY'],
region: ENV['S3_REGION'],
bucket: ENV['S3_BUCKET_NAME']
}
Refile.cache = Refile::S3.new(prefix: "cache", **aws)
Refile.store = Refile::S3.new(prefix: "store", **aws)
end

Refile.cache = Refile::S3.new(prefix: "cache", **aws)
Refile.store = Refile::S3.new(prefix: "store", **aws)
Refile.automount = false
Refile.mount_point = "/refile-#{Trough.configuration.mount_path}"
2 changes: 1 addition & 1 deletion lib/trough/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Trough
VERSION = "0.0.13"
VERSION = "0.0.14"
end

0 comments on commit ba3f953

Please sign in to comment.