class DockerRack::CLI::Base
Public Instance Methods
exec(name)
click to toggle source
# File lib/docker_rack/cli/base.rb, line 31 def exec(name) ct = init_runner unless ct.contains?(name) puts "Task with name '#{name}' doesn't exist." abort end puts "Executing '#{name}'" ct.invoke(name) end
list(all = nil)
click to toggle source
# File lib/docker_rack/cli/base.rb, line 19 def list(all = nil) ct = init_runner ct.tasks.map do |task| comment = task.comment next if all != 'all' && comment.nil? comment = (comment.nil?) ? '' : '# ' + comment printf("%-40s %-40s\n\r", task.name, comment) end end
Private Instance Methods
init_runner()
click to toggle source
# File lib/docker_rack/cli/base.rb, line 45 def init_runner ct = Container::Templates::RakeTask.new ct.process(path: options[:container_templates]) ct end