groonga-command 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7bb10ee1c1f12c2be163b0e91b3886565fc543f
4
- data.tar.gz: 81011615f7ca437dbca6318e491a3a9b3b62765d
3
+ metadata.gz: aaa9e5d607968c538c0fc7900edd0e0fd8c10c4d
4
+ data.tar.gz: 2ca7cd45a8c6709e18dead9c1f36b7f8f6fb6793
5
5
  SHA512:
6
- metadata.gz: fd27f441564438c85cf4fda0a59de6127c88307154868b8ce7b08e4a069425e38e9778a1c7a760828bc5c9e4511d06e1e2cfe056e3aac873306f2ddc1f1917ad
7
- data.tar.gz: eb02fd78d75c54db1107efaa1768cf15f8d1615f9e84538c648305ee1be9522196c405ee411bfc4820d64f7a7b5dc906cc8918dafb28dc9536c671b6447a174c
6
+ metadata.gz: 2a0eb7b2a7539445cbd61947e76c77e4d4d3169f83143573bcf3cf2b162b57283245c1afac76d1990616b422c57b00cd966fc371896f9ed7a0c9931209828d3f
7
+ data.tar.gz: d0807f8d4b8e9812ece1e03b9a319cdb84e2809e39845559dcde9c61a36b9b7ba492e73c2f5095a8d46453c931744ddcec3620a7ca0b8fc2174bfaa4596216f2
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.2.7: 2016-08-15
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::TableCopy}: Added.
8
+
3
9
  ## 1.2.6: 2016-08-09
4
10
 
5
11
  ### Improvements
@@ -58,6 +58,7 @@ require "groonga/command/select"
58
58
  require "groonga/command/shutdown"
59
59
  require "groonga/command/status"
60
60
  require "groonga/command/suggest"
61
+ require "groonga/command/table-copy"
61
62
  require "groonga/command/table-create"
62
63
  require "groonga/command/table-list"
63
64
  require "groonga/command/table-remove"
@@ -0,0 +1,55 @@
1
+ # Copyright (C) 2016 Kouhei Sutou <kou@clear-code.com>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ require "groonga/command/base"
18
+
19
+ module Groonga
20
+ module Command
21
+ # A command class that represents `table_copy` command.
22
+ #
23
+ # @since 1.2.7
24
+ class TableCopy < Base
25
+ class << self
26
+ def command_name
27
+ "table_copy"
28
+ end
29
+
30
+ def parameter_names
31
+ [
32
+ :from_name,
33
+ :to_name,
34
+ ]
35
+ end
36
+ end
37
+
38
+ Command.register(command_name, self)
39
+
40
+ # @return [String] The source table name.
41
+ #
42
+ # @since 1.2.7
43
+ def from_name
44
+ self[:from_name]
45
+ end
46
+
47
+ # @return [String] The destination table name.
48
+ #
49
+ # @since 1.2.7
50
+ def to_name
51
+ self[:to_name]
52
+ end
53
+ end
54
+ end
55
+ end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.2.6"
19
+ VERSION = "1.2.7"
20
20
  end
21
21
  end
@@ -0,0 +1,55 @@
1
+ # Copyright (C) 2016 Kouhei Sutou <kou@clear-code.com>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TableCopyCommandTest < Test::Unit::TestCase
18
+ private
19
+ def table_copy_command(pair_arguments={}, ordered_arguments=[])
20
+ Groonga::Command::TableCopy.new(pair_arguments,
21
+ ordered_arguments)
22
+ end
23
+
24
+ class ConstructorTest < self
25
+ def test_ordered_arguments
26
+ from_name = "Users"
27
+ to_name = "TypesUsers"
28
+
29
+ command = table_copy_command({},
30
+ [
31
+ from_name,
32
+ to_name,
33
+ ])
34
+ assert_equal({
35
+ :from_name => from_name,
36
+ :to_name => to_name,
37
+ },
38
+ command.arguments)
39
+ end
40
+ end
41
+
42
+ class FromNameTest < self
43
+ def test_reader
44
+ command = table_copy_command(:from_name => "Users")
45
+ assert_equal("Users", command.from_name)
46
+ end
47
+ end
48
+
49
+ class ToNameTest < self
50
+ def test_reader
51
+ command = table_copy_command(:to_name => "TypedUsers")
52
+ assert_equal("TypedUsers", command.to_name)
53
+ end
54
+ end
55
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-09 00:00:00.000000000 Z
11
+ date: 2016-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -179,6 +179,7 @@ files:
179
179
  - lib/groonga/command/shutdown.rb
180
180
  - lib/groonga/command/status.rb
181
181
  - lib/groonga/command/suggest.rb
182
+ - lib/groonga/command/table-copy.rb
182
183
  - lib/groonga/command/table-create.rb
