groonga-command 1.3.5 → 1.3.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a4f78fab492909add50d825ad9e8545fec6e3c23fa552946ed8f4a15ef49e7a
4
- data.tar.gz: 462abef327588d8440b41ac634714ad0cc7209ba46efd96b1c32f79b9f7ee7d3
3
+ metadata.gz: b257586fb0c409ff09c4fa8a91d72be705be0392345a2ab85828031eb1174af6
4
+ data.tar.gz: 7b944f40cfa45ed828bf476d85773c89b61a49313ca41c04d671ee217850d4e8
5
5
  SHA512:
6
- metadata.gz: 8abeea1c3ccde4309240e67b0f6853211911ca0a6093c4e1314d08a58a23a051515935db318875c6bab0591bd432e98db082cf4ffcc86094a1492f1ccac72012
7
- data.tar.gz: ba24c65f52dd84208e0afcd4d96b5aa22b63feae8efda2e449cec94167b251aeb4d41fe0014f4e46d71e108e7b45cef2d4af72338310474d83921772700623d4
6
+ metadata.gz: 3b8f6a8ab4915ca9671f080d1bee34a5662ad4fa809790d2c4556a5cc72b18399e7d2163e79b13f27bf10e9e88cddf1d67a22fd0d4e2e6d0b1802232879accb8
7
+ data.tar.gz: 83437442ed05805fede250bfb8f01263d4cefdbf3991e3fe6c74a9f41ce6fa79bff708f9a227710306fe4c4d9e0d458671fc7f0f9c43e36d10d483027a139b5d
data/doc/text/news.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # News
2
2
 
