Sha256: 4feb2f361cfea64314f74deb80b7112dcfe8168acda91c5daa6f8eecbde5326e

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 Bytes

Contents

require "bbc/cosmos/config/version"
require "bbc/cosmos/config/cosmos"
require "bbc/cosmos/config/aws"

require "aws-sdk"
require "hashie"

module BBC
  module Cosmos

    def self.production?
      ENV["APP_ENV"] == "production"
    end

    module Config
      def self.aws
        @@aws_config ||= AWS.new(::AWS::EC2.new)
      end

      def self.cosmos
        @@cosmos_config ||= Cosmos.new(aws)
      end

      def self.app
        @@app_config ||= Hashie::Mash.new(cosmos.component_config)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bbc-cosmos-config-0.0.4 lib/bbc/cosmos/config.rb