[ARVADOS] updated: 7e951eab94d0c984779b673d915c2736e730103b

git at public.curoverse.com git at public.curoverse.com
Mon Jan 6 16:32:47 EST 2014


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

       via  7e951eab94d0c984779b673d915c2736e730103b (commit)
      from  04eaf6ed0818f876017f59b3e22157a0165ad706 (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 7e951eab94d0c984779b673d915c2736e730103b
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jan 6 13:32:15 2014 -0800

    Read data from local file if an absolute filename is given for an
    object or array parameter.

diff --git a/sdk/cli/bin/arv b/sdk/cli/bin/arv
index 006fde1..7ce2fbe 100755
--- a/sdk/cli/bin/arv
+++ b/sdk/cli/bin/arv
@@ -217,12 +217,20 @@ def parse_arguments(discovery_document)
       if body_object["required"] == false
         is_required = false
       end
-      opt resource.to_sym, "#{resource} (request body)", required: is_required, type: :string
+      opt resource.to_sym, "#{resource} (request body)", {
+        required: is_required,
+        type: :string
+      }
+      discovered_params[resource.to_sym] = body_object
     end
   end
+
   discovered_params.each do |k,v|
+    k = k.to_sym
     if ['object', 'array'].index(v["type"]) and method_opts.has_key? k
-      method_opts[k] = JSON.parse method_opts[k]
+      if method_opts[k].match /^\//
+        method_opts[k] = File.open method_opts[k], 'rb' do |f| f.read end
+      end
     end
   end
   return resource, method, method_opts, global_opts, ARGV

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list