lib/cli/workflow_task.rb in factor-0.0.6 vs lib/cli/workflow_task.rb in factor-0.0.7

- old
+ new

@@ -14,13 +14,31 @@ id = engine.launch(workflow_name,options.parameters) puts "workflow executed with id #{id}" end - desc "list", "list all available workflows" - def list + desc "list", "list all the workflows" + #method_option :key, :alias=>"-k", :type=>:string, :desc=>"key reference" + def list + puts @client.get_workflow end + + desc "add NAME FILENAME", "add a key and value for the credential" + #method_option :key, :alias=>"-k", :type=>:string, :desc=>"key reference" + #method_option :value, :alias=>"-v", :type=>:string, :desc=>"values" + def add(name,filename) + contents=File.open(File.expand_path(filename), "rb") {|f| f.read} + puts @client.add_workflow(name,contents) + end + + desc "remove NAME", "remove a workflow" + def remove(name) + puts @client.remove_workflow(name) + end + + + end end end \ No newline at end of file