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

Version Path
rbbt-util-5.9.12 share/rbbt_commands/workflow/list
rbbt-util-5.9.11 share/rbbt_commands/workflow/list
rbbt-util-5.9.10 share/rbbt_commands/workflow/list
rbbt-util-5.9.8 share/rbbt_commands/workflow/list
rbbt-util-5.9.7 share/rbbt_commands/workflow/list
rbbt-util-5.9.6 share/rbbt_commands/workflow/list
rbbt-util-5.9.5 share/rbbt_commands/workflow/list
rbbt-util-5.9.4 share/rbbt_commands/workflow/list
rbbt-util-5.9.3 share/rbbt_commands/workflow/list
rbbt-util-5.9.2 share/rbbt_commands/workflow/list
rbbt-util-5.9.1 share/rbbt_commands/workflow/list
rbbt-util-5.9.0 share/rbbt_commands/workflow/list
rbbt-util-5.8.10 share/rbbt_commands/workflow/list
rbbt-util-5.8.9 share/rbbt_commands/workflow/list
rbbt-util-5.8.8 share/rbbt_commands/workflow/list
rbbt-util-5.8.7 share/rbbt_commands/workflow/list
rbbt-util-5.8.6 share/rbbt_commands/workflow/list
rbbt-util-5.8.4 share/rbbt_commands/workflow/list
rbbt-util-5.8.3 share/rbbt_commands/workflow/list
rbbt-util-5.8.2 share/rbbt_commands/workflow/list