Sha256: d993c42f4a52759cdd86bd6536b543e8a73f29457a10eee883e12e63747316d9
Contents?: true
Size: 529 Bytes
Versions: 8
Compression:
Stored size: 529 Bytes
Contents
class ColoredConsoleOutput < ConsoleOutput COLORS = { :red => 31, :green => 32, :yellow => 33, :cyan => 36 } STATUS_COLORS = { :start => :cyan, :pass => :green, :fail => :red, :error => :red, :warning => :yellow, :issue => :yellow } def format(status, date, time, time_zone, msg) output = super output = colorize(output, STATUS_COLORS[status]) if STATUS_COLORS[status] output end def colorize(text, color) "\e[#{COLORS[color]}m#{text}\e[0m" end end
Version data entries
8 entries across 8 versions & 1 rubygems