Module: Balancer::Core

Included in:
Balancer
Defined in:
lib/balancer/core.rb

Instance Method Summary collapse

Instance Method Details

#profileObject



11
12
13
# File 'lib/balancer/core.rb', line 11

def profile
  ENV['BALANCER_PROFILE'] || 'default'
end

#rootObject



6
7
8
9
# File 'lib/balancer/core.rb', line 6

def root
  path = ENV['BALANCER_ROOT'] || '.'
  Pathname.new(path)
end

#settingsObject



15
16
17
# File 'lib/balancer/core.rb', line 15

def settings
  Setting.new.data
end

#validate_in_project!Object



19
20
21
22
23
24
# File 'lib/balancer/core.rb', line 19

def validate_in_project!
  unless File.exist?("#{root}/.balancer")
    puts "Could not find a .balancer folder in the current directory.  It does not look like you are running this command within a balancer project.  Please confirm that you are in a balancer project and try again.".colorize(:red)
    exit
  end
end