groonga-command 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/doc/text/news.md +17 -10
  3. data/lib/groonga/command/base.rb +37 -1
  4. data/lib/groonga/command/column-copy.rb +7 -3
  5. data/lib/groonga/command/column-create.rb +11 -7
  6. data/lib/groonga/command/column-list.rb +6 -2
  7. data/lib/groonga/command/column-remove.rb +6 -2
  8. data/lib/groonga/command/column-rename.rb +6 -2
  9. data/lib/groonga/command/config-delete.rb +6 -2
  10. data/lib/groonga/command/config-get.rb +6 -2
  11. data/lib/groonga/command/config-set.rb +6 -2
  12. data/lib/groonga/command/delete.rb +6 -2
  13. data/lib/groonga/command/dump.rb +6 -2
  14. data/lib/groonga/command/get.rb +6 -2
  15. data/lib/groonga/command/io-flush.rb +6 -2
  16. data/lib/groonga/command/load.rb +6 -2
  17. data/lib/groonga/command/log-level.rb +6 -2
  18. data/lib/groonga/command/log-put.rb +6 -2
  19. data/lib/groonga/command/logical-count.rb +6 -2
  20. data/lib/groonga/command/logical-range-filter.rb +6 -2
  21. data/lib/groonga/command/logical-select.rb +6 -2
  22. data/lib/groonga/command/logical-shard-list.rb +6 -2
  23. data/lib/groonga/command/logical-table-remove.rb +6 -2
  24. data/lib/groonga/command/normalize.rb +6 -2
  25. data/lib/groonga/command/object-exist.rb +6 -2
  26. data/lib/groonga/command/object-inspect.rb +6 -2
  27. data/lib/groonga/command/object-remove.rb +6 -2
  28. data/lib/groonga/command/plugin-register.rb +6 -2
  29. data/lib/groonga/command/plugin-unregister.rb +6 -2
  30. data/lib/groonga/command/query-expand.rb +6 -2
  31. data/lib/groonga/command/range-filter.rb +6 -2
  32. data/lib/groonga/command/register.rb +6 -2
  33. data/lib/groonga/command/reindex.rb +6 -2
  34. data/lib/groonga/command/request-cancel.rb +6 -2
  35. data/lib/groonga/command/ruby-eval.rb +6 -2
  36. data/lib/groonga/command/ruby-load.rb +6 -2
  37. data/lib/groonga/command/schema.rb +7 -1
  38. data/lib/groonga/command/select.rb +6 -2
  39. data/lib/groonga/command/shutdown.rb +6 -2
  40. data/lib/groonga/command/status.rb +7 -1
  41. data/lib/groonga/command/suggest.rb +6 -2
  42. data/lib/groonga/command/table-create.rb +6 -2
  43. data/lib/groonga/command/table-list.rb +6 -2
  44. data/lib/groonga/command/table-remove.rb +6 -2
  45. data/lib/groonga/command/table-rename.rb +6 -2
  46. data/lib/groonga/command/table-tokenize.rb +6 -2
  47. data/lib/groonga/command/thread-limit.rb +6 -2
  48. data/lib/groonga/command/tokenize.rb +6 -2
  49. data/lib/groonga/command/truncate.rb +6 -2
  50. data/lib/groonga/command/version.rb +1 -1
  51. data/test/command/test-column-copy.rb +1 -2
  52. data/test/command/test-column-create.rb +1 -2
  53. data/test/command/test-column-list.rb +1 -2
  54. data/test/command/test-column-remove.rb +1 -2
  55. data/test/command/test-column-rename.rb +1 -2
  56. data/test/command/test-config-delete.rb +1 -2
  57. data/test/command/test-config-get.rb +2 -3
  58. data/test/command/test-config-set.rb +2 -3
  59. data/test/command/test-delete.rb +1 -2
  60. data/test/command/test-dump.rb +1 -1
  61. data/test/command/test-get.rb +1 -1
  62. data/test/command/test-io-flush.rb +1 -2
  63. data/test/command/test-load.rb +1 -2
  64. data/test/command/test-log-level.rb +1 -2
  65. data/test/command/test-log-put.rb +1 -2
  66. data/test/command/test-logical-count.rb +1 -2
  67. data/test/command/test-logical-range-filter.rb +1 -2
  68. data/test/command/test-logical-select.rb +1 -2
  69. data/test/command/test-logical-shard-list.rb +1 -2
  70. data/test/command/test-logical-table-remove.rb +1 -2
  71. data/test/command/test-normalize.rb +1 -2
  72. data/test/command/test-object-exist.rb +1 -2
  73. data/test/command/test-object-inspect.rb +1 -2
  74. data/test/command/test-object-remove.rb +1 -2
  75. data/test/command/test-plugin-register.rb +2 -3
  76. data/test/command/test-plugin-unregister.rb +1 -2
  77. data/test/command/test-query-expand.rb +1 -2
  78. data/test/command/test-range-filter.rb +1 -2
  79. data/test/command/test-register.rb +1 -2
  80. data/test/command/test-reindex.rb +1 -2
  81. data/test/command/test-request-cancel.rb +1 -2
  82. data/test/command/test-ruby-eval.rb +1 -2
  83. data/test/command/test-ruby-load.rb +1 -2
  84. data/test/command/test-schema.rb +1 -1
  85. data/test/command/test-select.rb +1 -1
  86. data/test/command/test-shutdown.rb +1 -2
  87. data/test/command/test-status.rb +1 -1
  88. data/test/command/test-suggest.rb +1 -2
  89. data/test/command/test-table-create.rb +1 -2
  90. data/test/command/test-table-list.rb +1 -2
  91. data/test/command/test-table-remove.rb +1 -2
  92. data/test/command/test-table-rename.rb +1 -2
  93. data/test/command/test-table-tokenize.rb +1 -2
  94. data/test/command/test-thread-limit.rb +1 -2
  95. data/test/command/test-tokenize.rb +1 -2
  96. data/test/command/test-truncate.rb +1 -2
  97. metadata +41 -41
