From 254b2b9daf9392301aa0cfccd62615e869e1850b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 29 Jun 2013 01:31:19 +0100 Subject: [PATCH] brew-test-bot: move command shortening to method. --- Library/Contributions/cmd/brew-test-bot.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 3cd14e1342..6fd9ae5efe 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -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