class Elevage::Health

Evaluate health of platform definition files

Public Class Methods

source_root() click to toggle source
# File lib/elevage/health.rb, line 8
def self.source_root
  File.dirname(__FILE__)
end

Public Instance Methods

check_environments() click to toggle source

Check each environment definition for correctness

# File lib/elevage/health.rb, line 24
def check_environments
  @platform.environments.each do |env|
    puts Elevage::Environment.new(env).healthy? ? (env + MSG_ENV_HEALTHY) : fail(IOError, ERR[:fail_health_check])
  end
end
check_platform() click to toggle source

Check the platform definition correctness

# File lib/elevage/health.rb, line 15
def check_platform
  @platform = Elevage::Platform.new
  puts @platform.healthy? ? MSG_HEALTHY : fail(IOError, ERR[:fail_health_check])
end