Class: Elevage::Health
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Elevage::Health
- Includes:
- Thor::Actions
- Defined in:
- lib/elevage/health.rb
Overview
Evaluate health of platform definition files
Class Method Summary collapse
Instance Method Summary collapse
-
#check_environments ⇒ Object
Check each environment definition for correctness.
-
#check_platform ⇒ Object
Check the platform definition correctness.
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/elevage/health.rb', line 8 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#check_environments ⇒ Object
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_platform ⇒ Object
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 |