Sha256: 308dc9c14416f05f4fdf2e58c239a4c1447db8903dfe79aa3c7de45b3602b675

Contents?: true

Size: 516 Bytes

Versions: 5

Compression:

Stored size: 516 Bytes

Contents

module Meroku
  module CLI
    
    module AdminUser
    
      def self.load_secrets(obj)
        env_file = Dir.home+'/.meroku/meroku.env'
        if !File.exist?(env_file)
          puts "error: File not found (#{Dir.home}/.meroku/meroku.env)"
          return nil
        end
        Dotenv.load(env_file)
        obj.ec2_client = ::Aws::EC2::Client.new(
          region: 'us-east-1',
          credentials: ::Aws::Credentials.new(ENV['AWS_ACCESS_KEY'], ENV['AWS_SECRET'])
        )
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
meroku-2.0.8 lib/meroku/cli/admin_user.rb
meroku-2.0.7 lib/meroku/cli/admin_user.rb
meroku-2.0.6 lib/meroku/cli/admin_user.rb
meroku-2.0.5 lib/meroku/cli/admin_user.rb
meroku-2.0.4 lib/meroku/cli/admin_user.rb