lib/polytrix/command/action.rb in polytrix-0.1.2 vs lib/polytrix/command/action.rb in polytrix-0.1.3
- old
+ new
@@ -3,18 +3,19 @@
module Polytrix
module Command
class Action < Polytrix::Command::Base
include RunAction
+ IMPLEMENTOR_ACTIONS = [:clone, :bootstrap] # These are run once per implementor, not per test
+
# Invoke the command.
def call
banner "Starting Polytrix (v#{Polytrix::VERSION})"
elapsed = Benchmark.measure do
setup
- tests = parse_subcommand(args.first)
+ tests = parse_subcommand(args.pop)
implementors = tests.map(&:implementor).uniq
- # Logging.mdc['command'] = action
- if [:clone, :bootstrap].include? action # actions on implementors
+ if IMPLEMENTOR_ACTIONS.include? action # actions on implementors
run_action(action, implementors)
else # actions on tests
run_action(action, tests)
end
end