class Demeter::Commands::Base

Public Class Methods

new(options) click to toggle source
# File lib/demeter/commands/base.rb, line 6
def initialize(options)
  check_path
  ENV['DEMETER_ENV'] = options['environment']
  Dotenv.load(".env.#{options['environment']}")
  ::Aws.config.update(:logger => Logger.new(STDOUT))
  @ec2 = ::Aws::EC2::Client.new()
  @options = options
end

Public Instance Methods

check_path() click to toggle source
# File lib/demeter/commands/base.rb, line 15
def check_path
  fail "configs directory not found!" if !File.directory?('./configs')        
  fail "variables directory not found!" if !File.directory?('./variables')        
end