@@ -24,9 +24,11 @@ module Groonga
24
24
  #
25
25
  # @since 1.0.6
26
26
  class RubyLoad < Base
27
- Command.register("ruby_load", self)
28
-
29
27
  class << self
28
+ def command_name
29
+ "ruby_load"
30
+ end
31
+
30
32
  def parameter_names
31
33
  [
32
34
  :path,
@@ -34,6 +36,8 @@ module Groonga
34
36
  end
35
37
  end
36
38
 
39
+ Command.register(command_name, self)
40
+
37
41
  # @return [String] `path` parameter value.
38
42
  # @since 1.0.6
39
43
  def path
@@ -22,7 +22,13 @@ module Groonga
22
22
  #
23
23
  # @since 1.2.1
24
24
  class Schema < Base
25
- Command.register("schema", self)
25
+ class << self
26
+ def command_name
27
+ "schema"
28
+ end
29
+ end
30
+
31
+ Command.register(command_name, self)
26
32
  end
27
33
  end
28
34
  end
@@ -21,9 +21,11 @@ require "groonga/command/base"
21
21
  module Groonga
22
22
  module Command
23
23
  class Select < Base
24
- Command.register("select", self)
25
-
26
24
  class << self
25
+ def command_name
26
+ "select"
27
+ end
28
+
27
29
  def parameter_names
28
30
  [
29
31
  :table,
@@ -49,6 +51,8 @@ module Groonga
49
51
  end
50
52
  end
51
53
 
54
+ Command.register(command_name, self)
55
+
52
56
  def sortby
53
57
  self[:sortby]
54
58
  end
@@ -22,9 +22,11 @@ module Groonga
22
22
  #
23
23
  # @since 1.1.8
24
24
  class Shutdown < Base
25
- Command.register("shutdown", self)
26
-
27
25
  class << self
26
+ def command_name
27
+ "shutdown"
28
+ end
29
+
28
30
  def parameter_names
29
31
  [
30
32
  :mode,
@@ -32,6 +34,8 @@ module Groonga
32
34
  end
33
35
  end
34
36
 
37
+ Command.register(command_name, self)
38
+
35
39
  # @return [String] `mode` parameter value.
36
40
  #
37
41
  # @since 1.1.8
@@ -21,7 +21,13 @@ require "groonga/command/base"
21
21
  module Groonga
22
22
  module Command
23
23
  class Status < Base
24
- Command.register("status", self)
24
+ class << self
25
+ def command_name
26
+ "status"
27
+ end
28
+ end
29
+
30
+ Command.register(command_name, self)
25
31
  end
26
32
  end
27
33
  end
@@ -21,9 +21,11 @@ require "groonga/command/base"
21
21
  module Groonga
22
22
  module Command
23
23
  class Suggest < Base
24
- Command.register("suggest", self)
25
-
26
24
  class << self
25
+ def command_name
26
+ "suggest"
27
+ end
28
+
27
29
  def parameter_names
28
30
  [
29
31
  :types,
@@ -41,6 +43,8 @@ module Groonga
41
43
  ]
42
44
  end
43
45
  end
46
+
47
+ Command.register(command_name, self)
44
48
  end
45
49
  end
46
50
  end
@@ -19,9 +19,11 @@ require "groonga/command/base"
19
19
  module Groonga
20
20
  module Command
21
21
  class TableCreate < Base
22
- Command.register("table_create", self)
23
-
24
22
  class << self
23
+ def command_name
24
+ "table_create"
25
+ end
26
+
25
27
  def parameter_names
26
28
  [
27
29
  :name,
@@ -35,6 +37,8 @@ module Groonga
35
37
  end
36
38
  end
37
39
 
40
+ Command.register(command_name, self)
41
+
38
42
  # @return [String, nil] Key type name, nil for array no key table.
39
43
  # @since 1.0.7
40
44
  def key_type
@@ -22,9 +22,11 @@ module Groonga
22
22
  #
23
23
  # @since 1.1.3
24
24
  class TableList < Base
25
- Command.register("table_list", self)
26
-
27
25
  class << self
26
+ def command_name
27
+ "table_list"
28
+ end
29
+
28
30
  def parameter_names
29
31
  [
30
32
  :prefix,
@@ -32,6 +34,8 @@ module Groonga
32
34
  end
33
35
  end
34
36
 
37
+ Command.register(command_name, self)
38
+
35
39
  # @return [String] `prefix` parameter value.
36
40
  #
37
41
  # @since 1.1.3
@@ -19,9 +19,11 @@ require "groonga/command/base"
19
19
  module Groonga
20
20
  module Command
21
21
  class TableRemove < Base
22
- Command.register("table_remove", self)
23
-
24
22
  class << self
23
+ def command_name
24
+ "table_remove"
25
+ end
26
+
25
27
  def parameter_names
26
28
  [
27
29
  :name,
@@ -30,6 +32,8 @@ module Groonga
30
32
  end
31
33
  end
32
34
 
35
+ Command.register(command_name, self)
36
+
33
37
  # @return [String] `name` parameter value.
34
38
  #
35
39
  # @since 1.1.8
@@ -21,9 +21,11 @@ require "groonga/command/base"
21
21
  module Groonga
22
22
  module Command
23
23
  class TableRename < Base
24
- Command.register("table_rename", self)
25
-
26
24
  class << self
25
+ def command_name
26
+ "table_rename"
27
+ end
28
+
27
29
  def parameter_names
28
30
  [
29
31
  :name,
@@ -31,6 +33,8 @@ module Groonga
31
33
  ]
32
34
  end
33
35
  end
36
+
37
+ Command.register(command_name, self)
34
38
  end
35
39
  end
36
40
  end
@@ -22,9 +22,11 @@ module Groonga
22
22
  #
23
23
  # @since 1.1.0
24
24
  class TableTokenize < Base
25
- Command.register("table_tokenize", self)
26
-
27
25
  class << self
26
+ def command_name
27
+ "table_tokenize"
28
+ end
29
+
28
30
  def parameter_names
29
31
  [
30
32
  :table,
@@ -35,6 +37,8 @@ module Groonga
35
37
  end
36
38
  end
37
39
 
40
+ Command.register(command_name, self)
41
+
38
42
  # @return [String] `table` parameter value.
39
43
  #
40
44
  # @since 1.1.0
@@ -22,9 +22,11 @@ module Groonga
22
22
  #
23
23
  # @since 1.1.3
24
24
  class ThreadLimit < Base
25
- Command.register("thread_limit", self)
26
-
27
25
  class << self
26
+ def command_name
27
+ "thread_limit"
28
+ end
29
+
28
30
  def parameter_names
29
31
  [
30
32
  :max,
@@ -32,6 +34,8 @@ module Groonga
32
34
  end
33
35
  end
34
36
 
37
+ Command.register(command_name, self)
38
+
35
39
  # @return [Integer] `max` parameter value.
36
40
  #
37
41
  # @since 1.1.3
@@ -24,9 +24,11 @@ module Groonga
24
24
  #
25
25
  # @since 1.0.6
26
26
  class Tokenize < Base
27
- Command.register("tokenize", self)
28
-
29
27
  class << self
28
+ def command_name
29
+ "tokenize"
30
+ end
31
+
30
32
  def parameter_names
31
33
  [
32
34
  :tokenizer,
@@ -39,6 +41,8 @@ module Groonga
39
41
  end
40
42
  end
41
43
 
44
+ Command.register(command_name, self)
45
+
42
46
  # @return [String] `tokenizer` parameter value.
43
47
  # @since 1.0.6
44
48
  def tokenizer
@@ -21,15 +21,19 @@ require "groonga/command/base"
21
21
  module Groonga
22
22
  module Command
23
23
  class Truncate < Base
24
- Command.register("truncate", self)
25
-
26
24
  class << self
25
+ def command_name
26
+ "truncate"
27
+ end
28
+
27
29
  def parameter_names
28
30
  [
29
31
  :table,
30
32
  ]
31
33
  end
32
34
  end
35
+
36
+ Command.register(command_name, self)
33
37
  end
34
38
  end
35
39
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.2.2"
19
+ VERSION = "1.2.3"
20
20
  end
21
21
  end
@@ -17,8 +17,7 @@
17
17
  class ColumnCopyCommandTest < Test::Unit::TestCase
18
18
  private
19
19
  def column_copy_command(pair_arguments={}, ordered_arguments=[])
20
- Groonga::Command::ColumnCopy.new("column_copy",
21
- pair_arguments,
20
+ Groonga::Command::ColumnCopy.new(pair_arguments,
22
21
  ordered_arguments)
23
22
  end
24
23
 
@@ -19,8 +19,7 @@
19
19
  class ColumnCreateCommandTest < Test::Unit::TestCase
20
20
  private
21
21
  def column_create_command(pair_arguments={}, ordered_arguments=[])
22
- Groonga::Command::ColumnCreate.new("column_create",
23
- pair_arguments,
22
+ Groonga::Command::ColumnCreate.new(pair_arguments,
24
23
  ordered_arguments)
25
24
  end
26
25
 
@@ -19,8 +19,7 @@
19
19
  class ColumnListCommandTest < Test::Unit::TestCase
20
20
  private
21
21
  def column_list_command(pair_arguments={}, ordered_arguments=[])
22
- Groonga::Command::ColumnList.new("column_list",
23
- pair_arguments,
22
+ Groonga::Command::ColumnList.new(pair_arguments,
24
23
  ordered_arguments)
25
24
  end
26
25
 
@@ -19,8 +19,7 @@
19
19
  class ColumnRemoveCommandTest < Test::Unit::TestCase
20
20
  private
21
21
  def column_remove_command(pair_arguments={}, ordered_arguments=[])
22
- Groonga::Command::ColumnRemove.new("column_remove",
23
- pair_arguments,
22
+ Groonga::Command::ColumnRemove.new(pair_arguments,
24
23
  ordered_arguments)
25
24
  end
26
25
 
@@ -19,8 +19,7 @@
19
19
  class ColumnRenameCommandTest < Test::Unit::TestCase
20
20
  private
21
21
  def column_rename_command(pair_arguments={}, ordered_arguments=[])
22
- Groonga::Command::ColumnRename.new("column_rename",
23
- pair_arguments,
22
+ Groonga::Command::ColumnRename.new(pair_arguments,
24
23
  ordered_arguments)
25
24
  end
26
25
 
@@ -17,8 +17,7 @@
17
17
  class ConfigDeleteCommandTest < Test::Unit::TestCase
18
18
  private
19
19
  def config_delete_command(pair_arguments={}, ordered_arguments=[])
20
- Groonga::Command::ConfigDelete.new("config_delete",
21
- pair_arguments,
20
+ Groonga::Command::ConfigDelete.new(pair_arguments,
22
21
  ordered_arguments)
23
22
  end
24
23
 
@@ -17,9 +17,8 @@
17
17
  class ConfigGetCommandTest < Test::Unit::TestCase
18
18
  private
19
19
  def config_get_command(pair_arguments={}, ordered_arguments=[])
20
- Groonga::Command::ConfigGet.new("config_get",
21
- pair_arguments,
22
- ordered_arguments)
20
+ Groonga::Command::ConfigGet.new(pair_arguments,
21
+ ordered_arguments)
23
22
  end
24
23
 
25
24
  class ConstructorTest < self
@@ -17,9 +17,8 @@
17
17
  class ConfigSetCommandTest < Test::Unit::TestCase
18
18
  private
19
19
  def config_set_command(pair_arguments={}, ordered_arguments=[])
20
- Groonga::Command::ConfigSet.new("config_set",
21
- pair_arguments,
22
- ordered_arguments)
20
+ Groonga::Command::ConfigSet.new(pair_arguments,
21
+ ordered_arguments)
23
22
  end
24
23
 
25
24
  class ConstructorTest < self
@@ -19,8 +19,7 @@
19
19
  class DeleteCommandTest < Test::Unit::TestCase
20
20
  private
21
21
  def delete_command(pair_arguments={}, ordered_arguments=[])
22
- Groonga::Command::Delete.new("delete",
23
- pair_arguments,
22
+ Groonga::Command::Delete.new(pair_arguments,
24
23
  ordered_arguments)
25
24
  end
26
25
 
@@ -19,7 +19,7 @@
19
19
  class DumpCommandTest < Test::Unit::TestCase
20
20
  private
21
21
  def dump_command(pair_arguments={}, ordered_arguments=[])
22
- Groonga::Command::Dump.new("dump", pair_arguments, ordered_arguments)
22
+ Groonga::Command::Dump.new(pair_arguments, ordered_arguments)
23
23
  end
24
24
 
25
25
  class ConstructorTest < self
@@ -20,7 +20,7 @@
20
20
  class GetCommandTest < Test::Unit::TestCase
21
21
  private
22
22
  def get_command(pair_arguments={}, ordered_arguments=[])
23
- Groonga::Command::Get.new("get", pair_arguments, ordered_arguments)
23
+ Groonga::Command::Get.new(pair_arguments, ordered_arguments)
24
24
  end
25
25
 
26
26
  class ConstructorTest < self