Sha256: c2adeae48906815d5e57b88ee26e962ad16d18dd74fa36cd0e7cd7fa12f09a64

Contents?: true

Size: 899 Bytes

Versions: 52

Compression:

Stored size: 899 Bytes

Contents

module Dragonfly
  module Config

    module Heroku

      def self.apply_configuration(app, bucket_name)
        app.log.warn("""HEROKU CONFIGURATION IS NOW DEPRECATED - you should configure with the S3 Datastore directly, e.g.
  c.datastore = Dragonfly::DataStorage::S3DataStore.new(
    :bucket_name => '#{bucket_name}',
    :access_key_id => 'XXX',
    :secret_access_key => 'XXX'
  )
""")
        app.configure do |c|
          c.datastore = DataStorage::S3DataStore.new
          c.datastore.configure do |d|
            d.bucket_name = bucket_name
            d.access_key_id = ENV['S3_KEY'] || raise("ENV variable 'S3_KEY' needs to be set - use\n\theroku config:add S3_KEY=XXXXXXXXX")
            d.secret_access_key = ENV['S3_SECRET'] || raise("ENV variable 'S3_SECRET' needs to be set - use\n\theroku config:add S3_SECRET=XXXXXXXXX")
          end
        end
      end

    end
  end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.7.4 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.7.3 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.7.2 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.7.1 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.7.0 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
dragonfly-0.9.15 lib/dragonfly/config/heroku.rb
dragonfly-0.9.14 lib/dragonfly/config/heroku.rb
dragonfly-0.9.13 lib/dragonfly/config/heroku.rb
classiccms-0.6.9 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.8 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.7 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.6 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.5 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.4 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.3 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.2 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.1 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.6.0 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb
classiccms-0.5.17 vendor/bundle/gems/dragonfly-0.9.12/lib/dragonfly/config/heroku.rb