Class: Scripted::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/scripted/runner.rb

Class Method Summary collapse

Class Method Details

.start!(configuration, *group_names) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/scripted/runner.rb', line 8

def self.start!(configuration, *group_names)
  Output::Logger.new(configuration) do |logger|
    select_commands = Running::SelectCommands.new(configuration, logger)
    commands = select_commands.commands(group_names)
    run_commands = Running::RunCommands.new(logger)
    run_commands.run(commands)
    raise RunningFailed, "One or more commands have failed" if run_commands.failed?
  end
end