[ARVADOS] updated: afc4513b1dc69ca66f2e52f5ca7403b962bfda03

git at public.curoverse.com git at public.curoverse.com
Fri Dec 27 12:29:19 EST 2013


Summary of changes:
 sdk/cli/bin/arv |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

       via  afc4513b1dc69ca66f2e52f5ca7403b962bfda03 (commit)
      from  488c69fb1049b5fff7fd544a1635e232ade001e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit afc4513b1dc69ca66f2e52f5ca7403b962bfda03
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Dec 27 09:28:48 2013 -0800

    Add --yaml output format choice to arv.

diff --git a/sdk/cli/bin/arv b/sdk/cli/bin/arv
index b01ac1a..006fde1 100755
--- a/sdk/cli/bin/arv
+++ b/sdk/cli/bin/arv
@@ -60,6 +60,7 @@ begin
   require 'andand'
   require 'oj'
   require 'active_support/inflector'
+  require 'yaml'
 rescue LoadError
   abort <<-EOS
 
@@ -177,6 +178,7 @@ def parse_arguments(discovery_document)
     opt :json, "Return the entire response received from the API server, as a JSON object", :short => "-j"
     opt :human, "Return the response received from the API server, as a JSON object with whitespace added for human consumption", :short => "-h"
     opt :pretty, "Synonym of --human", :short => nil
+    opt :yaml, "Return the response received from the API server, in YAML format", :short => "-y"
     stop_on resource_types
   end
   
@@ -291,6 +293,8 @@ end
 
 if global_opts[:human] or global_opts[:pretty] then
   puts Oj.dump(results, :indent => 1)
+elsif global_opts[:yaml] then
+  puts results.to_yaml
 elsif global_opts[:json] then
   puts Oj.dump(results)
 elsif results["items"] and results["kind"].match /list$/i

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list