class Kafo::SystemChecker
Attributes
checkers[R]
Public Class Methods
check()
click to toggle source
# File lib/kafo/system_checker.rb, line 6 def self.check KafoConfigure.check_dirs.all? do |dir| new(File.join(dir, '*')).check end end
new(path)
click to toggle source
# File lib/kafo/system_checker.rb, line 12 def initialize(path) @checkers = Dir.glob(path).sort end
Public Instance Methods
check()
click to toggle source
# File lib/kafo/system_checker.rb, line 20 def check @checkers.map! do |checker| logger.debug "Executing checker: #{checker}" stdout = %x`#{checker}` logger.error stdout unless stdout.empty? $?.exitstatus == 0 end @checkers.all? end
logger()
click to toggle source
# File lib/kafo/system_checker.rb, line 16 def logger Logging::logger['checks'] end