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.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/turbo_test/command/list.rb', line 43

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