groonga-command 1.3.6 → 1.3.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
  SHA256:
3
- metadata.gz: b257586fb0c409ff09c4fa8a91d72be705be0392345a2ab85828031eb1174af6
4
- data.tar.gz: 7b944f40cfa45ed828bf476d85773c89b61a49313ca41c04d671ee217850d4e8
3
+ metadata.gz: c305d823be3919b3529858dede7d0a813ace993304a9545dbe71e0acddb23f96
4
+ data.tar.gz: 11ea5f374242a587bbbee7e4757951eeea1d198f2b320c82d98502d3a24d0371
5
5
  SHA512:
6
- metadata.gz: 3b8f6a8ab4915ca9671f080d1bee34a5662ad4fa809790d2c4556a5cc72b18399e7d2163e79b13f27bf10e9e88cddf1d67a22fd0d4e2e6d0b1802232879accb8
7
- data.tar.gz: 83437442ed05805fede250bfb8f01263d4cefdbf3991e3fe6c74a9f41ce6fa79bff708f9a227710306fe4c4d9e0d458671fc7f0f9c43e36d10d483027a139b5d
6
+ metadata.gz: 57bf8e89dd23af5ea48b5ba1e775a5d6aca634e444cb768f066a8c633f459eca0d3bcdcbea247435989e02954085c4356d9b63342a5e97a60a3defe3f11b12d6
7
+ data.tar.gz: 9d49f883b18f9630db7aaad0c7ec6465db55ca09426217795a1fead3ac53639e395ec58c30725b73782d9785848461f0e9000771ab51247a233821c148b98583
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.3.7: 2018-10-23
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::Truncate#target_name}: Added.
8
+
3
9
  ## 1.3.6: 2018-08-16
4
10
 
5
11
  ### Improvements
@@ -1,6 +1,4 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
4
2
  #
5
3
  # This library is free software; you can redistribute it and/or
6
4
  # modify it under the terms of the GNU Lesser General Public
@@ -28,12 +26,17 @@ module Groonga
28
26
 
29
27
  def parameter_names
30
28
  [
29
+ :target_name,
31
30
  :table,
32
31
  ]
33
32
  end
34
33
  end
35
34
 
36
35
  Command.register(command_name, self)
36
+
37
+ def target_name
38
+ @target_name ||= self[:target_name] || self[:table]
39
+ end
37
40
  end
38
41
  end
39
42
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.3.6"
19
+ VERSION = "1.3.7"
20
20
  end
21
21
  end
@@ -1,6 +1,4 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
4
2
  #
5
3
  # This library is free software; you can redistribute it and/or
6
4
  # modify it under the terms of the GNU Lesser General Public
@@ -25,13 +23,30 @@ class TruncateCommandTest < Test::Unit::TestCase
25
23
 
26
24
  class ConstructorTest < self
27
25
  def test_ordered_arguments
28
- table = "Users"
26
+ target_name = "Users"
29
27
 
30
- command = truncate_command([], [table])
28
+ command = truncate_command([], [target_name])
31
29
  assert_equal({
32
- :table => table,
30
+ :target_name => target_name,
33
31
  },
34
32
  command.arguments)
35
33
  end
36
34
  end
35
+
36
+ class TargetNameTest < self
37
+ def test_nil
38
+ command = truncate_command
39
+ assert_nil(command.target_name)
40
+ end
41
+
42
+ def test_specified
43
+ command = truncate_command(:target_name => "Users")
44
+ assert_equal("Users", command.target_name)
45
+ end
46
+
47
+ def test_table
48
+ command = truncate_command(:table => "Users")
49
+ assert_equal("Users", command.target_name)
50
+ end
51
+ end
37
52
  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.3.6
4
+ version: 1.3.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: 2018-08-16 00:00:00.000000000 Z
11
+ date: 2018-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -275,58 +275,58 @@ specification_version: 4
275
275
  summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
276
276
  command. You can write a program that handle Groonga's command by using groonga-command.
277
277
  test_files:
278
- - test/command/test-schema.rb
279
- - test/command/test-column-remove.rb
280
- - test/command/test-range-filter.rb
281
- - test/command/test-object-inspect.rb
282
- - test/command/test-column-copy.rb
278
+ - test/run-test.rb
279
+ - test/command/format/test-command.rb
280
+ - test/command/test-status.rb
281
+ - test/command/test-shutdown.rb
283
282
  - test/command/test-io-flush.rb
