Class: Elevage::Health

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/elevage/health.rb

Overview

Evaluate health of platform definition files

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/elevage/health.rb', line 8

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#check_environmentsObject

Check each environment definition for correctness



24
25
26
27
28
# 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_platformObject

Check the platform definition correctness



15
16
17
18
# 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