groonga-command 1.5.2 → 1.5.3
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/groonga-command.gemspec +1 -2
- data/lib/groonga/command/base.rb +10 -3
- data/lib/groonga/command/load.rb +2 -0
- data/lib/groonga/command/version.rb +1 -1
- data/test/command/test-base.rb +18 -1
- data/test/command/test-object-remove.rb +7 -2
- data/test/run-test.rb +2 -3
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6cee09a163fa437fa60d3bb047050ed3941cafc0ed14b8c92a3a7c3ae74fc7
|
4
|
+
data.tar.gz: '07080bc6670a7efc38ab3994e6a50b15b6b6afee577512dc8e68a11fe2b3bdc9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77e84ebb13f94d20f8a4c492b91d35ac90d633b151838817f05b5af9902ca606014eec13100eec91cff83f2d3102fd3916f8098db08942ad4486c52d80545b98
|
7
|
+
data.tar.gz: 8fae0696d8f630977664644c17002c0756c7df5b8e01fd98e0a4e62af6ce49138dccd1e2af1464b86e21eccc319360461b07130672926661e69ef192af171fda
|
data/doc/text/news.md
CHANGED
data/groonga-command.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2012-
|
3
|
+
# Copyright (C) 2012-2023 Sutou Kouhei <kou@clear-code.com>
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -60,7 +60,6 @@ Gem::Specification.new do |spec|
|
|
60
60
|
spec.add_development_dependency("red-arrow")
|
61
61
|
spec.add_development_dependency("redcarpet")
|
62
62
|
spec.add_development_dependency("test-unit")
|
63
|
-
spec.add_development_dependency("test-unit-notify")
|
64
63
|
spec.add_development_dependency("yard")
|
65
64
|
end
|
66
65
|
|
data/lib/groonga/command/base.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2023 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
# Copyright (C) 2019 Yasuhiro Horimoto <horimoto@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
@@ -146,6 +146,13 @@ module Groonga
|
|
146
146
|
self[:request_id]
|
147
147
|
end
|
148
148
|
|
149
|
+
# @return [Boolean] `output_trace_log` parameter value.
|
150
|
+
#
|
151
|
+
# @since 1.5.3
|
152
|
+
def output_trace_log?
|
153
|
+
boolean_value(:output_trace_log, default: false, invalid: false)
|
154
|
+
end
|
155
|
+
|
149
156
|
def to_uri_format
|
150
157
|
Format::URI.new(@path_prefix, @command_name, normalized_arguments).path
|
151
158
|
end
|
@@ -241,9 +248,9 @@ module Groonga
|
|
241
248
|
value = value.strip
|
242
249
|
return default if value.empty?
|
243
250
|
case value
|
244
|
-
when "yes"
|
251
|
+
when "yes", "true"
|
245
252
|
true
|
246
|
-
when "no"
|
253
|
+
when "no", "false"
|
247
254
|
false
|
248
255
|
else
|
249
256
|
invalid
|
data/lib/groonga/command/load.rb
CHANGED
@@ -84,6 +84,7 @@ module Groonga
|
|
84
84
|
unless defined?(::Arrow)
|
85
85
|
raise NotImplementedError, "red-arrow is required"
|
86
86
|
end
|
87
|
+
return self[:values] if self[:values].is_a?(::Arrow::Table)
|
87
88
|
source_lines = (original_source || "").lines
|
88
89
|
if source_lines.size >= 2
|
89
90
|
if /\s--columns\s/ =~ source_lines.first
|
@@ -112,6 +113,7 @@ module Groonga
|
|
112
113
|
private
|
113
114
|
def parse_values(values)
|
114
115
|
return values if values.nil?
|
116
|
+
return values if defined?(::Arrow) and values.is_a?(::Arrow::Table)
|
115
117
|
JSON.parse(values)
|
116
118
|
end
|
117
119
|
|
data/test/command/test-base.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2011-
|
1
|
+
# Copyright (C) 2011-2023 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
|
@@ -375,4 +375,21 @@ select \\
|
|
375
375
|
assert_equal(:xml, command.output_type)
|
376
376
|
end
|
377
377
|
end
|
378
|
+
|
379
|
+
sub_test_case("#output_trace_log?") do
|
380
|
+
def test_default
|
381
|
+
command = Groonga::Command::Base.new("table_list", {})
|
382
|
+
assert do
|
383
|
+
not command.output_trace_log?
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
387
|
+
def test_specified
|
388
|
+
command = Groonga::Command::Base.new("table_list",
|
389
|
+
output_trace_log: "yes")
|
390
|
+
assert do
|
391
|
+
command.output_trace_log?
|
392
|
+
end
|
393
|
+
end
|
394
|
+
end
|
378
395
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2016 Kouhei
|
1
|
+
# Copyright (C) 2016-2023 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
|
@@ -43,9 +43,14 @@ class ObjectRemoveCommandTest < Test::Unit::TestCase
|
|
43
43
|
end
|
44
44
|
|
45
45
|
class ForceTest < self
|
46
|
-
def
|
46
|
+
def test_reader_yes
|
47
47
|
command = object_remove_command(:force => "yes")
|
48
48
|
assert_true(command.force?)
|
49
49
|
end
|
50
|
+
|
51
|
+
def test_reader_true
|
52
|
+
command = object_remove_command(force: "true")
|
53
|
+
assert_true(command.force?)
|
54
|
+
end
|
50
55
|
end
|
51
56
|
end
|
data/test/run-test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# Copyright (C) 2012 Kouhei
|
3
|
+
# Copyright (C) 2012-2023 Sutou Kouhei <kou@clear-code.com>
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -24,8 +24,7 @@ base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
|
24
24
|
lib_dir = File.join(base_dir, "lib")
|
25
25
|
test_dir = File.join(base_dir, "test")
|
26
26
|
|
27
|
-
require "test
|
28
|
-
require "test/unit/notify"
|
27
|
+
require "test/unit"
|
29
28
|
|
30
29
|
Test::Unit::Priority.enable
|
31
30
|
|
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.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: test-unit-notify
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: yard
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -280,7 +266,7 @@ homepage: https://github.com/groonga/groonga-command
|
|
280
266
|
licenses:
|
281
267
|
- LGPLv2.1+
|
282
268
|
metadata: {}
|
283
|
-
post_install_message:
|
269
|
+
post_install_message:
|
284
270
|
rdoc_options: []
|
285
271
|
require_paths:
|
286
272
|
- lib
|
@@ -295,8 +281,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
281
|
- !ruby/object:Gem::Version
|
296
282
|
version: '0'
|
297
283
|
requirements: []
|
298
|
-
rubygems_version: 3.
|
299
|
-
signing_key:
|
284
|
+
rubygems_version: 3.5.0.dev
|
285
|
+
signing_key:
|
300
286
|
specification_version: 4
|
301
287
|
summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
|
302
288
|
command. You can write a program that handle Groonga's command by using groonga-command.
|