YUKI Hiroshi
null+****@clear*****
Fri May 29 17:43:51 JST 2015
YUKI Hiroshi 2015-05-29 17:43:51 +0900 (Fri, 29 May 2015) New Revision: 9d0a66a3de152b513d3b94130ed689279c4abc68 https://github.com/droonga/droonga-client-ruby/commit/9d0a66a3de152b513d3b94130ed689279c4abc68 Message: Do dry-run by the base class Modified files: bin/droonga-groonga Modified: bin/droonga-groonga (+2 -15) =================================================================== --- bin/droonga-groonga 2015-05-29 17:43:39 +0900 (95809c5) +++ bin/droonga-groonga 2015-05-29 17:43:51 +0900 (53f7cbd) @@ -33,11 +33,6 @@ module Droonga parse_options do |option| option.banner("Usage: droonga-groonga [groonga-command-name] [options]\n" + " ex: droonga-groonga select --table=Users") - - option.on(:"dry-run", - "Only reports messages converted from Groonga to Droonga.", - :default => false) - option.separator("Formatting:") option.on(:pretty, "Output result as a pretty print JSON.", @@ -72,16 +67,7 @@ module Droonga private def process_groonga_message(groonga_message) - if @options[:"dry-run"] - if @options[:pretty] - puts(JSON.pretty_generate(groonga_message)) - else - puts(JSON.generate(groonga_message)) - end - return - end - - response = request(groonga_message) + request(groonga_message) do |response| raise NoResponse.new unless response body = response["body"] @@ -90,6 +76,7 @@ module Droonga else puts(JSON.generate(body)) end + end end def command_converter -------------- next part -------------- HTML����������������������������...Download