lib/effective_assets.rb in effective_assets-1.6.2 vs lib/effective_assets.rb in effective_assets-1.6.3
- old
+ new
@@ -1,14 +1,17 @@
require 'carrierwave-aws'
require 'delayed_job_active_record'
-require 'migrant' # Required for rspec to run properly
require 'jquery-fileupload-rails'
require 'haml-rails'
require 'effective_assets/engine'
require 'effective_assets/version'
module EffectiveAssets
+ AWS_PUBLIC = 'public-read'
+ AWS_PRIVATE = 'authenticated-read'
+ IFRAME_UPLOADS = 'effective_iframe_uploads'
+
# The following are all valid config keys
mattr_accessor :assets_table_name
mattr_accessor :attachments_table_name
mattr_accessor :uploader
@@ -47,10 +50,10 @@
def self.configure_carrierwave
if (@carrierwave_configured != true) && EffectiveAssets.uploader.present? && EffectiveAssets.aws_bucket.present?
CarrierWave.configure do |config|
config.storage = :aws
config.aws_bucket = EffectiveAssets.aws_bucket
- config.aws_acl = EffectiveAssets.aws_acl.presence || 'public-read'
+ config.aws_acl = EffectiveAssets.aws_acl.presence || EffectiveAssets::AWS_PUBLIC
config.cache_dir = "#{Rails.root}/tmp/uploads" # For heroku
config.aws_credentials = {
:access_key_id => EffectiveAssets.aws_access_key_id,
:secret_access_key => EffectiveAssets.aws_secret_access_key,