groonga-command 1.5.2 → 1.5.4
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/Gemfile +4 -2
- data/README.md +0 -1
- data/Rakefile +12 -2
- data/doc/text/news.md +14 -0
- data/groonga-command.gemspec +1 -2
- data/lib/groonga/command/base.rb +10 -3
- data/lib/groonga/command/format/uri.rb +2 -4
- data/lib/groonga/command/load.rb +2 -0
- data/lib/groonga/command/version.rb +2 -2
- data/test/command/test-base.rb +18 -1
- data/test/command/test-object-remove.rb +7 -2
- data/test/run-test.rb +2 -5
- metadata +3 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd2a0542d371ca654025865c5d259830cc7643f16e86f8c1a085ebe5d441a44c
|
|
4
|
+
data.tar.gz: 157624d0c5fd4abde6c4bdeded7cf47f911f51f2ab1bbbfe250bfe2236786cb4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 890cdd52c8b15b0fbdb274c481832f6299ecfdde5a30930403c77b4879742575a5424d250323e88eba9f054b14caf137bf5c1065054479d03038c638e1f15c1b
|
|
7
|
+
data.tar.gz: 7deb725799b3d77c6518f619be8765f8f1a8ec6b8c0757a59daa82462ce98a3d0b4f2a1ca5d721e3ee42a6a95e98df6ccf64a9d03562963f218b5fa2b875fafa
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# -*-
|
|
1
|
+
# -*- ruby -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2012 Kouhei
|
|
3
|
+
# Copyright (C) 2012-2025 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
|
|
@@ -18,4 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
source "https://rubygems.org/"
|
|
20
20
|
|
|
21
|
+
plugin "rubygems-requirements-system"
|
|
22
|
+
|
|
21
23
|
gemspec
|
data/README.md
CHANGED
data/Rakefile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# -*-
|
|
1
|
+
# -*- ruby -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2012 Kouhei
|
|
3
|
+
# Copyright (C) 2012-2026 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
|
|
@@ -43,3 +43,13 @@ desc "Run tests"
|
|
|
43
43
|
task :test do
|
|
44
44
|
ruby("test/run-test.rb")
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
release_task = Rake.application["release"]
|
|
48
|
+
# We use Trusting Publishing
|
|
49
|
+
release_task.prerequisites.delete("build")
|
|
50
|
+
release_task.prerequisites.delete("release:rubygem_push")
|
|
51
|
+
release_task_comment = release_task.comment
|
|
52
|
+
if release_task_comment
|
|
53
|
+
release_task.clear_comments
|
|
54
|
+
release_task.comment = release_task_comment.gsub(/ and build.*$/, "")
|
|
55
|
+
end
|
data/doc/text/news.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# News
|
|
2
2
|
|
|
3
|
+
## 1.5.4: 2026-06-15
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
* Changed to use `cgi/escape` instead of `cgi`.
|
|
8
|
+
|
|
9
|
+
## 1.5.3: 2023-11-07
|
|
10
|
+
|
|
11
|
+
### Improvements
|
|
12
|
+
|
|
13
|
+
* {Groonga::Command::Load}: Added support for `Arrow::Table` as values.
|
|
14
|
+
|
|
15
|
+
* {Groonga::Command::Base}: Added support for `output_trace_log`.
|
|
16
|
+
|
|
3
17
|
## 1.5.2: 2021-08-25
|
|
4
18
|
|
|
5
19
|
### Improvements
|
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
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Copyright (C) 2012-2014 Kouhei Sutou <kou@clear-code.com>
|
|
1
|
+
# Copyright (C) 2012-2025 Sutou Kouhei <kou@clear-code.com>
|
|
4
2
|
#
|
|
5
3
|
# This library is free software; you can redistribute it and/or
|
|
6
4
|
# modify it under the terms of the GNU Lesser General Public
|
|
@@ -16,7 +14,7 @@
|
|
|
16
14
|
# License along with this library; if not, write to the Free Software
|
|
17
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18
16
|
|
|
19
|
-
require "cgi"
|
|
17
|
+
require "cgi/escape"
|
|
20
18
|
|
|
21
19
|
module Groonga
|
|
22
20
|
module Command
|
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
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2012-
|
|
1
|
+
# Copyright (C) 2012-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
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
module Groonga
|
|
18
18
|
module Command
|
|
19
|
-
VERSION = "1.5.
|
|
19
|
+
VERSION = "1.5.4"
|
|
20
20
|
end
|
|
21
21
|
end
|
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-2025 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
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
$VERBOSE = true
|
|
20
20
|
|
|
21
|
-
$KCODE = "u" if RUBY_VERSION < "1.9"
|
|
22
|
-
|
|
23
21
|
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
|
24
22
|
lib_dir = File.join(base_dir, "lib")
|
|
25
23
|
test_dir = File.join(base_dir, "test")
|
|
26
24
|
|
|
27
|
-
require "test
|
|
28
|
-
require "test/unit/notify"
|
|
25
|
+
require "test/unit"
|
|
29
26
|
|
|
30
27
|
Test::Unit::Priority.enable
|
|
31
28
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kouhei Sutou
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: json
|
|
@@ -108,20 +107,6 @@ dependencies:
|
|
|
108
107
|
- - ">="
|
|
109
108
|
- !ruby/object:Gem::Version
|
|
110
109
|
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
110
|
- !ruby/object:Gem::Dependency
|
|
126
111
|
name: yard
|
|
127
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -280,7 +265,6 @@ homepage: https://github.com/groonga/groonga-command
|
|
|
280
265
|
licenses:
|
|
281
266
|
- LGPLv2.1+
|
|
282
267
|
metadata: {}
|
|
283
|
-
post_install_message:
|
|
284
268
|
rdoc_options: []
|
|
285
269
|
require_paths:
|
|
286
270
|
- lib
|
|
@@ -295,8 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
295
279
|
- !ruby/object:Gem::Version
|
|
296
280
|
version: '0'
|
|
297
281
|
requirements: []
|
|
298
|
-
rubygems_version:
|
|
299
|
-
signing_key:
|
|
282
|
+
rubygems_version: 4.0.10
|
|
300
283
|
specification_version: 4
|
|
301
284
|
summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
|
|
302
285
|
command. You can write a program that handle Groonga's command by using groonga-command.
|