[Groonga-commit] groonga/groonga-command at 9edfec1 [master] Add Schema

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Mar 21 23:11:52 JST 2016


Kouhei Sutou	2016-03-21 23:11:52 +0900 (Mon, 21 Mar 2016)

  New Revision: 9edfec1728f82cef246368b7f6f98ea9e8b785a2
  https://github.com/groonga/groonga-command/commit/9edfec1728f82cef246368b7f6f98ea9e8b785a2

  Message:
    Add Schema

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

  Modified: lib/groonga/command.rb (+1 -0)
===================================================================
--- lib/groonga/command.rb    2016-03-21 13:00:46 +0900 (08f40c1)
+++ lib/groonga/command.rb    2016-03-21 23:11:52 +0900 (2932ff4)
@@ -52,6 +52,7 @@ require "groonga/command/reindex"
 require "groonga/command/request-cancel"
 require "groonga/command/ruby-eval"
 require "groonga/command/ruby-load"
+require "groonga/command/schema"
 require "groonga/command/select"
 require "groonga/command/shutdown"
 require "groonga/command/status"

  Added: lib/groonga/command/schema.rb (+28 -0) 100644
===================================================================
--- /dev/null
+++ lib/groonga/command/schema.rb    2016-03-21 23:11:52 +0900 (bb5ba07)
@@ -0,0 +1,28 @@
+# Copyright (C) 2016  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
+    # A command class that represents `schema` command.
+    #
+    # @since 1.2.1
+    class Schema < Base
+      Command.register("schema", self)
+    end
+  end
+end

  Added: test/command/test-schema.rb (+29 -0) 100644
===================================================================
--- /dev/null
+++ test/command/test-schema.rb    2016-03-21 23:11:52 +0900 (dca472e)
@@ -0,0 +1,29 @@
+# Copyright (C) 2016  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 SchemaCommandTest < Test::Unit::TestCase
+  private
+  def schema_command(pair_arguments={}, ordered_arguments=[])
+    Groonga::Command::Schema.new("schema", pair_arguments, ordered_arguments)
+  end
+
+  class ConstructorTest < self
+    def test_ordered_arguments
+      command = schema_command({}, [])
+      assert_equal({}, command.arguments)
+    end
+  end
+end
-------------- next part --------------
HTML����������������������������...
Download 



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