groonga-client 0.7.0 → 0.7.1
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/Rakefile +10 -0
- data/doc/text/news.md +17 -0
- data/groonga-client.gemspec +1 -0
- data/lib/groonga/client/request/select.rb +7 -7
- data/lib/groonga/client/response/column-list.rb +3 -2
- data/lib/groonga/client/version.rb +1 -1
- data/lib/groonga/client.rb +2 -2
- data/test/response/test-column-list.rb +44 -1
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0be2f54a0fbe86874fdf6375d2caa1b65a1511466d7afeb0b1a8df88f8c24499
|
4
|
+
data.tar.gz: fed9c73ff5bc90fde8f2e378817e6f8967cbf5178c9185fe53c8c4ba19ee8469
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f09f0826709867b8258837aabaa9e99f7d011c9ceca3b4337cfb322a46a217db310281687c8ea60d791cc759a2bacacb6afdba0911abfcb9cf458eae53c1183c
|
7
|
+
data.tar.gz: 9f36c2119a7b93f35e3d3c8d5fd11d32cd5987bd1f7d2ea38a50413b441299db260367f8aeafe89c2a3e36844ddf8ef4d6e7c52acf74267bab8b8948dad5fa39
|
data/Rakefile
CHANGED
@@ -44,3 +44,13 @@ desc "Run tests"
|
|
44
44
|
task :test do
|
45
45
|
ruby("test/run-test.rb")
|
46
46
|
end
|
47
|
+
|
48
|
+
release_task = Rake.application["release"]
|
49
|
+
# We use Trusting Publishing
|
50
|
+
release_task.prerequisites.delete("build")
|
51
|
+
release_task.prerequisites.delete("release:rubygem_push")
|
52
|
+
release_task_comment = release_task.comment
|
53
|
+
if release_task_comment
|
54
|
+
release_task.clear_comments
|
55
|
+
release_task.comment = release_task_comment.gsub(/ and build.*$/, "")
|
56
|
+
end
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# NEWS
|
2
2
|
|
3
|
+
## 0.7.1 - 2024-12-24
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Added explicit csv gem dependency for Ruby 3.3
|
8
|
+
* GH-35
|
9
|
+
* Reported by Tatsuhiko Miyagawa
|
10
|
+
|
11
|
+
* `column_list`: Added support for `generator` that is available
|
12
|
+
since Groonga 14.1.0.
|
13
|
+
|
14
|
+
* Suppressed warnings with Ruby 3.4.
|
15
|
+
|
16
|
+
### Thanks
|
17
|
+
|
18
|
+
* Tatsuhiko Miyagawa
|
19
|
+
|
3
20
|
## 0.7.0 - 2024-10-16
|
4
21
|
|
5
22
|
### Improvements
|
data/groonga-client.gemspec
CHANGED
@@ -47,6 +47,7 @@ Gem::Specification.new do |spec|
|
|
47
47
|
spec.executables = Dir.glob("*")
|
48
48
|
end
|
49
49
|
|
50
|
+
spec.add_runtime_dependency("csv")
|
50
51
|
spec.add_runtime_dependency("gqtp", ">= 1.0.4")
|
51
52
|
spec.add_runtime_dependency("groonga-command", ">= 1.4.7")
|
52
53
|
spec.add_runtime_dependency("groonga-command-parser", ">= 1.1.0")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2016-
|
1
|
+
# Copyright (C) 2016-2024 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
|
@@ -377,7 +377,7 @@ module Groonga
|
|
377
377
|
# @since 0.5.0
|
378
378
|
def geo_in_rectangle(column_name_or_point,
|
379
379
|
top_left, bottom_right)
|
380
|
-
expression = "geo_in_rectangle(%{column_name_or_point}"
|
380
|
+
expression = +"geo_in_rectangle(%{column_name_or_point}"
|
381
381
|
expression << ", %{top_left}"
|
382
382
|
expression << ", %{bottom_right}"
|
383
383
|
expression << ")"
|
@@ -440,7 +440,7 @@ module Groonga
|
|
440
440
|
center,
|
441
441
|
radius_or_point,
|
442
442
|
approximate_type="rectangle")
|
443
|
-
expression = "geo_in_circle(%{column_name_or_point}"
|
443
|
+
expression = +"geo_in_circle(%{column_name_or_point}"
|
444
444
|
expression << ", %{center}"
|
445
445
|
expression << ", %{radius_or_point}"
|
446
446
|
expression << ", %{approximate_type}"
|
@@ -527,7 +527,7 @@ module Groonga
|
|
527
527
|
self.class.column_namify(column_name,
|
528
528
|
"first",
|
529
529
|
"#{self.class}\##{__method__}")
|
530
|
-
expression = "between(%{column_name}"
|
530
|
+
expression = +"between(%{column_name}"
|
531
531
|
expression << ", %{min}"
|
532
532
|
expression << ", %{min_border}"
|
533
533
|
expression << ", %{max}"
|
@@ -578,7 +578,7 @@ module Groonga
|
|
578
578
|
"first",
|
579
579
|
"#{self.class}\##{__method__}")
|
580
580
|
expression_values = {column_name: column_name}
|
581
|
-
expression = "in_values(%{column_name}"
|
581
|
+
expression = +"in_values(%{column_name}"
|
582
582
|
values.each_with_index do |value, i|
|
583
583
|
expression << ", %{value#{i}}"
|
584
584
|
expression_values[:"value#{i}"] = value
|
@@ -764,7 +764,7 @@ module Groonga
|
|
764
764
|
ScriptSyntax.format_string(value.to_s)
|
765
765
|
end
|
766
766
|
when ::Array
|
767
|
-
escaped_value = "["
|
767
|
+
escaped_value = +"["
|
768
768
|
value.each_with_index do |element, i|
|
769
769
|
escaped_value << ", " if i > 0
|
770
770
|
escaped_value << escape_script_syntax_value(element)
|
@@ -772,7 +772,7 @@ module Groonga
|
|
772
772
|
escaped_value << "]"
|
773
773
|
escaped_value
|
774
774
|
when ::Hash
|
775
|
-
escaped_value = "{"
|
775
|
+
escaped_value = +"{"
|
776
776
|
value.each_with_index do |(k, v), i|
|
777
777
|
escaped_value << ", " if i > 0
|
778
778
|
escaped_value << escape_script_syntax_value(k.to_s)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013 Haruka Yoshihara <yoshihara@clear-code.com>
|
2
|
-
# Copyright (C) 2013-
|
2
|
+
# Copyright (C) 2013-2024 Sutou Kouhei <kou@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
5
5
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -63,7 +63,8 @@ module Groonga
|
|
63
63
|
:flags,
|
64
64
|
:domain,
|
65
65
|
:range,
|
66
|
-
:source
|
66
|
+
:source,
|
67
|
+
:generator)
|
67
68
|
# @return [String]
|
68
69
|
# The column name with table name such as `TABLE.COLUMN`.
|
69
70
|
#
|
data/lib/groonga/client.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013 Haruka Yoshihara <yoshihara@clear-code.com>
|
2
|
-
# Copyright (C) 2013-
|
2
|
+
# Copyright (C) 2013-2024 Sutou Kouhei <kou@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
5
5
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -153,7 +153,7 @@ module Groonga
|
|
153
153
|
def load(parameters, &block)
|
154
154
|
values = parameters[:values]
|
155
155
|
if values.is_a?(Array)
|
156
|
-
json = "["
|
156
|
+
json = +"["
|
157
157
|
values.each_with_index do |value, i|
|
158
158
|
if i.zero?
|
159
159
|
json << "\n"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (C) 2013 Kosuke Asami
|
2
|
-
# Copyright (C) 2017 Kouhei
|
2
|
+
# Copyright (C) 2017-2024 Sutou Kouhei <kou@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
5
5
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -30,6 +30,49 @@ class TestResponseColumnList < Test::Unit::TestCase
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_parse
|
33
|
+
header = [0, 1372430096.70991, 0.000522851943969727]
|
34
|
+
body = [
|
35
|
+
[
|
36
|
+
["id", "UInt32"],
|
37
|
+
["name", "ShortText"],
|
38
|
+
["path", "ShortText"],
|
39
|
+
["type", "ShortText"],
|
40
|
+
["flags", "ShortText"],
|
41
|
+
["domain", "ShortText"],
|
42
|
+
["range", "ShortText"],
|
43
|
+
["source", "ShortText"],
|
44
|
+
["generator", "ShortText"],
|
45
|
+
],
|
46
|
+
[
|
47
|
+
256,
|
48
|
+
"content",
|
49
|
+
"/tmp/test.db.0000100",
|
50
|
+
"var",
|
51
|
+
"COLUMN_SCALAR|PERSISTENT",
|
52
|
+
"TestTable",
|
53
|
+
"ShortText",
|
54
|
+
[],
|
55
|
+
"html_untag(html_content)",
|
56
|
+
],
|
57
|
+
]
|
58
|
+
raw_response = [header, body].to_json
|
59
|
+
|
60
|
+
response = parse_raw_response("column_list", raw_response)
|
61
|
+
assert_equal([
|
62
|
+
column(:id => 256,
|
63
|
+
:name => "content",
|
64
|
+
:path => "/tmp/test.db.0000100",
|
65
|
+
:type => "var",
|
66
|
+
:flags => "COLUMN_SCALAR|PERSISTENT",
|
67
|
+
:domain => "TestTable",
|
68
|
+
:range => "ShortText",
|
69
|
+
:source => [],
|
70
|
+
:generator => "html_untag(html_content)"),
|
71
|
+
],
|
72
|
+
response.to_a)
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_parse_before_14_1_0
|
33
76
|
header = [0, 1372430096.70991, 0.000522851943969727]
|
34
77
|
body = [
|
35
78
|
[
|
metadata
CHANGED
@@ -1,16 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groonga-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Haruka Yoshihara
|
8
8
|
- Kouhei Sutou
|
9
9
|
- Kosuke Asami
|
10
|
+
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2024-
|
13
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: csv
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
14
29
|
- !ruby/object:Gem::Dependency
|
15
30
|
name: gqtp
|
16
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -285,6 +300,7 @@ homepage: https://github.com/ranguba/groonga-client
|
|
285
300
|
licenses:
|
286
301
|
- LGPLv2.1+
|
287
302
|
metadata: {}
|
303
|
+
post_install_message:
|
288
304
|
rdoc_options: []
|
289
305
|
require_paths:
|
290
306
|
- lib
|
@@ -299,7 +315,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
315
|
- !ruby/object:Gem::Version
|
300
316
|
version: '0'
|
301
317
|
requirements: []
|
302
|
-
rubygems_version: 3.
|
318
|
+
rubygems_version: 3.5.22
|
319
|
+
signing_key:
|
303
320
|
specification_version: 4
|
304
321
|
summary: Groonga-client is a client for Groonga (http://groonga.org/) implemented
|
305
322
|
with pure Ruby. You can use it without Groonga.
|