YUKI Hiroshi
null+****@clear*****
Wed Apr 15 17:10:02 JST 2015
YUKI Hiroshi 2015-04-15 17:10:02 +0900 (Wed, 15 Apr 2015) New Revision: 143b7bba937e554299bf66f486218708a91429cc https://github.com/droonga/droonga-client-ruby/commit/143b7bba937e554299bf66f486218708a91429cc Message: Don't exit by command iplementation itself Modified files: bin/droonga-groonga bin/droonga-system-status lib/droonga/command/base.rb Modified: bin/droonga-groonga (+1 -1) =================================================================== --- bin/droonga-groonga 2015-04-15 17:05:07 +0900 (f8e5fcd) +++ bin/droonga-groonga 2015-04-15 17:10:02 +0900 (5757a89) @@ -58,7 +58,7 @@ module Droonga end true - rescue InvalidCommandName, MissingCommandName + rescue MissingRequiredParameter, InvalidCommandName, MissingCommandName puts(@options) true end Modified: bin/droonga-system-status (+3 -0) =================================================================== --- bin/droonga-system-status 2015-04-15 17:05:07 +0900 (dd42226) +++ bin/droonga-system-status 2015-04-15 17:10:02 +0900 (a1ad054) @@ -40,6 +40,9 @@ module Droonga end true + rescue MissingRequiredParameter + puts(@options) + true end end end Modified: lib/droonga/command/base.rb (+4 -1) =================================================================== --- lib/droonga/command/base.rb 2015-04-15 17:05:07 +0900 (aa06a20) +++ lib/droonga/command/base.rb 2015-04-15 17:10:02 +0900 (c67d78c) @@ -21,6 +21,9 @@ require "droonga/client" module Droonga module Command + class MissingRequiredParameter < StandardError + end + class Base private def parse_options(&block) @@ -48,7 +51,7 @@ module Droonga @options = options rescue Slop::MissingOptionError => error $stderr.puts(error) - exit(false) + raise MissingRequiredParameter.new end def client -------------- next part -------------- HTML����������������������������... Download