Class: Omnitest::Command::ProjectAction

Inherits:
Base
  • Object
show all
Includes:
RunAction
Defined in:
lib/omnitest/command/project_action.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
# File 'lib/omnitest/command/project_action.rb', line 9

def call
  banner "Starting Omnitest (v#{Omnitest::VERSION})"
  elapsed = Benchmark.measure do
    setup
    project_regex = args.shift
    if %w(task workflow).include? action # a bit hacky...
      argument = project_regex
      project_regex = args.shift
      args.unshift argument
    end
    projects = select_projects(project_regex, options)
    run_action(projects, action, options[:concurrency], *args)
  end
  banner "Omnitest is finished. #{Core::Util.duration(elapsed.real)}"
end