diff --git a/config/initializers/refile.rb b/config/initializers/refile.rb index 2219825..2372c6a 100644 --- a/config/initializers/refile.rb +++ b/config/initializers/refile.rb @@ -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}" diff --git a/lib/trough/version.rb b/lib/trough/version.rb index 8631243..9bb9d77 100644 --- a/lib/trough/version.rb +++ b/lib/trough/version.rb @@ -1,3 +1,3 @@ module Trough - VERSION = "0.0.13" + VERSION = "0.0.14" end