Sha256: ecf34d62a80555463b72c000e369bdbc134a4f8c8ff1874694a4721b6f71f4dc

Contents?: true

Size: 455 Bytes

Versions: 6

Compression:

Stored size: 455 Bytes

Contents

Appfuel::Initialize.define('global.aws_dynamodb') do |config, container|
  require 'aws-sdk'
  require 'appfuel/storage/aws_dynamodb'

  env = config[:env]
  endpoint = config[:aws][:dynamodb][:endpoint]
  if ['local', 'development'].include?(env.to_s) && endpoint
    Aws.config.update({
      endpoint: endpoint
    })
  end
  key = Appfuel::AwsDynamodb::CLIENT_CONTAINER_KEY

  client = Aws::DynamoDB::Client.new

  container.register(key, client)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
appfuel-0.5.7 lib/appfuel/initializers/aws_dynamodb.rb
appfuel-0.5.6 lib/appfuel/initializers/aws_dynamodb.rb
appfuel-0.5.5 lib/appfuel/initializers/aws_dynamodb.rb
appfuel-0.5.4 lib/appfuel/initializers/aws_dynamodb.rb
appfuel-0.5.3 lib/appfuel/initializers/aws_dynamodb.rb
appfuel-0.5.2 lib/appfuel/initializers/aws_dynamodb.rb