module Balancer::Core

Public Instance Methods

profile() click to toggle source
# File lib/balancer/core.rb, line 11
def profile
  ENV['BALANCER_PROFILE'] || 'default'
end
root() click to toggle source
# File lib/balancer/core.rb, line 6
def root
  path = ENV['BALANCER_ROOT'] || '.'
  Pathname.new(path)
end
settings() click to toggle source
# File lib/balancer/core.rb, line 15
def settings
  Setting.new.data
end
validate_in_project!() click to toggle source
# 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