# File lib/aruba/reporting.rb, line 21 def pygmentize(file) pygmentize = Process.new(%{pygmentize -f html -O encoding=utf-8 "#{file}"}, 3, 0.5) pygmentize.run! do |p| exit_status = p.stop(false) if(exit_status == 0) p.stdout(false) elsif(p.stderr(false) =~ /no lexer/) # Pygment's didn't recognize it IO.read(file) else STDERR.puts "\e[31m#{p.stderr} - is pygments installed?\e[0m" exit $?.exitstatus end end end