Sha256: 12029849935be51fd1d593e1fd171742678d20abec034b75728ec7e8a259c20f
Contents?: true
Size: 963 Bytes
Versions: 8
Compression:
Stored size: 963 Bytes
Contents
class AbbreviatedConsoleOutput < ColoredConsoleOutput def add_status(status, date, time, time_zone, msg) message = format(status, msg) if !message.nil? puts message end end def format(status, msg) output = nil if status output = self.message_for_status(status, msg); output = colorize(output, STATUS_COLORS[status]) if STATUS_COLORS[status] end output end def message_for_status(status, msg) message = nil case status when /^default/ message = " > #{msg}" when /^start/ message = "\n> #{status.to_s.capitalize}: #{msg}" when /^fail/ message = "X #{status.to_s.capitalize}: #{msg}" when /^pass/ message = "#{status.to_s.capitalize}: #{msg}" when /^warning/ message = " ! #{status.to_s.capitalize}: #{msg}" when /^issue/ message = " ! #{status.to_s.capitalize}: #{msg}" end message end end
Version data entries
8 entries across 8 versions & 1 rubygems