groonga-command 1.5.2 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cf6a57f9110c2d5d3367cff7c2d787e4ef439a067428a276c4f7fc1894797a2
4
- data.tar.gz: b0c455cbf9b6f90d6f92a4323a29ccdc3b63e06ebeb7712b2cdaf6cb51d25139
3
+ metadata.gz: 1d6cee09a163fa437fa60d3bb047050ed3941cafc0ed14b8c92a3a7c3ae74fc7
4
+ data.tar.gz: '07080bc6670a7efc38ab3994e6a50b15b6b6afee577512dc8e68a11fe2b3bdc9'
5
5
  SHA512:
6
- metadata.gz: 6cd5e31a78862c2c934041de95e3a34be83d4db7caba059fbc0d10cb579c978d3f430abf845f239d0cc24d898c202ef22c1f6331ccb1141de3556a31a22c9d45
7
- data.tar.gz: c811309bb82936ed586847ed631e5efff2398ca9b10f2b9cb2d849fc6bfb385bf4d463d139bc71de0be4fd964da36608266f887d1c7d1076387db0a4cc77cb86
6
+ metadata.gz: 77e84ebb13f94d20f8a4c492b91d35ac90d633b151838817f05b5af9902ca606014eec13100eec91cff83f2d3102fd3916f8098db08942ad4486c52d80545b98
7
+ data.tar.gz: 8fae0696d8f630977664644c17002c0756c7df5b8e01fd98e0a4e62af6ce49138dccd1e2af1464b86e21eccc319360461b07130672926661e69ef192af171fda
data/doc/text/news.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 1.5.3: 2023-11-07
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::Load}: Added support for `Arrow::Table` as values.
8
+
9
+ * {Groonga::Command::Base}: Added support for `output_trace_log`.
10
+
3
11
  ## 1.5.2: 2021-08-25
4
12
 
5
13
  ### Improvements
@@ -1,6 +1,6 @@
1
1
  # -*- ruby -*-
2
2
  #
3
- # Copyright (C) 2012-2020 Sutou Kouhei <kou@clear-code.com>
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
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2019 Sutou Kouhei <kou@clear-code.com>
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
@@ -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
 
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.5.2"
19
+ VERSION = "1.5.3"
20
20
  end
21
21
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2011-2017 Kouhei Sutou <kou@clear-code.com>
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 Sutou <kou@clear-code.com>
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 test_reader
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 Sutou <kou@clear-code.com>
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-unit"
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.2
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: 2021-08-25 00:00:00.000000000 Z
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.3.0.dev
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.