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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe62b9d5aed0f3cbfbfa7a7b5b9c5865f6c70886355f3a5c7086399183c62b83
4
- data.tar.gz: 540863dccacf354e6011fcac61c8e5c3ad03097ce85107b00e7524b1857b3d08
3
+ metadata.gz: e0a884cdd095a67a74caa831f67eb420840be13eecc552f2f2f78c90d550c575
4
+ data.tar.gz: a3c120f49e43c621730b7776db995fc2830b53a0442431633e5dc8f2e3b70a1e
5
5
  SHA512:
6
- metadata.gz: 7ee5c1ef2e8994b4caa48e88105c9cae72062f0ce7a24071c621c138f098e6e79a94dab16ad93773ead68a0d9eded7f6c49c11ab93cba01f0b999bdd1b06cba3
7
- data.tar.gz: b65924d1478338a21cfcf9afc4648b9bfde02d368882f5f2d668eacc516b1706f6af80abd641a97b5a30b3a0d1187d764421fd4049b8a98a42e45ae150d5697a
6
+ metadata.gz: 3cf34717db9e581a457225b247aefb5842b0a082b80269b9a8f22a1d5f5cba5a4153df1e95a5d7d861b2cf41d2f8e9a3adcb16639b76c53c66c16f25864382bf
7
+ data.tar.gz: 15427c409804f289c14ed6656e6fdbda9676edc2ec069acb48e619fe4a9357fef7f8d67032eb91978603bd79336843b4224a3d0ebd423c8d57317f5c09867cb2
@@ -1,5 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 1.5.0: 2020-09-09
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::TableCreate}: Added support for `path`.
8
+
9
+ * {Groonga::Command::ColumnCreate}: Added support for `path`.
10
+
3
11
  ## 1.4.9: 2020-06-14
4
12
 
5
13
  ### Improvements
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
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-2016 Kouhei Sutou <kou@clear-code.com>
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
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.4.9"
19
+ VERSION = "1.5.0"
20
20
  end
21
21
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
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
- command = column_create_command({}, [table, name, flags, type, source])
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
@@ -69,7 +69,7 @@ class IOFlushCommandTest < Test::Unit::TestCase
69
69
  end
70
70
 
71
71
  def test_dependent
72
- command = reference_acquire_command(:recursive => "dependent")
72
+ command = io_flush_command(:recursive => "dependent")
73
73
  assert do
74
74
  command.recursive?
75
75
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
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.9
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-06-14 00:00:00.000000000 Z
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.pre1
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