Sha256: 2f6c3bcbbe4b79753ecebe7198c0fb8289b0624838fb4146373e8603b6d25d20

Contents?: true

Size: 749 Bytes

Versions: 113

Compression:

Stored size: 749 Bytes

Contents

#
#  Carrier Wave configuration block
#
CarrierWave.configure do |config|

  if (Rails.env.production? or Rails.env.staging?) and ENV["LALALA_S3_BUCKET"]

    config.storage = :fog
    config.root = Rails.root.join('tmp')
    config.cache_dir = 'uploads'

    config.fog_credentials = {
      provider:              'AWS',
      aws_access_key_id:     ENV["LALALA_S3_ACCESS_KEY"],
      aws_secret_access_key: ENV["LALALA_S3_SECRET_KEY"]
    }

    config.fog_directory = File.join(
      ENV["LALALA_S3_BUCKET"],
      "storage",
      ENV["APP_NAME"],
      Rails.env.to_s,
      "assets"
    )

    config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
    config.asset_host     = ""


  else # dev
    config.storage = :file

  end
end

Version data entries

113 entries across 113 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.416 config/initializers/carrierwave.rb
lalala-4.0.0.dev.407 config/initializers/carrierwave.rb
lalala-4.0.0.dev.396 config/initializers/carrierwave.rb
lalala-4.0.0.dev.395 config/initializers/carrierwave.rb
lalala-4.0.0.dev.393 config/initializers/carrierwave.rb
lalala-4.0.0.dev.388 config/initializers/carrierwave.rb
lalala-4.0.0.dev.385 config/initializers/carrierwave.rb
lalala-4.0.0.dev.382 config/initializers/carrierwave.rb
lalala-4.0.0.dev.374 config/initializers/carrierwave.rb
lalala-4.0.0.dev.372 config/initializers/carrierwave.rb
lalala-4.0.0.dev.368 config/initializers/carrierwave.rb
lalala-4.0.0.dev.366 config/initializers/carrierwave.rb
lalala-4.0.0.dev.357 config/initializers/carrierwave.rb
lalala-4.0.0.dev.354 config/initializers/carrierwave.rb
lalala-4.0.0.dev.351 config/initializers/carrierwave.rb
lalala-4.0.0.dev.350 config/initializers/carrierwave.rb
lalala-4.0.0.dev.349 config/initializers/carrierwave.rb
lalala-4.0.0.dev.344 config/initializers/carrierwave.rb
lalala-4.0.0.dev.343 config/initializers/carrierwave.rb
lalala-4.0.0.dev.339 config/initializers/carrierwave.rb