Kouhei Sutou
null+****@clear*****
Tue Jan 7 15:12:03 JST 2014
Kouhei Sutou 2014-01-07 15:12:03 +0900 (Tue, 07 Jan 2014) New Revision: 435e919513c363c6e00012e35cd1e0bcdd3edd27 https://github.com/groonga/groonga-query-log/commit/435e919513c363c6e00012e35cd1e0bcdd3edd27 Message: verify-server: accept input from stdin Modified files: lib/groonga/query-log/command/verify-server.rb Modified: lib/groonga/query-log/command/verify-server.rb (+7 -3) =================================================================== --- lib/groonga/query-log/command/verify-server.rb 2014-01-07 15:09:18 +0900 (deaa929) +++ lib/groonga/query-log/command/verify-server.rb 2014-01-07 15:12:03 +0900 (5e24e28) @@ -31,9 +31,13 @@ module Groonga def run(*command_line) input_paths = create_parser.parse(*command_line) verifier = ServerVerifier.new(@options) - input_paths.each do |input_path| - File.open(input_path) do |input| - verifier.verify(input) + if input_paths.empty? + verifier.verify($stdin) + else + input_paths.each do |input_path| + File.open(input_path) do |input| + verifier.verify(input) + end end end end -------------- next part -------------- HTML����������������������������...Download