groonga-client 0.3.2 → 0.3.3
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 +6 -0
- data/lib/groonga/client/response/load.rb +7 -3
- data/lib/groonga/client/version.rb +1 -1
- data/test/response/test-load.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07f89351f5ba7dc1fbfd0b03c350a124af15dd07
|
4
|
+
data.tar.gz: 0e428a4ca114c09cf9d536f59faa1aa89bfb09db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38dff0be4468d31c5afe7b8c0597d6c356b95ef8f8b322f726348bfa32a4568bd3dbc436a856f1939e8aa403a003e67930edd9c8f1dffb05ccb747f6f1a41c2a
|
7
|
+
data.tar.gz: b70ced387a66aafc5a7cca4444e337883790af77ea06520abf1f38cf87d7b9f981a88889aeb89db9ce2d189678a5a8deb72be36936611e455966645d157051a0
|
data/doc/text/news.md
CHANGED
@@ -24,6 +24,8 @@ module Groonga
|
|
24
24
|
Response.register("load", self)
|
25
25
|
|
26
26
|
# @return [Integer] The number of loaded records.
|
27
|
+
#
|
28
|
+
# @since 0.3.2
|
27
29
|
attr_accessor :n_loaded_records
|
28
30
|
|
29
31
|
# @return [::Array<Integer>] The IDs of loaded records. ID is
|
@@ -31,7 +33,9 @@ module Groonga
|
|
31
33
|
#
|
32
34
|
# If you don't specify `yes` to `output_ids` `load`
|
33
35
|
# parameter, this is always an empty array.
|
34
|
-
|
36
|
+
#
|
37
|
+
# @since 0.3.3
|
38
|
+
attr_accessor :loaded_ids
|
35
39
|
|
36
40
|
def body=(body)
|
37
41
|
super(body)
|
@@ -42,10 +46,10 @@ module Groonga
|
|
42
46
|
def parse_body(body)
|
43
47
|
if body.is_a?(::Hash)
|
44
48
|
@n_loaded_records = body["n_loaded_records"]
|
45
|
-
@
|
49
|
+
@loaded_ids = body["loaded_ids"] || []
|
46
50
|
else
|
47
51
|
@n_loaded_records = body
|
48
|
-
@
|
52
|
+
@loaded_ids = []
|
49
53
|
end
|
50
54
|
end
|
51
55
|
end
|
data/test/response/test-load.rb
CHANGED
@@ -43,12 +43,12 @@ class TestResponseLoad < Test::Unit::TestCase
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
sub_test_case("#
|
46
|
+
sub_test_case("#loaded_ids") do
|
47
47
|
test("command_version=1") do
|
48
48
|
command = Groonga::Command::Load.new("load",
|
49
49
|
{"command_version" => "1"})
|
50
50
|
response = create_response(command, 29)
|
51
|
-
assert_equal([], response.
|
51
|
+
assert_equal([], response.loaded_ids)
|
52
52
|
end
|
53
53
|
|
54
54
|
sub_test_case("command_version=3") do
|
@@ -65,13 +65,13 @@ class TestResponseLoad < Test::Unit::TestCase
|
|
65
65
|
"command_version" => "3",
|
66
66
|
"output_ids" => "yes",
|
67
67
|
})
|
68
|
-
|
68
|
+
loaded_ids = [1, 2, 0, 4, 3]
|
69
69
|
response = create_response(command,
|
70
70
|
{
|
71
71
|
"n_loaded_records" => 4,
|
72
|
-
"
|
72
|
+
"loaded_ids" => loaded_ids,
|
73
73
|
})
|
74
|
-
assert_equal(
|
74
|
+
assert_equal(loaded_ids, response.loaded_ids)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groonga-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Haruka Yoshihara
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-12-
|
13
|
+
date: 2016-12-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gqtp
|