Class: AbbreviatedConsoleOutput
Constant Summary
ColoredConsoleOutput::COLORS, ColoredConsoleOutput::STATUS_COLORS
Instance Method Summary
collapse
#colorize
#add, #close
Instance Method Details
#add_status(status, date, time, time_zone, msg) ⇒ Object
3
4
5
6
7
8
|
# File 'lib/ui-auto-monkey/tuneup/test_runner/abbreviated_console_output.rb', line 3
def add_status(status, date, time, time_zone, msg)
message = format(status, msg)
if !message.nil?
puts message
end
end
|
10
11
12
13
14
15
16
17
|
# File 'lib/ui-auto-monkey/tuneup/test_runner/abbreviated_console_output.rb', line 10
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
|
#message_for_status(status, msg) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/ui-auto-monkey/tuneup/test_runner/abbreviated_console_output.rb', line 19
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
|