Class: Omnitest::Command::Task

Inherits:
Base
  • Object
show all
Includes:
RunAction
Defined in:
lib/omnitest/command/task.rb

Instance Method Summary collapse

Methods included from RunAction

#run_action

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Omnitest::Command::Base

Instance Method Details

#callObject

Invoke the command.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/omnitest/command/task.rb', line 9

def call
  banner "Starting Omnitest (v#{Omnitest::VERSION})"
  elapsed = Benchmark.measure do
    setup
    task = args.shift
    project_regex = args.shift
    projects = Omnitest.filter_projects(project_regex)
    if options[:exec]
      run_action(projects, :execute, options[:concurrency])
    else
      run_action(projects, task, options[:concurrency])
    end
  end
  #  Need task summary...
  banner "Omnitest is finished. #{Core::Util.duration(elapsed.real)}"
end