You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2017/12/13 14:20:14 UTC

[whimsy] branch master updated: Only print response in verbose mode

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 37b5bfc  Only print response in verbose mode
37b5bfc is described below

commit 37b5bfca1866b0900dbbc69eecb04a4a18ffdc99
Author: Sebb <se...@apache.org>
AuthorDate: Wed Dec 13 14:19:58 2017 +0000

    Only print response in verbose mode
---
 tools/ponyapi.rb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/ponyapi.rb b/tools/ponyapi.rb
index 1cda2de..00cf65a 100644
--- a/tools/ponyapi.rb
+++ b/tools/ponyapi.rb
@@ -174,6 +174,12 @@ end
 
 if __FILE__ == $0
   method = ARGV.shift
+  if method == '-v'
+    verbose = true
+    method = ARGV.shift
+  else
+    verbose = false
+  end
   if method
     meth = PonyAPI.method(method)
     # process args to allow use of nil, true, false
@@ -190,7 +196,8 @@ if __FILE__ == $0
       end
     end
     $stderr.puts "Calling #{method}() using #{args.inspect}"
-    puts meth.call(*args).inspect
+    res = meth.call(*args)
+    puts res.inspect if verbose
   end
 #  PonyAPI.get_pony_mbox('.', 'dev', 'whimsical', 2017, 01, nil)
 #  PonyAPI.get_pony_stats('.', 'dev', 'whimsical', 2017, 01, nil)

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].