Sha256: e1e583926f64adf21c640ebdc72884b3a95415e171efe0b57f254c64bec240cc
Contents?: true
Size: 541 Bytes
Versions: 1
Compression:
Stored size: 541 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] region = config[:aws][:region] || 'us-east-1' aws_config = { region: region } if ['local', 'development'].include?(env.to_s) && endpoint aws_config[:endpoint] = endpoint end Aws.config.update(aws_config) client = Aws::DynamoDB::Client.new container.register(Appfuel::AwsDynamodb::CLIENT_CONTAINER_KEY, client) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
appfuel-0.5.8 | lib/appfuel/initializers/aws_dynamodb.rb |