3
+ ## 1.3.6: 2018-08-16
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::RangeFilter#conditions}: Added.
8
+
9
+ * {Groonga::Command::LogicalSelect#conditions}: Added.
10
+
11
+ * {Groonga::Command::LogicalRangeFilter#conditions}: Added.
12
+
3
13
  ## 1.3.5: 2018-05-21
4
14
 
5
15
  ### Improvements
@@ -1,6 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
1
  # Copyright (C) 2015 Hiroshi Hatake <hatake@clear-code.com>
2
+ # Copyright (C) 2018 Kouhei Sutou <kou@clear-code.com>
4
3
  #
5
4
  # This library is free software; you can redistribute it and/or
6
5
  # modify it under the terms of the GNU Lesser General Public
@@ -17,6 +16,7 @@
17
16
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
17
 
19
18
  require "groonga/command/base"
19
+ require "groonga/command/searchable"
20
20
 
21
21
  module Groonga
22
22
  module Command
@@ -24,6 +24,8 @@ module Groonga
24
24
  #
25
25
  # @since 1.1.1
26
26
  class LogicalRangeFilter < Base
27
+ include Searchable
28
+
27
29
  class << self
28
30
  def command_name
29
31
  "logical_range_filter"
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2015 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2015-2018 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
@@ -15,6 +15,7 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  require "groonga/command/base"
18
+ require "groonga/command/searchable"
18
19
 
19
20
  module Groonga
20
21
  module Command
@@ -22,6 +23,8 @@ module Groonga
22
23
  #
23
24
  # @since 1.1.3
24
25
  class LogicalSelect < Base
26
+ include Searchable
27
+
25
28
  class << self
26
29
  def command_name
27
30
  "logical_select"
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2015 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2015-2018 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
@@ -15,6 +15,7 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  require "groonga/command/base"
18
+ require "groonga/command/searchable"
18
19
 
19
20
  module Groonga
20
21
  module Command
@@ -22,6 +23,8 @@ module Groonga
22
23
  #
23
24
  # @since 1.1.0
24
25
  class RangeFilter < Base
26
+ include Searchable
27
+
25
28
  class << self
26
29
  def command_name
27
30
  "range_filter"
@@ -0,0 +1,35 @@
1
+ # Copyright (C) 2012-2018 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
+ module Groonga
18
+ module Command
19
+ module Searchable
20
+ def conditions
21
+ @conditions ||= split_filter_conditions
22
+ end
23
+
24
+ private
25
+ def split_filter_conditions
26
+ (filter || "").split(/(?:&&|&!|\|\|)/).collect do |condition|
27
+ condition = condition.strip
28
+ condition = condition.gsub(/\A[\s\(]*/, '')
29
+ condition = condition.gsub(/[\s\)]*\z/, '') unless /\(/ =~ condition
30
+ condition
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
2
2
  # Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
3
3
  #
4
4
  # This library is free software; you can redistribute it and/or
@@ -16,10 +16,13 @@
16
16
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
18
  require "groonga/command/base"
19
+ require "groonga/command/searchable"
19
20
 
20
21
  module Groonga
21
22
  module Command
22
23
  class Select < Base
24
+ include Searchable
25
+
23
26
  class << self
24
27
  def command_name
25
28
  "select"
@@ -85,10 +88,6 @@ module Groonga
85
88
  self[:filter]
86
89
  end
87
90
 
88
- def conditions
89
- @conditions ||= split_filter_conditions
90
- end
91
-
92
91
  def drilldowns
93
92
  @drilldowns ||= array_value(:drilldown)
94
93
  end
@@ -130,15 +129,6 @@ module Groonga
130
129
  end
131
130
 
132
131
  private
133
- def split_filter_conditions
134
- (filter || "").split(/(?:&&|&!|\|\|)/).collect do |condition|
135
- condition = condition.strip
136
- condition = condition.gsub(/\A[\s\(]*/, '')
137
- condition = condition.gsub(/[\s\)]*\z/, '') unless /\(/ =~ condition
138
- condition
139
- end
140
- end
141
-
142
132
  def parse_labeled_drilldowns
143
133
  raw_labeled_drilldowns = {}
144
134
  @arguments.each do |name, value|
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2017 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2018 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
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.3.5"
19
+ VERSION = "1.3.6"
20
20
  end
21
21
  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.5
4
+ version: 1.3.6
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-05-21 00:00:00.000000000 Z
11
+ date: 2018-08-16 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/ruby-eval.rb
180
180
  - lib/groonga/command/ruby-load.rb
181
181
  - lib/groonga/command/schema.rb
182
+ - lib/groonga/command/searchable.rb
182
183
  - lib/groonga/command/select.rb
183
184
  - lib/groonga/command/shutdown.rb
184
185
  - lib/groonga/command/status.rb
@@ -268,64 +269,64 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
269
  version: '0'
269
270
  requirements: []
270
271
  rubyforge_project:
271
- rubygems_version: 2.7.7
272
+ rubygems_version: 3.0.0.beta1
272
273
  signing_key:
273
274
  specification_version: 4
274
275
  summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
275
276
  command. You can write a program that handle Groonga's command by using groonga-command.
276
277
  test_files:
277
- - test/groonga-command-test-utils.rb
278
- - test/command/test-query-log-flags-set.rb
279
- - test/command/test-config-delete.rb
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
283
+ - 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
288
+ - test/command/test-column-create.rb
289
+ - test/command/test-query-log-flags-get.rb
290
+ - test/command/test-select.rb
291
+ - test/command/test-shutdown.rb
280
292
  - test/command/test-object-remove.rb
293
+ - test/command/test-logical-select.rb
281
294
  - test/command/test-table-tokenize.rb
282
- - test/command/test-reindex.rb
283
- - test/command/test-plugin-unregister.rb
284
- - test/command/test-io-flush.rb
285
- - test/command/test-base.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
+ - test/command/test-query-expand.rb
286
301
  - test/command/test-query-log-flags-add.rb
287
- - test/command/test-logical-count.rb
288
- - test/command/test-table-rename.rb
289
- - test/command/test-column-rename.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
290
306
  - test/command/test-dump.rb
291
- - test/command/test-normalize.rb
292
- - test/command/test-config-get.rb
293
- - test/command/test-query-log-flags-remove.rb
294
- - test/command/test-register.rb
295
- - test/command/test-shutdown.rb
307
+ - test/command/test-query-log-flags-set.rb
308
+ - test/command/test-truncate.rb
296
309
  - test/command/test-delete.rb
297
- - test/command/test-column-copy.rb
298
- - test/command/test-tokenize.rb
299
- - test/command/test-log-put.rb
300
- - test/command/test-load.rb
301
- - test/command/test-column-list.rb
310
+ - test/command/test-ruby-load.rb
302
311
  - test/command/test-plugin-register.rb
303
- - test/command/test-request-cancel.rb
304
- - test/command/test-column-create.rb
305
- - test/command/test-query-log-flags-get.rb
306
- - test/command/test-config-set.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
317
+ - test/command/test-table-copy.rb
318
+ - test/command/test-get.rb
307
319
  - test/command/test-logical-range-filter.rb
308
- - test/command/test-object-inspect.rb
320
+ - test/command/test-config-delete.rb
321
+ - test/command/test-logical-table-remove.rb
309
322
  - test/command/format/test-command.rb
310
- - test/command/test-logical-select.rb
311
- - test/command/test-get.rb
323
+ - test/command/test-reindex.rb
312
324
  - test/command/test-thread-limit.rb
313
- - test/command/test-table-list.rb
314
- - test/command/test-object-exist.rb
315
- - test/command/test-log-level.rb
316
- - test/command/test-range-filter.rb
317
- - test/command/test-status.rb
318
- - test/command/test-logical-shard-list.rb
319
- - test/command/test-schema.rb
320
- - test/command/test-suggest.rb
321
- - test/command/test-select.rb
322
- - test/command/test-column-remove.rb
325
+ - test/command/test-config-set.rb
326
+ - test/command/test-tokenize.rb
323
327
  - test/command/test-ruby-eval.rb
328
+ - test/command/test-status.rb
329
+ - test/command/test-register.rb
324
330
  - test/command/test-table-create.rb
325
- - test/command/test-table-remove.rb
326
- - test/command/test-ruby-load.rb
327
- - test/command/test-table-copy.rb
328
- - test/command/test-query-expand.rb
329
- - test/command/test-truncate.rb
330
- - test/command/test-logical-table-remove.rb
331
331
  - test/run-test.rb
332
+ - test/groonga-command-test-utils.rb