lib/effective_assets.rb in effective_assets-1.2.3 vs lib/effective_assets.rb in effective_assets-1.2.4

- old
+ new

@@ -12,10 +12,11 @@ mattr_accessor :uploader mattr_accessor :aws_bucket mattr_accessor :aws_access_key_id mattr_accessor :aws_secret_access_key + mattr_accessor :aws_region mattr_accessor :aws_path # This directory is where we upload files to mattr_accessor :aws_acl mattr_accessor :authorization_method @@ -45,10 +46,11 @@ if (@carrierwave_configured != true) && EffectiveAssets.uploader.present? && EffectiveAssets.aws_bucket.present? CarrierWave.configure do |config| config.fog_credentials = { :provider => 'AWS', :aws_access_key_id => EffectiveAssets.aws_access_key_id, - :aws_secret_access_key => EffectiveAssets.aws_secret_access_key + :aws_secret_access_key => EffectiveAssets.aws_secret_access_key, + :aws_region => EffectiveAssets.aws_region.presence || 'us-east-1' } config.fog_directory = EffectiveAssets.aws_bucket config.fog_public = EffectiveAssets.aws_acl.to_s.include?('public') config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} config.cache_dir = "#{Rails.root}/tmp/uploads" # For heroku