cmdline workflows should translate into real workflows
-
bahuvrihi
A potential syntax...
require 'yaml' workflow = [ ['a', 'a1', 'a2', {'key' => 'value', 'another' => 'value', 'name' => 'blah'}], ['b', 'b1'], ['c'], "+2[1,2,3]", "1:2:3", "3[4,5,6]" ] command = workflow.collect do |argv| case argv when Array argv.collect do |arg| case arg when Hash then arg.to_a.collect {|k,v| "--#{k} #{v}" } else arg.to_s end end.flatten.join(' ') else argv.to_s end end puts command.join(" -- ") # a a1 a2 --name blah --another value --key value -- b b1 -- c -- +2[1,2,3] -- 1:2:3 -- 3[4,5,6] puts workflow.to_yaml # --- # - - a # - a1 # - a2 # - name: blah # another: value # key: value # - - b # - b1 # - - c # - +2[1,2,3] # - "1:2:3" # - 3[4,5,6] -
bahuvrihi
- Assigned user set to bahuvrihi
- State changed from new to resolved
- Milestone set to Tap-0.11.0
- Tag changed from feature, tap to feature, tap
I'm calling this resolved. Schema and Parser implement workflows from the command line input.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.