lib/dependency_checker.rb in rake-n-bake-1.0.0 vs lib/dependency_checker.rb in rake-n-bake-1.0.1

- old
+ new

@@ -1,19 +1,20 @@ require 'term/ansicolor' -class RakeNBake +module RakeNBake class DependencyChecker - include Term::ANSIColor + C = Term::ANSIColor + def initialize dependencies @dependencies = Array(dependencies) end def check silent = false @results = @dependencies.each_with_object({}) do |dep, results| results[dep] = system "which #{dep} >/dev/null" unless silent - results[dep] ? print(".".green) : print("F".red) + results[dep] ? print(C.green, ".", C.clear) : print(C.red, "F", C.clear) end end end def missing