Sha256: a8bfca882eef5c1af396994f371a8d85e2706a63adf0bc2d8477aac12d03c15c

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

module Brillo
  module Transferrer
    class Config
      attr_accessor :bucket, :region, :enabled, :secret_access_key, :access_key_id
      def initialize(bucket: 'database-scrubs', region: 'us-west-2', enabled: true)
        @enabled = enabled
        @bucket = bucket
        @region = region
      end

      def region
        @region || ENV['AWS_REGION']
      end

      def secret_access_key
        @secret_access_key || ENV['AWS_SECRET_ACCESS_KEY'] || ENV["AWS_SECRET_KEY"] || ENV["EC2_SECRET_KEY"]
      end

      def access_key_id
        @access_key_id || ENV['AWS_ACCESS_KEY_ID'] || ENV["AWS_ACCESS_KEY"] || ENV["EC2_ACCESS_KEY"]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brillo-1.1.1 lib/brillo/transferrer/config.rb
brillo-1.1.0 lib/brillo/transferrer/config.rb