Sha256: 6ebecc0ea784570202224a82465ad08c42595692b66c6c09184bf920892a7c38
Contents?: true
Size: 897 Bytes
Versions: 34
Compression:
Stored size: 897 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt-util' require 'rbbt/workflow' require 'rbbt/util/simpleopt' options = SOPT.get('-wd--workflow_dir*:-d--describe') workflow_dir = options[:workflow_dir] || Workflow.workflow_dir Path.setup(workflow_dir) unless Path === workflow_dir files = workflow_dir.find_all.collect{|p| p.glob("*") }.flatten.select{|f| File.directory? f } if options[:describe] files.each do |file| workflow = File.basename(file) Workflow.require_workflow workflow workflow = Workflow.workflows.select{|w| Misc.camel_case(w.to_s) == Misc.camel_case(workflow)}.first puts "# "<<[Misc.camel_case(workflow.to_s), workflow.description] * ": " workflow.tasks.each do |name,task| puts " * " << [name, task.inputs * " "] * ": " end puts end else files.each do |file| workflow = File.basename(file) puts Misc.camel_case(workflow.to_s) end end
Version data entries
34 entries across 34 versions & 1 rubygems