brew-test-bot: move command shortening to method.

This commit is contained in:
Mike McQuaid 2013-06-29 01:31:19 +01:00
parent 9497d2f741
commit 254b2b9daf

View File

@ -49,6 +49,10 @@ class Step
@status.to_s.upcase
end
def command_short
@command.gsub(/(brew|--verbose|--build-bottle) /, '')
end
def passed?
@status == :passed
end
@ -389,7 +393,7 @@ if ARGV.include? "--email"
tests.each do |test|
test.steps.each do |step|
next unless step.failed?
failed_steps << step.command.gsub(/(brew|--verbose) /, '')
failed_steps << step.command_short
end
end