EOS
end
+if ARGV[0] == 'keep'
+ ARGV.shift
+ @sub = ARGV.shift
+ if ['ls', 'get', 'put', 'less', 'check'].index @sub then
+ exec `which wh#{@sub}`.strip, *ARGV
+ else
+ puts "Usage: \n" +
+ "#{$0} keep ls\n" +
+ "#{$0} keep get\n" +
+ "#{$0} keep put\n" +
+ "#{$0} keep less\n" +
+ "#{$0} keep check\n"
+ end
+ abort
+end
+
+if ARGV[0] == 'pipeline'
+ ARGV.shift
+ @sub = ARGV.shift
+ if ['run'].index @sub then
+ exec `which arv-run-pipeline-instance`.strip, *ARGV
+ else
+ puts "Usage: \n" +
+ "#{$0} pipeline run [...]\n" +
+ "(see arv-run-pipeline-instance --help for details)\n"
+ end
+ abort
+end
+
ENV['ARVADOS_API_VERSION'] ||= 'v1'
if not ENV.include?('ARVADOS_API_HOST') or not ENV.include?('ARVADOS_API_TOKEN') then
discovered_params.each do |k,v|
opts = Hash.new()
opts[:type] = v["type"].to_sym if v.include?("type")
- if [:datetime, :text, :object].index opts[:type]
+ if [:datetime, :text, :object, :array].index opts[:type]
opts[:type] = :string # else trollop bork
end
opts[:default] = v["default"] if v.include?("default")
end
end
discovered_params.each do |k,v|
- if v["type"] == "object" and method_opts.has_key? k
+ if ['object', 'array'].index(v["type"]) and method_opts.has_key? k
method_opts[k] = JSON.parse method_opts[k]
end
end