rroonga 10.0.1 → 10.0.2
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/.yardopts +1 -0
- data/Rakefile +6 -28
- data/doc/text/news.md +21 -5
- data/doc/text/tutorial.md +1 -1
- data/ext/groonga/extconf.rb +4 -1
- data/ext/groonga/rb-grn-expression-builder.c +3 -3
- data/ext/groonga/rb-grn-table-key-support.c +4 -2
- data/ext/groonga/rb-grn-type.c +5 -1
- data/ext/groonga/rb-grn-utils.c +17 -1
- data/ext/groonga/rb-grn.h +3 -1
- data/ext/groonga/rb-groonga.c +2 -2
- data/rroonga.gemspec +1 -1
- data/test/groonga-test-utils.rb +6 -0
- data/test/test-column.rb +12 -1
- data/test/test-table-arrow.rb +0 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 323ef18fd80d19942c261d4a8c8ae7f67c39542fc2804b9c6692f013948fd542
|
4
|
+
data.tar.gz: 1e116cc58914ea3252988d5c6fa246919870814c7697b0794323aee20008ac16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec001925838d04408d420bef49008758d4011a32489885c7e6983d9958d8d83b4f889e32beff7a8ecf86b8738f67f4d0eda3f9f7a53e8b7b719cdbd4c196fef5
|
7
|
+
data.tar.gz: cb9e589771596b4ed1dc481897af4b41e6fcad7cfcf40488c9298814dc28e93b246bf45c2227dc027f24f1396827a2e407792035caf0c28dc725e38591e3cf69
|
data/.yardopts
CHANGED
data/Rakefile
CHANGED
@@ -46,28 +46,6 @@ Packnga::ReleaseTask.new(spec) do |task|
|
|
46
46
|
task.index_html_dir = ranguba_org_dir
|
47
47
|
end
|
48
48
|
|
49
|
-
module YARD
|
50
|
-
module CodeObjects
|
51
|
-
class Proxy
|
52
|
-
alias_method :initialize_original, :initialize
|
53
|
-
def initialize(namespace, name, type=nil)
|
54
|
-
name = name.to_s.gsub(/\AGrn(.*)\z/) do
|
55
|
-
suffix = $1
|
56
|
-
case suffix
|
57
|
-
when ""
|
58
|
-
"Groonga"
|
59
|
-
when "TableKeySupport"
|
60
|
-
"Groonga::Table::KeySupport"
|
61
|
-
else
|
62
|
-
"Groonga::#{suffix}"
|
63
|
-
end
|
64
|
-
end
|
65
|
-
initialize_original(namespace, name, type)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
49
|
file "Makefile" => ["extconf.rb", "ext/groonga/extconf.rb"] do
|
72
50
|
extconf_args = []
|
73
51
|
if ENV["TRAVIS"]
|
@@ -85,12 +63,12 @@ task :test => :configure do
|
|
85
63
|
end
|
86
64
|
|
87
65
|
namespace :test do
|
88
|
-
task :install do
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
installed_path =
|
66
|
+
task :install => "install" do
|
67
|
+
rroonga_specs = Gem.source_index.find_name("rroonga")
|
68
|
+
target_rroonga_spec = rroonga_specs.find do |rroonga_spec|
|
69
|
+
rroonga_spec.version == helper.gemspec.version
|
70
|
+
end
|
71
|
+
installed_path = target_rroonga_spec.full_gem_path
|
94
72
|
ENV["NO_MAKE"] = "yes"
|
95
73
|
ruby("#{installed_path}/test/run-test.rb")
|
96
74
|
end
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# NEWS
|
2
2
|
|
3
|
+
## 10.0.2: 2020-04-29 {#version-10-0-2}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Added support for Float32 in Groonga 10.0.2.
|
8
|
+
|
9
|
+
* [doc] Fixed markup of a image in tutorial [GitHub#192][Patched by takahashim]
|
10
|
+
|
11
|
+
### Thanks
|
12
|
+
|
13
|
+
* takahashim
|
14
|
+
|
3
15
|
## 10.0.1: 2020-04-02 {#version-10-0-1}
|
4
16
|
|
5
17
|
### Improvements
|
@@ -22,11 +34,15 @@
|
|
22
34
|
|
23
35
|
* {Groonga::IndexColumn} Added support "INDEX_LARGE".
|
24
36
|
|
25
|
-
* {Groonga::IndexCursor
|
37
|
+
* {Groonga::IndexCursor#set_min?} Added.
|
38
|
+
|
39
|
+
* {Groonga::IndexCursor#set_min=} Added.
|
40
|
+
|
41
|
+
* {Groonga::Context#force_match_escalation?} Added.
|
26
42
|
|
27
|
-
* {Groonga::Context#
|
43
|
+
* {Groonga::Context#force_match_escalation=} Added.
|
28
44
|
|
29
|
-
* {
|
45
|
+
* {Groonga::Object#id_accessor?} Added.
|
30
46
|
|
31
47
|
* {Groonga::Logger.flags} Added support for thread id option.
|
32
48
|
|
@@ -36,7 +52,7 @@
|
|
36
52
|
|
37
53
|
* {Groonga::Table} Delegate support_score? from Groonga::Record to Groonga::Table.
|
38
54
|
|
39
|
-
*
|
55
|
+
* Groonga::Flashable Added support dependent option.
|
40
56
|
|
41
57
|
* {Groonga::Object#score_accessor?} Added.
|
42
58
|
|
@@ -59,7 +75,7 @@
|
|
59
75
|
* Added support for "--with-groonga-configure-options".
|
60
76
|
[GitHub#146][Reported by Tomás Pollak]
|
61
77
|
|
62
|
-
*
|
78
|
+
* Groonga::RegexpExpressionBuilder: Added support (?-mix:XXX) for searching of regular expression.
|
63
79
|
[groonga-dev,04694][Reported by Masatoshi SEKI]
|
64
80
|
|
65
81
|
* Use "groonga-latest.tar.gz" for build Groonga.
|
data/doc/text/tutorial.md
CHANGED
data/ext/groonga/extconf.rb
CHANGED
@@ -267,7 +267,7 @@ end
|
|
267
267
|
|
268
268
|
def enable_debug_build_flag(flags)
|
269
269
|
if gcc?
|
270
|
-
flags.gsub(/(^|\s)?-g\d?(\s|$)
|
270
|
+
flags.gsub(/(^|\s)?-g\d?(\s|$)/, '\\1-ggdb3\\2')
|
271
271
|
else
|
272
272
|
flags
|
273
273
|
end
|
@@ -279,6 +279,9 @@ checking_for(checking_message("--enable-debug-build option")) do
|
|
279
279
|
$CFLAGS = disable_optimization_build_flag($CFLAGS)
|
280
280
|
$CFLAGS = enable_debug_build_flag($CFLAGS)
|
281
281
|
|
282
|
+
CONFIG["optflags"] = disable_optimization_build_flag(CONFIG["optflags"])
|
283
|
+
CONFIG["debugflags"] = enable_debug_build_flag(CONFIG["debugflags"])
|
284
|
+
|
282
285
|
CONFIG["CXXFLAGS"] = disable_optimization_build_flag(CONFIG["CXXFLAGS"])
|
283
286
|
CONFIG["CXXFLAGS"] = enable_debug_build_flag(CONFIG["CXXFLAGS"])
|
284
287
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009 Kouhei
|
3
|
+
Copyright (C) 2009-2020 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
|
@@ -42,9 +42,9 @@ build (VALUE self)
|
|
42
42
|
}
|
43
43
|
|
44
44
|
static VALUE
|
45
|
-
build_block (
|
45
|
+
build_block (RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
|
46
46
|
{
|
47
|
-
return rb_funcall(rb_block_proc(), rb_intern("call"), 1,
|
47
|
+
return rb_funcall(rb_block_proc(), rb_intern("call"), 1, yielded_arg);
|
48
48
|
}
|
49
49
|
|
50
50
|
VALUE
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009-2020 Kouhei
|
3
|
+
Copyright (C) 2009-2020 Sutou Kouhei <kou@clear-code.com>
|
4
4
|
Copyright (C) 2014-2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
5
5
|
|
6
6
|
This library is free software; you can redistribute it and/or
|
@@ -481,8 +481,10 @@ typedef struct _SetValueData
|
|
481
481
|
} SetValueData;
|
482
482
|
|
483
483
|
static VALUE
|
484
|
-
set_value (
|
484
|
+
set_value (RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
|
485
485
|
{
|
486
|
+
VALUE args = yielded_arg;
|
487
|
+
SetValueData *data = (SetValueData *)callback_arg;
|
486
488
|
VALUE rb_name, rb_value, rb_column;
|
487
489
|
RbGrnObject *rb_grn_object;
|
488
490
|
|
data/ext/groonga/rb-grn-type.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009-
|
3
|
+
Copyright (C) 2009-2020 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
|
@@ -304,6 +304,10 @@ rb_grn_init_type (VALUE mGrn)
|
|
304
304
|
rb_define_const(rb_cGrnType, "INT64", INT2NUM(GRN_DB_INT64));
|
305
305
|
/* 64bit符号なし整数。 */
|
306
306
|
rb_define_const(rb_cGrnType, "UINT64", INT2NUM(GRN_DB_UINT64));
|
307
|
+
#if RB_GRN_HAVE_FLOAT32
|
308
|
+
/* 32bit floating pointer number in IEEE754 format. */
|
309
|
+
rb_define_const(rb_cGrnType, "FLOAT32", INT2NUM(GRN_DB_FLOAT32));
|
310
|
+
#endif
|
307
311
|
/* ieee754形式の64bit浮動小数点数。 */
|
308
312
|
rb_define_const(rb_cGrnType, "FLOAT", INT2NUM(GRN_DB_FLOAT));
|
309
313
|
/* 1970年1月1日0時0分0秒からの経過マイクロ秒数を64bit符
|
data/ext/groonga/rb-grn-utils.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/* vim: set sts=4 sw=4 ts=8 noet: */
|
3
3
|
/*
|
4
|
-
Copyright (C) 2009-
|
4
|
+
Copyright (C) 2009-2020 Sutou Kouhei <kou@clear-code.com>
|
5
5
|
|
6
6
|
This library is free software; you can redistribute it and/or
|
7
7
|
modify it under the terms of the GNU Lesser General Public
|
@@ -201,6 +201,11 @@ rb_grn_bulk_to_ruby_object_by_range_id (grn_ctx *context, grn_obj *bulk,
|
|
201
201
|
case GRN_DB_UINT64:
|
202
202
|
*rb_value = ULL2NUM(GRN_UINT64_VALUE(bulk));
|
203
203
|
break;
|
204
|
+
#if RB_GRN_HAVE_FLOAT32
|
205
|
+
case GRN_DB_FLOAT32:
|
206
|
+
*rb_value = rb_float_new(GRN_FLOAT32_VALUE(bulk));
|
207
|
+
break;
|
208
|
+
#endif
|
204
209
|
case GRN_DB_FLOAT:
|
205
210
|
*rb_value = rb_float_new(GRN_FLOAT_VALUE(bulk));
|
206
211
|
break;
|
@@ -447,6 +452,7 @@ rb_grn_bulk_from_ruby_object_with_type (VALUE object, grn_ctx *context,
|
|
447
452
|
int64_t int64_value;
|
448
453
|
uint64_t uint64_value;
|
449
454
|
int64_t time_value;
|
455
|
+
float float_value;
|
450
456
|
double double_value;
|
451
457
|
grn_geo_point geo_point_value;
|
452
458
|
grn_id record_id;
|
@@ -525,6 +531,16 @@ rb_grn_bulk_from_ruby_object_with_type (VALUE object, grn_ctx *context,
|
|
525
531
|
string = (const char *)&(value.uint64_value);
|
526
532
|
size = sizeof(value.uint64_value);
|
527
533
|
break;
|
534
|
+
#if RB_GRN_HAVE_FLOAT32
|
535
|
+
case GRN_DB_FLOAT32:
|
536
|
+
if (string_p) {
|
537
|
+
object = rb_Float(object);
|
538
|
+
}
|
539
|
+
value.float_value = NUM2DBL(object);
|
540
|
+
string = (const char *)&(value.float_value);
|
541
|
+
size = sizeof(value.float_value);
|
542
|
+
break;
|
543
|
+
#endif
|
528
544
|
case GRN_DB_FLOAT:
|
529
545
|
if (string_p) {
|
530
546
|
object = rb_Float(object);
|
data/ext/groonga/rb-grn.h
CHANGED
@@ -89,9 +89,11 @@ RB_GRN_BEGIN_DECLS
|
|
89
89
|
# define debug(...)
|
90
90
|
#endif
|
91
91
|
|
92
|
+
#define RB_GRN_HAVE_FLOAT32 GRN_VERSION_OR_LATER(10, 0, 2)
|
93
|
+
|
92
94
|
#define RB_GRN_MAJOR_VERSION 10
|
93
95
|
#define RB_GRN_MINOR_VERSION 0
|
94
|
-
#define RB_GRN_MICRO_VERSION
|
96
|
+
#define RB_GRN_MICRO_VERSION 2
|
95
97
|
|
96
98
|
#define RB_GRN_OBJECT(object) ((RbGrnObject *)(object))
|
97
99
|
#define RB_GRN_NAMED_OBJECT(object) ((RbGrnNamedObject *)(object))
|
data/ext/groonga/rb-groonga.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009-
|
3
|
+
Copyright (C) 2009-2020 Sutou Kouhei <kou@clear-code.com>
|
4
4
|
Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
5
5
|
|
6
6
|
This library is free software; you can redistribute it and/or
|
@@ -22,7 +22,7 @@
|
|
22
22
|
grn_bool rb_grn_exited = GRN_FALSE;
|
23
23
|
|
24
24
|
static VALUE
|
25
|
-
finish_groonga (
|
25
|
+
finish_groonga (RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
|
26
26
|
{
|
27
27
|
debug("finish\n");
|
28
28
|
grn_fin();
|
data/rroonga.gemspec
CHANGED
data/test/groonga-test-utils.rb
CHANGED
@@ -209,4 +209,10 @@ module GroongaTestUtils
|
|
209
209
|
def check_mecab_availability
|
210
210
|
omit("MeCab isn't available") if context["TokenMecab"].nil?
|
211
211
|
end
|
212
|
+
|
213
|
+
def need_groonga(major, minor, micro)
|
214
|
+
if (Groonga::BUILD_VERSION[0, 3] <=> [major, minor, micro]) < 0
|
215
|
+
omit("Groonga #{major}.#{minor}.#{micro} or later is required")
|
216
|
+
end
|
217
|
+
end
|
212
218
|
end
|
data/test/test-column.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009-
|
1
|
+
# Copyright (C) 2009-2020 Sutou Kouhei <kou@clear-code.com>
|
2
2
|
# Copyright (C) 2016 Masafumi Yokoyama <yokoyama@clear-code.com>
|
3
3
|
#
|
4
4
|
# This library is free software; you can redistribute it and/or
|
@@ -307,6 +307,17 @@ class ColumnTest < Test::Unit::TestCase
|
|
307
307
|
assert_false(post["hidden"])
|
308
308
|
end
|
309
309
|
|
310
|
+
def test_float32
|
311
|
+
need_groonga(10, 0, 2)
|
312
|
+
|
313
|
+
numbers = Groonga::Array.create(:name => "Numbers")
|
314
|
+
numbers.define_column("data", "Float32")
|
315
|
+
|
316
|
+
number = numbers.add
|
317
|
+
number["data"] = 1.1
|
318
|
+
assert_in_delta(1.1, number["data"])
|
319
|
+
end
|
320
|
+
|
310
321
|
def test_indexes
|
311
322
|
Groonga::Schema.define do |schema|
|
312
323
|
schema.create_table("Comments") do |table|
|
data/test/test-table-arrow.rb
CHANGED
@@ -20,9 +20,6 @@ class TableArrowTest < Test::Unit::TestCase
|
|
20
20
|
setup_database
|
21
21
|
|
22
22
|
omit("Apache Arrow support is required") unless context.support_arrow?
|
23
|
-
if (Groonga::VERSION[0, 3] <=> [9, 1, 2]) <= 0
|
24
|
-
omit("Groonga 9.1.2 is buggy")
|
25
|
-
end
|
26
23
|
end
|
27
24
|
|
28
25
|
def assert_dump_load(type, n_records)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rroonga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.
|
4
|
+
version: 10.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2020-
|
15
|
+
date: 2020-05-01 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: pkg-config
|
@@ -355,7 +355,7 @@ homepage: http://ranguba.org/#about-rroonga
|
|
355
355
|
licenses:
|
356
356
|
- LGPL-2.1
|
357
357
|
metadata:
|
358
|
-
msys2_mingw_dependencies: groonga
|
358
|
+
msys2_mingw_dependencies: groonga>=10.0.1
|
359
359
|
post_install_message:
|
360
360
|
rdoc_options: []
|
361
361
|
require_paths:
|