groonga-command 1.4.9 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +8 -0
- data/lib/groonga/command/column-create.rb +8 -1
- data/lib/groonga/command/table-create.rb +8 -1
- data/lib/groonga/command/version.rb +1 -1
- data/test/command/test-column-create.rb +25 -3
- data/test/command/test-io-flush.rb +1 -1
- data/test/command/test-table-create.rb +16 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0a884cdd095a67a74caa831f67eb420840be13eecc552f2f2f78c90d550c575
|
4
|
+
data.tar.gz: a3c120f49e43c621730b7776db995fc2830b53a0442431633e5dc8f2e3b70a1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cf34717db9e581a457225b247aefb5842b0a082b80269b9a8f22a1d5f5cba5a4153df1e95a5d7d861b2cf41d2f8e9a3adcb16639b76c53c66c16f25864382bf
|
7
|
+
data.tar.gz: 15427c409804f289c14ed6656e6fdbda9676edc2ec069acb48e619fe4a9357fef7f8d67032eb91978603bd79336843b4224a3d0ebd423c8d57317f5c09867cb2
|
data/doc/text/news.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-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
|
@@ -31,6 +31,7 @@ module Groonga
|
|
31
31
|
:flags,
|
32
32
|
:type,
|
33
33
|
:source,
|
34
|
+
:path,
|
34
35
|
]
|
35
36
|
end
|
36
37
|
end
|
@@ -110,6 +111,12 @@ module Groonga
|
|
110
111
|
def sources
|
111
112
|
@sources ||= array_value(:source)
|
112
113
|
end
|
114
|
+
|
115
|
+
# @return [String, nil] Path or nil
|
116
|
+
# @since 1.5.0
|
117
|
+
def path
|
118
|
+
self[:path]
|
119
|
+
end
|
113
120
|
end
|
114
121
|
end
|
115
122
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-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
|
@@ -33,6 +33,7 @@ module Groonga
|
|
33
33
|
:default_tokenizer,
|
34
34
|
:normalizer,
|
35
35
|
:token_filters,
|
36
|
+
:path,
|
36
37
|
]
|
37
38
|
end
|
38
39
|
end
|
@@ -117,6 +118,12 @@ module Groonga
|
|
117
118
|
def token_filters
|
118
119
|
@token_filters ||= array_value(:token_filters)
|
119
120
|
end
|
121
|
+
|
122
|
+
# @return [String, nil] Path or nil
|
123
|
+
# @since 1.5.0
|
124
|
+
def path
|
125
|
+
self[:path]
|
126
|
+
end
|
120
127
|
end
|
121
128
|
end
|
122
129
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-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
|
@@ -28,14 +28,24 @@ class ColumnCreateCommandTest < Test::Unit::TestCase
|
|
28
28
|
flags = "COLUMN_INDEX"
|
29
29
|
type = "Posts"
|
30
30
|
source = "content"
|
31
|
-
|
32
|
-
|
31
|
+
path = "Lexicon.content_index"
|
32
|
+
|
33
|
+
command = column_create_command({},
|
34
|
+
[
|
35
|
+
table,
|
36
|
+
name,
|
37
|
+
flags,
|
38
|
+
type,
|
39
|
+
source,
|
40
|
+
path,
|
41
|
+
])
|
33
42
|
assert_equal({
|
34
43
|
:table => table,
|
35
44
|
:name => name,
|
36
45
|
:flags => flags,
|
37
46
|
:type => type,
|
38
47
|
:source => source,
|
48
|
+
:path => path,
|
39
49
|
},
|
40
50
|
command.arguments)
|
41
51
|
end
|
@@ -198,4 +208,16 @@ class ColumnCreateCommandTest < Test::Unit::TestCase
|
|
198
208
|
command.sources)
|
199
209
|
end
|
200
210
|
end
|
211
|
+
|
212
|
+
class PathTest < self
|
213
|
+
def test_specified
|
214
|
+
command = column_create_command({"path" => "Lexicon.content_index"})
|
215
|
+
assert_equal("Lexicon.content_index", command.path)
|
216
|
+
end
|
217
|
+
|
218
|
+
def test_omitted
|
219
|
+
command = column_create_command
|
220
|
+
assert_nil(command.path)
|
221
|
+
end
|
222
|
+
end
|
201
223
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-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
|
@@ -30,6 +30,7 @@ class TableCreateCommandTest < Test::Unit::TestCase
|
|
30
30
|
default_tokenizer = "TokenBigram"
|
31
31
|
normalizer = "NormalizerAuto"
|
32
32
|
token_filters = "TokenFilterStopWord|TokenFilterStem"
|
33
|
+
path = "tables.users"
|
33
34
|
|
34
35
|
ordered_arguments = [
|
35
36
|
name,
|
@@ -39,6 +40,7 @@ class TableCreateCommandTest < Test::Unit::TestCase
|
|
39
40
|
default_tokenizer,
|
40
41
|
normalizer,
|
41
42
|
token_filters,
|
43
|
+
path,
|
42
44
|
]
|
43
45
|
command = table_create_command({}, ordered_arguments)
|
44
46
|
assert_equal({
|
@@ -49,6 +51,7 @@ class TableCreateCommandTest < Test::Unit::TestCase
|
|
49
51
|
:default_tokenizer => default_tokenizer,
|
50
52
|
:normalizer => normalizer,
|
51
53
|
:token_filters => token_filters,
|
54
|
+
:path => path,
|
52
55
|
},
|
53
56
|
command.arguments)
|
54
57
|
end
|
@@ -230,4 +233,16 @@ class TableCreateCommandTest < Test::Unit::TestCase
|
|
230
233
|
assert_equal([], command.token_filters)
|
231
234
|
end
|
232
235
|
end
|
236
|
+
|
237
|
+
class PathTest < self
|
238
|
+
def test_specified
|
239
|
+
command = table_create_command({"path" => "tables.users"})
|
240
|
+
assert_equal("tables.users", command.path)
|
241
|
+
end
|
242
|
+
|
243
|
+
def test_omitted
|
244
|
+
command = table_create_command
|
245
|
+
assert_nil(command.path)
|
246
|
+
end
|
247
|
+
end
|
233
248
|
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
|
+
version: 1.5.0
|
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-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: '0'
|
293
293
|
requirements: []
|
294
|
-
rubygems_version: 3.2.0.
|
294
|
+
rubygems_version: 3.2.0.rc.1
|
295
295
|
signing_key:
|
296
296
|
specification_version: 4
|
297
297
|
summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
|