diff options
Diffstat (limited to 'lib/system_check/simple_executor.rb')
-rw-r--r-- | lib/system_check/simple_executor.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/system_check/simple_executor.rb b/lib/system_check/simple_executor.rb new file mode 100644 index 00000000000..2ffe837e326 --- /dev/null +++ b/lib/system_check/simple_executor.rb @@ -0,0 +1,34 @@ +module SystemCheck + class SimpleExecutor < BaseExecutor + def execute + start_checking(component) + + @checks.each do |check| + print "#{check.name}" + if check.skip? + puts "skipped #{'('+skip_message+')' if skip_message}".color(:magenta) + elsif check.check? + puts 'yes'.color(:green) + else + puts 'no'.color(:red) + check.show_error + end + end + + finished_checking(component) + end + + private + + def start_checking(component) + puts "Checking #{component.color(:yellow)} ..." + puts '' + end + + def finished_checking(component) + puts '' + puts "Checking #{component.color(:yellow)} ... #{"Finished".color(:green)}" + puts '' + end + end +end |