Kouhei Sutou
null+****@clear*****
Tue Jun 23 16:00:15 JST 2015
Kouhei Sutou 2015-06-23 16:00:15 +0900 (Tue, 23 Jun 2015) New Revision: ddab256aedf9743d34e8d8b39cb0072e97b7c830 https://github.com/groonga/groonga-query-log/commit/ddab256aedf9743d34e8d8b39cb0072e97b7c830 Message: Move command line tool implementation to command/ TODO: * Add tests for it Modified files: bin/groonga-query-log-extract lib/groonga/query-log.rb Renamed files: lib/groonga/query-log/command/extract.rb (from lib/groonga/query-log/extractor.rb) Modified: bin/groonga-query-log-extract (+3 -3) =================================================================== --- bin/groonga-query-log-extract 2015-06-23 15:57:29 +0900 (6c3c93b) +++ bin/groonga-query-log-extract 2015-06-23 16:00:15 +0900 (7f264d6) @@ -17,7 +17,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -require "groonga/query-log" +require "groonga/query-log/command/extract" -extracter = Groonga::QueryLog::Extractor.new -exit(extracter.run(ARGV)) +extract = Groonga::QueryLog::Command::Extract.new +exit(extract.run(ARGV)) Modified: lib/groonga/query-log.rb (+0 -1) =================================================================== --- lib/groonga/query-log.rb 2015-06-23 15:57:29 +0900 (7d67110) +++ lib/groonga/query-log.rb 2015-06-23 16:00:15 +0900 (2b1d9f7) @@ -18,7 +18,6 @@ require "groonga/query-log/version" require "groonga/query-log/analyzer" -require "groonga/query-log/extractor" require "groonga/query-log/parser" require "groonga/query-log/replayer" require "groonga/query-log/server-verifier" Renamed: lib/groonga/query-log/command/extract.rb (+6 -3) 97% =================================================================== --- lib/groonga/query-log/extractor.rb 2015-06-23 15:57:29 +0900 (1e36f54) +++ lib/groonga/query-log/command/extract.rb 2015-06-23 16:00:15 +0900 (dc3ca9a) @@ -20,12 +20,14 @@ require "ostruct" require "optparse" require "pathname" + +require "groonga/query-log" require "groonga/query-log/command-line-utils" -require "groonga/query-log/parser" module Groonga module QueryLog - class Extractor + module Command + class Extract include CommandLineUtils class Error < StandardError @@ -44,7 +46,7 @@ module Groonga # "groonga-query-log-extract" command runs this method. # # @example - # extractor = Groonga::QueryLog::Extractor.new + # extractor = Groonga::QueryLog::Command::Extract.new # extractor.run("--output", "commands.output", # "--command", "select", # "query.log") @@ -186,5 +188,6 @@ module Groonga true end end + end end end -------------- next part -------------- HTML����������������������������... Descargar