Class: TurboTest::Command::List

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/turbo_test/command/list.rb

Instance Method Summary collapse

Instance Method Details

#callObject

Prepare the environment and run the controller.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/turbo_test/command/list.rb', line 26

def call
  path = @options[:configuration]
  full_path = File.expand_path(path)
  
  configuration = Configuration.new
  
  if File.exist?(full_path)
    configuration.load(full_path)
  end
  
  configuration.finalize!
  
  configuration.jobs.each do |klass, path, **options|
    if options&.any?
      puts "#{klass}: #{path} #{options.inspect}"
    else
      puts "#{klass}: #{path}"
    end
  end
end