183
184
  - lib/groonga/command/table-list.rb
184
185
  - lib/groonga/command/table-remove.rb
@@ -228,6 +229,7 @@ files:
228
229
  - test/command/test-shutdown.rb
229
230
  - test/command/test-status.rb
230
231
  - test/command/test-suggest.rb
232
+ - test/command/test-table-copy.rb
231
233
  - test/command/test-table-create.rb
232
234
  - test/command/test-table-list.rb
233
235
  - test/command/test-table-remove.rb
@@ -264,54 +266,55 @@ specification_version: 4
264
266
  summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
265
267
  command. You can write a program that handle Groonga's command by using groonga-command.
266
268
  test_files:
267
- - test/command/test-plugin-register.rb
268
- - test/command/test-ruby-load.rb
269
- - test/command/test-dump.rb
270
- - test/command/test-column-list.rb
271
- - test/command/test-tokenize.rb
272
- - test/command/test-delete.rb
273
- - test/command/test-column-rename.rb
274
- - test/command/test-query-expand.rb
275
- - test/command/test-object-exist.rb
276
- - test/command/test-io-flush.rb
277
- - test/command/test-normalize.rb
278
- - test/command/test-shutdown.rb
269
+ - test/command/test-schema.rb
279
270
  - test/command/test-column-remove.rb
280
- - test/command/test-register.rb
281
- - test/command/test-select.rb
282
- - test/command/test-get.rb
283
- - test/command/test-table-tokenize.rb
271
+ - test/command/test-range-filter.rb
272
+ - test/command/test-object-inspect.rb
284
273
  - test/command/test-column-copy.rb
274
+ - test/command/test-io-flush.rb
275
+ - test/command/test-log-put.rb
285
276
  - test/command/test-plugin-unregister.rb
286
277
  - test/command/test-table-remove.rb
287
- - test/command/test-config-get.rb
288
- - test/command/test-config-delete.rb
289
- - test/command/test-truncate.rb
278
+ - test/command/test-column-rename.rb
290
279
  - test/command/test-column-create.rb
291
- - test/command/test-status.rb
292
- - test/command/test-schema.rb
293
- - test/command/test-log-put.rb
294
- - test/command/test-object-inspect.rb
295
- - test/command/test-table-create.rb
296
- - test/command/test-logical-shard-list.rb
280
+ - test/command/test-select.rb
281
+ - test/command/test-shutdown.rb
297
282
  - test/command/test-object-remove.rb
298
- - test/command/test-logical-table-remove.rb
299
- - test/command/test-base.rb
300
- - test/command/test-ruby-eval.rb
301
- - test/command/test-thread-limit.rb
302
283
  - test/command/test-logical-select.rb
303
- - test/command/test-log-level.rb
284
+ - test/command/test-table-tokenize.rb
285
+ - test/command/test-logical-shard-list.rb
286
+ - test/command/test-object-exist.rb
287
+ - test/command/test-suggest.rb
304
288
  - test/command/test-request-cancel.rb
289
+ - test/command/test-query-expand.rb
290
+ - test/command/test-log-level.rb
291
+ - test/command/test-table-list.rb
292
+ - test/command/test-column-list.rb
305
293
  - test/command/test-load.rb
294
+ - test/command/test-dump.rb
295
+ - test/command/test-truncate.rb
296
+ - test/command/test-delete.rb
297
+ - test/command/test-ruby-load.rb
298
+ - test/command/test-plugin-register.rb
299
+ - test/command/test-base.rb
306
300
  - test/command/test-table-rename.rb
307
- - test/command/test-config-set.rb
308
- - test/command/format/test-command.rb
309
- - test/command/test-suggest.rb
310
- - test/command/test-logical-range-filter.rb
301
+ - test/command/test-config-get.rb
311
302
  - test/command/test-logical-count.rb
303
+ - test/command/test-normalize.rb
304
+ - test/command/test-table-copy.rb
305
+ - test/command/test-get.rb
306
+ - test/command/test-logical-range-filter.rb
307
+ - test/command/test-config-delete.rb
308
+ - test/command/test-logical-table-remove.rb
309
+ - test/command/format/test-command.rb
312
310
  - test/command/test-reindex.rb
313
- - test/command/test-range-filter.rb
314
- - test/command/test-table-list.rb
311
+ - test/command/test-thread-limit.rb
312
+ - test/command/test-config-set.rb
313
+ - test/command/test-tokenize.rb
314
+ - test/command/test-ruby-eval.rb
315
+ - test/command/test-status.rb
316
+ - test/command/test-register.rb
317
+ - test/command/test-table-create.rb
315
318
  - test/run-test.rb
316
319
  - test/groonga-command-test-utils.rb
317
320
  has_rdoc: