[Groonga-commit] groonga/groonga-query-log at ef0e12f [master] replay: use only #run as the public API

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Sep 20 11:08:57 JST 2013


Kouhei Sutou	2013-09-20 11:08:57 +0900 (Fri, 20 Sep 2013)

  New Revision: ef0e12f5dfac87d5e205a03f1bbc8bb4f590b445
  https://github.com/groonga/groonga-query-log/commit/ef0e12f5dfac87d5e205a03f1bbc8bb4f590b445

  Message:
    replay: use only #run as the public API
    
    Oh... This change should be included in the previous commit...

  Modified files:
    lib/groonga/query-log/command/replay.rb

  Modified: lib/groonga/query-log/command/replay.rb (+7 -6)
===================================================================
--- lib/groonga/query-log/command/replay.rb    2013-09-20 11:08:24 +0900 (833d9be)
+++ lib/groonga/query-log/command/replay.rb    2013-09-20 11:08:57 +0900 (71b76d2)
@@ -28,13 +28,14 @@ module Groonga
           @options = Replayer::Options.new
         end
 
-        def parse_command_line_options(arguments)
-          create_parser.parse!(arguments)
-        end
-
-        def run(input)
+        def run(*command_line)
+          input_paths = create_parser.parse(*command_line)
           replayer = Replayer.new(@options)
-          replayer.replay(input)
+          input_paths.each do |input_path|
+            File.open(input_path) do |input|
+              replayer.replay(input)
+            end
+          end
         end
 
         private
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index