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

rubocop:disable LineLength



20
21
22
23
24
# File 'lib/elevage/health.rb', line 20

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

rubocop:disable LineLength



13
14
15
16
# File 'lib/elevage/health.rb', line 13

def check_platform
  @platform = Elevage::Platform.new
  puts @platform.healthy? ? MSG_HEALTHY : fail(IOError, ERR[:fail_health_check])
end