groonga-command 1.4.8 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +14 -0
- data/lib/groonga/command.rb +3 -1
- data/lib/groonga/command/io-flush.rb +17 -3
- data/lib/groonga/command/reference-acquire.rb +69 -0
- data/lib/groonga/command/reference-release.rb +69 -0
- data/lib/groonga/command/version.rb +1 -1
- data/test/command/test-io-flush.rb +17 -1
- data/test/command/test-reference-acquire.rb +82 -0
- data/test/command/test-reference-release.rb +82 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe62b9d5aed0f3cbfbfa7a7b5b9c5865f6c70886355f3a5c7086399183c62b83
|
4
|
+
data.tar.gz: 540863dccacf354e6011fcac61c8e5c3ad03097ce85107b00e7524b1857b3d08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee5c1ef2e8994b4caa48e88105c9cae72062f0ce7a24071c621c138f098e6e79a94dab16ad93773ead68a0d9eded7f6c49c11ab93cba01f0b999bdd1b06cba3
|
7
|
+
data.tar.gz: b65924d1478338a21cfcf9afc4648b9bfde02d368882f5f2d668eacc516b1706f6af80abd641a97b5a30b3a0d1187d764421fd4049b8a98a42e45ae150d5697a
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 1.4.9: 2020-06-14
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* {Groonga::Command::ReferenceAcquire}: Added support for
|
8
|
+
`reference_acquire`.
|
9
|
+
|
10
|
+
* {Groonga::Command::ReferenceRelease}: Added support for
|
11
|
+
`reference_release`.
|
12
|
+
|
13
|
+
* {Groonga::Command::IOFlush#recursive}: Added.
|
14
|
+
|
15
|
+
* {Groonga::Command::IOFlush#recursive_dependent?}: Added.
|
16
|
+
|
3
17
|
## 1.4.8: 2020-05-03
|
4
18
|
|
5
19
|
### Improvements
|
data/lib/groonga/command.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2020 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -51,6 +51,8 @@ require "groonga/command/query-log-flags-get"
|
|
51
51
|
require "groonga/command/query-log-flags-remove"
|
52
52
|
require "groonga/command/query-log-flags-set"
|
53
53
|
require "groonga/command/range-filter"
|
54
|
+
require "groonga/command/reference-acquire"
|
55
|
+
require "groonga/command/reference-release"
|
54
56
|
require "groonga/command/register"
|
55
57
|
require "groonga/command/reindex"
|
56
58
|
require "groonga/command/request-cancel"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Kouhei
|
1
|
+
# Copyright (C) 2015-2020 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -44,11 +44,25 @@ module Groonga
|
|
44
44
|
self[:target_name]
|
45
45
|
end
|
46
46
|
|
47
|
-
# @return [
|
47
|
+
# @return [String] `recursive` parameter value.
|
48
|
+
#
|
49
|
+
# @since 1.4.9
|
50
|
+
def recursive
|
51
|
+
self[:recursive]
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [Boolean] Whether `recursive` parameter value isn't `no`.
|
48
55
|
#
|
49
56
|
# @since 1.1.3
|
50
57
|
def recursive?
|
51
|
-
|
58
|
+
recursive != "no"
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Boolean] `recursive` parameter value.
|
62
|
+
#
|
63
|
+
# @since 1.4.9
|
64
|
+
def recursive_dependent?
|
65
|
+
recursive == "dependent"
|
52
66
|
end
|
53
67
|
end
|
54
68
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright (C) 2020 Sutou Kouhei <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 `reference_acquire` command.
|
22
|
+
#
|
23
|
+
# @since 1.4.9
|
24
|
+
class ReferenceAcquire < Base
|
25
|
+
class << self
|
26
|
+
def command_name
|
27
|
+
"reference_acquire"
|
28
|
+
end
|
29
|
+
|
30
|
+
def parameter_names
|
31
|
+
[
|
32
|
+
:target_name,
|
33
|
+
:recursive,
|
34
|
+
]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
Command.register(command_name, self)
|
39
|
+
|
40
|
+
# @return [String] `target_name` parameter value.
|
41
|
+
#
|
42
|
+
# @since 1.4.9
|
43
|
+
def target_name
|
44
|
+
self[:target_name]
|
45
|
+
end
|
46
|
+
|
47
|
+
# @return [String] `recursive` parameter value.
|
48
|
+
#
|
49
|
+
# @since 1.4.9
|
50
|
+
def recursive
|
51
|
+
self[:recursive]
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [Boolean] Whether `recursive` parameter value isn't `no`.
|
55
|
+
#
|
56
|
+
# @since 1.4.9
|
57
|
+
def recursive?
|
58
|
+
recursive != "no"
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Boolean] `recursive` parameter value.
|
62
|
+
#
|
63
|
+
# @since 1.4.9
|
64
|
+
def recursive_dependent?
|
65
|
+
recursive == "dependent"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Copyright (C) 2020 Sutou Kouhei <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 `reference_release` command.
|
22
|
+
#
|
23
|
+
# @since 1.4.9
|
24
|
+
class ReferenceRelease < Base
|
25
|
+
class << self
|
26
|
+
def command_name
|
27
|
+
"reference_release"
|
28
|
+
end
|
29
|
+
|
30
|
+
def parameter_names
|
31
|
+
[
|
32
|
+
:target_name,
|
33
|
+
:recursive,
|
34
|
+
]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
Command.register(command_name, self)
|
39
|
+
|
40
|
+
# @return [String] `target_name` parameter value.
|
41
|
+
#
|
42
|
+
# @since 1.4.9
|
43
|
+
def target_name
|
44
|
+
self[:target_name]
|
45
|
+
end
|
46
|
+
|
47
|
+
# @return [String] `recursive` parameter value.
|
48
|
+
#
|
49
|
+
# @since 1.4.9
|
50
|
+
def recursive
|
51
|
+
self[:recursive]
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [Boolean] Whether `recursive` parameter value isn't `no`.
|
55
|
+
#
|
56
|
+
# @since 1.4.9
|
57
|
+
def recursive?
|
58
|
+
self[:recursive] != "no"
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Boolean] `recursive` parameter value.
|
62
|
+
#
|
63
|
+
# @since 1.4.9
|
64
|
+
def recursive_dependent?
|
65
|
+
self[:recursive] == "dependent"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Kouhei
|
1
|
+
# Copyright (C) 2015-2020 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -53,6 +53,9 @@ class IOFlushCommandTest < Test::Unit::TestCase
|
|
53
53
|
assert do
|
54
54
|
command.recursive?
|
55
55
|
end
|
56
|
+
assert do
|
57
|
+
not command.recursive_dependent?
|
58
|
+
end
|
56
59
|
end
|
57
60
|
|
58
61
|
def test_no
|
@@ -60,6 +63,19 @@ class IOFlushCommandTest < Test::Unit::TestCase
|
|
60
63
|
assert do
|
61
64
|
not command.recursive?
|
62
65
|
end
|
66
|
+
assert do
|
67
|
+
not command.recursive_dependent?
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_dependent
|
72
|
+
command = reference_acquire_command(:recursive => "dependent")
|
73
|
+
assert do
|
74
|
+
command.recursive?
|
75
|
+
end
|
76
|
+
assert do
|
77
|
+
command.recursive_dependent?
|
78
|
+
end
|
63
79
|
end
|
64
80
|
end
|
65
81
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Copyright (C) 2020 Sutou Kouhei <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 ReferenceAcquireCommandTest < Test::Unit::TestCase
|
18
|
+
private
|
19
|
+
def reference_acquire_command(pair_arguments={}, ordered_arguments=[])
|
20
|
+
Groonga::Command::ReferenceAcquire.new(pair_arguments,
|
21
|
+
ordered_arguments)
|
22
|
+
end
|
23
|
+
|
24
|
+
class ConstructorTest < self
|
25
|
+
def test_ordered_arguments
|
26
|
+
target_name = "Users"
|
27
|
+
recursive = "no"
|
28
|
+
|
29
|
+
ordered_arguments = [
|
30
|
+
target_name,
|
31
|
+
recursive,
|
32
|
+
]
|
33
|
+
command = reference_acquire_command({}, ordered_arguments)
|
34
|
+
assert_equal({
|
35
|
+
:target_name => target_name,
|
36
|
+
:recursive => recursive,
|
37
|
+
},
|
38
|
+
command.arguments)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class TargetNameTest < self
|
43
|
+
def test_reader
|
44
|
+
command = reference_acquire_command(:target_name => "Users")
|
45
|
+
assert_equal("Users", command.target_name)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class RecursiveTest < self
|
50
|
+
class ReaderTest < self
|
51
|
+
def test_default
|
52
|
+
command = reference_acquire_command
|
53
|
+
assert do
|
54
|
+
command.recursive?
|
55
|
+
end
|
56
|
+
assert do
|
57
|
+
not command.recursive_dependent?
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_no
|
62
|
+
command = reference_acquire_command(:recursive => "no")
|
63
|
+
assert do
|
64
|
+
not command.recursive?
|
65
|
+
end
|
66
|
+
assert do
|
67
|
+
not command.recursive_dependent?
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_dependent
|
72
|
+
command = reference_acquire_command(:recursive => "dependent")
|
73
|
+
assert do
|
74
|
+
command.recursive?
|
75
|
+
end
|
76
|
+
assert do
|
77
|
+
command.recursive_dependent?
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Copyright (C) 2020 Sutou Kouhei <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 ReferenceReleaseCommandTest < Test::Unit::TestCase
|
18
|
+
private
|
19
|
+
def reference_release_command(pair_arguments={}, ordered_arguments=[])
|
20
|
+
Groonga::Command::ReferenceRelease.new(pair_arguments,
|
21
|
+
ordered_arguments)
|
22
|
+
end
|
23
|
+
|
24
|
+
class ConstructorTest < self
|
25
|
+
def test_ordered_arguments
|
26
|
+
target_name = "Users"
|
27
|
+
recursive = "no"
|
28
|
+
|
29
|
+
ordered_arguments = [
|
30
|
+
target_name,
|
31
|
+
recursive,
|
32
|
+
]
|
33
|
+
command = reference_release_command({}, ordered_arguments)
|
34
|
+
assert_equal({
|
35
|
+
:target_name => target_name,
|
36
|
+
:recursive => recursive,
|
37
|
+
},
|
38
|
+
command.arguments)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class TargetNameTest < self
|
43
|
+
def test_reader
|
44
|
+
command = reference_release_command(:target_name => "Users")
|
45
|
+
assert_equal("Users", command.target_name)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class RecursiveTest < self
|
50
|
+
class ReaderTest < self
|
51
|
+
def test_default
|
52
|
+
command = reference_release_command
|
53
|
+
assert do
|
54
|
+
command.recursive?
|
55
|
+
end
|
56
|
+
assert do
|
57
|
+
not command.recursive_dependent?
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_no
|
62
|
+
command = reference_release_command(:recursive => "no")
|
63
|
+
assert do
|
64
|
+
not command.recursive?
|
65
|
+
end
|
66
|
+
assert do
|
67
|
+
not command.recursive_dependent?
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_dependent
|
72
|
+
command = reference_release_command(:recursive => "dependent")
|
73
|
+
assert do
|
74
|
+
command.recursive?
|
75
|
+
end
|
76
|
+
assert do
|
77
|
+
command.recursive_dependent?
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
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.4.
|
4
|
+
version: 1.4.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -190,6 +190,8 @@ files:
|
|
190
190
|
- lib/groonga/command/query-log-flags-remove.rb
|
191
191
|
- lib/groonga/command/query-log-flags-set.rb
|
192
192
|
- lib/groonga/command/range-filter.rb
|
193
|
+
- lib/groonga/command/reference-acquire.rb
|
194
|
+
- lib/groonga/command/reference-release.rb
|
193
195
|
- lib/groonga/command/register.rb
|
194
196
|
- lib/groonga/command/reindex.rb
|
195
197
|
- lib/groonga/command/request-cancel.rb
|
@@ -247,6 +249,8 @@ files:
|
|
247
249
|
- test/command/test-query-log-flags-remove.rb
|
248
250
|
- test/command/test-query-log-flags-set.rb
|
249
251
|
- test/command/test-range-filter.rb
|
252
|
+
- test/command/test-reference-acquire.rb
|
253
|
+
- test/command/test-reference-release.rb
|
250
254
|
- test/command/test-register.rb
|
251
255
|
- test/command/test-reindex.rb
|
252
256
|
- test/command/test-request-cancel.rb
|
@@ -328,6 +332,8 @@ test_files:
|
|
328
332
|
- test/command/test-query-log-flags-remove.rb
|
329
333
|
- test/command/test-query-log-flags-set.rb
|
330
334
|
- test/command/test-range-filter.rb
|
335
|
+
- test/command/test-reference-acquire.rb
|
336
|
+
- test/command/test-reference-release.rb
|
331
337
|
- test/command/test-register.rb
|
332
338
|
- test/command/test-reindex.rb
|
333
339
|
- test/command/test-request-cancel.rb
|