284
- - test/command/test-log-put.rb
285
- - test/command/test-plugin-unregister.rb
286
- - test/command/test-table-remove.rb
287
- - test/command/test-column-rename.rb
283
+ - test/command/test-base.rb
284
+ - test/command/test-column-remove.rb
288
285
  - test/command/test-column-create.rb
286
+ - test/command/test-config-get.rb
287
+ - test/command/test-logical-table-remove.rb
289
288
  - test/command/test-query-log-flags-get.rb
290
- - test/command/test-select.rb
291
- - test/command/test-shutdown.rb
289
+ - test/command/test-reindex.rb
290
+ - test/command/test-plugin-register.rb
292
291
  - test/command/test-object-remove.rb
293
- - test/command/test-logical-select.rb
292
+ - test/command/test-dump.rb
293
+ - test/command/test-query-log-flags-add.rb
294
+ - test/command/test-logical-range-filter.rb
294
295
  - test/command/test-table-tokenize.rb
295
- - test/command/test-query-log-flags-remove.rb
296
- - test/command/test-logical-shard-list.rb
297
- - test/command/test-object-exist.rb
298
- - test/command/test-suggest.rb
299
- - test/command/test-request-cancel.rb
300
296
  - test/command/test-query-expand.rb
301
- - test/command/test-query-log-flags-add.rb
302
- - test/command/test-log-level.rb
303
- - test/command/test-table-list.rb
304
- - test/command/test-column-list.rb
305
- - test/command/test-load.rb
306
- - test/command/test-dump.rb
297
+ - test/command/test-range-filter.rb
307
298
  - test/command/test-query-log-flags-set.rb
308
- - test/command/test-truncate.rb
309
- - test/command/test-delete.rb
310
- - test/command/test-ruby-load.rb
311
- - test/command/test-plugin-register.rb
312
- - test/command/test-base.rb
313
- - test/command/test-table-rename.rb
314
- - test/command/test-config-get.rb
315
- - test/command/test-logical-count.rb
316
- - test/command/test-normalize.rb
299
+ - test/command/test-logical-shard-list.rb
300
+ - test/command/test-load.rb
301
+ - test/command/test-config-set.rb
302
+ - test/command/test-register.rb
303
+ - test/command/test-column-rename.rb
304
+ - test/command/test-config-delete.rb
305
+ - test/command/test-ruby-eval.rb
317
306
  - test/command/test-table-copy.rb
307
+ - test/command/test-delete.rb
308
+ - test/command/test-column-list.rb
309
+ - test/command/test-request-cancel.rb
310
+ - test/command/test-schema.rb
318
311
  - test/command/test-get.rb
319
- - test/command/test-logical-range-filter.rb
320
- - test/command/test-config-delete.rb
321
- - test/command/test-logical-table-remove.rb
322
- - test/command/format/test-command.rb
323
- - test/command/test-reindex.rb
312
+ - test/command/test-ruby-load.rb
313
+ - test/command/test-query-log-flags-remove.rb
314
+ - test/command/test-truncate.rb
315
+ - test/command/test-suggest.rb
316
+ - test/command/test-logical-select.rb
317
+ - test/command/test-object-inspect.rb
318
+ - test/command/test-table-remove.rb
319
+ - test/command/test-column-copy.rb
320
+ - test/command/test-object-exist.rb
324
321
  - test/command/test-thread-limit.rb
325
- - test/command/test-config-set.rb
326
322
  - test/command/test-tokenize.rb
327
- - test/command/test-ruby-eval.rb
328
- - test/command/test-status.rb
329
- - test/command/test-register.rb
323
+ - test/command/test-select.rb
324
+ - test/command/test-log-put.rb
325
+ - test/command/test-log-level.rb
326
+ - test/command/test-plugin-unregister.rb
327
+ - test/command/test-table-rename.rb
328
+ - test/command/test-normalize.rb
329
+ - test/command/test-logical-count.rb
330
+ - test/command/test-table-list.rb
330
331
  - test/command/test-table-create.rb
331
- - test/run-test.rb
332
332
  - test/groonga-command-test-utils.rb