[Groonga-commit] groonga/groonga-command at 26226c7 [master] Add dump command

Back to archive index

Kouhei Sutou null+****@clear*****
Thu May 23 18:09:50 JST 2013


Kouhei Sutou	2013-05-23 18:09:50 +0900 (Thu, 23 May 2013)

  New Revision: 26226c7f62b1c58cbd9825e8c1fc94f11be965ef
  https://github.com/groonga/groonga-command/commit/26226c7f62b1c58cbd9825e8c1fc94f11be965ef

  Message:
    Add dump command

  Added files:
    lib/groonga/command/dump.rb
    test/command/test-dump.rb
  Modified files:
    lib/groonga/command/parser.rb

  Added: lib/groonga/command/dump.rb (+31 -0) 100644
===================================================================
--- /dev/null
+++ lib/groonga/command/dump.rb    2013-05-23 18:09:50 +0900 (8ba57a6)
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Kouhei Sutou <kou �� clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+require "groonga/command/base"
+
+module Groonga
+  module Command
+    class Dump < Base
+      Command.register("dump", self)
+
+      def output_type
+        :none
+      end
+    end
+  end
+end

  Modified: lib/groonga/command/parser.rb (+2 -1)
===================================================================
--- lib/groonga/command/parser.rb    2013-05-23 17:38:10 +0900 (f6b4f7d)
+++ lib/groonga/command/parser.rb    2013-05-23 18:09:50 +0900 (8360d09)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2011-2012  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2011-2013  Kouhei Sutou <kou �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,7 @@ require "groonga/command/error"
 
 require "groonga/command/base"
 
+require "groonga/command/dump"
 require "groonga/command/get"
 require "groonga/command/select"
 require "groonga/command/suggest"

  Added: test/command/test-dump.rb (+30 -0) 100644
===================================================================
--- /dev/null
+++ test/command/test-dump.rb    2013-05-23 18:09:50 +0900 (90e98dc)
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013  Kouhei Sutou <kou �� clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+class DumpCommandTest < Test::Unit::TestCase
+  include GroongaCommandTestUtils::CommandLineCommandParser
+
+  def test_output_type
+    assert_equal(:none, command.output_type)
+  end
+
+  private
+  def command(arguments={})
+    Groonga::Command::Dump.new("dump", arguments)
+  end
+end
-------------- next part --------------
HTML����������������������������...
Download 



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