groonga 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -0
- data/NEWS.ja.rdoc +5 -0
- data/NEWS.rdoc +5 -0
- data/README.ja.rdoc +53 -0
- data/README.rdoc +54 -0
- data/Rakefile +209 -0
- data/TUTORIAL.ja.rdoc +160 -0
- data/benchmark/small-many-items.rb +175 -0
- data/example/bookmark.rb +38 -0
- data/ext/.gitignore +2 -0
- data/ext/rb-grn-accessor.c +52 -0
- data/ext/rb-grn-array-cursor.c +28 -0
- data/ext/rb-grn-array.c +168 -0
- data/ext/rb-grn-column.c +273 -0
- data/ext/rb-grn-context.c +333 -0
- data/ext/rb-grn-database.c +128 -0
- data/ext/rb-grn-encoding.c +163 -0
- data/ext/rb-grn-exception.c +1014 -0
- data/ext/rb-grn-hash-cursor.c +30 -0
- data/ext/rb-grn-hash.c +40 -0
- data/ext/rb-grn-logger.c +277 -0
- data/ext/rb-grn-object.c +985 -0
- data/ext/rb-grn-patricia-trie-cursor.c +30 -0
- data/ext/rb-grn-patricia-trie.c +40 -0
- data/ext/rb-grn-procedure.c +52 -0
- data/ext/rb-grn-query.c +207 -0
- data/ext/rb-grn-record.c +33 -0
- data/ext/rb-grn-snippet.c +274 -0
- data/ext/rb-grn-table-cursor-key-support.c +55 -0
- data/ext/rb-grn-table-cursor.c +294 -0
- data/ext/rb-grn-table-key-support.c +299 -0
- data/ext/rb-grn-table.c +706 -0
- data/ext/rb-grn-type.c +114 -0
- data/ext/rb-grn-utils.c +578 -0
- data/ext/rb-grn.h +346 -0
- data/ext/rb-groonga.c +98 -0
- data/extconf.rb +171 -0
- data/html/bar.svg +153 -0
- data/html/developer.html +121 -0
- data/html/developer.svg +469 -0
- data/html/download.svg +253 -0
- data/html/footer.html.erb +28 -0
- data/html/head.html.erb +4 -0
- data/html/header.html.erb +17 -0
- data/html/index.html +153 -0
- data/html/install.svg +636 -0
- data/html/logo.xcf +0 -0
- data/html/ranguba.css +248 -0
- data/html/tutorial.svg +559 -0
- data/lib/groonga.rb +50 -0
- data/lib/groonga/record.rb +98 -0
- data/license/GPL +340 -0
- data/license/LGPL +504 -0
- data/license/RUBY +59 -0
- data/pkg-config.rb +328 -0
- data/test-unit/Rakefile +35 -0
- data/test-unit/TODO +5 -0
- data/test-unit/bin/testrb +5 -0
- data/test-unit/html/classic.html +15 -0
- data/test-unit/html/index.html +25 -0
- data/test-unit/html/index.html.ja +27 -0
- data/test-unit/lib/test/unit.rb +342 -0
- data/test-unit/lib/test/unit/assertionfailederror.rb +14 -0
- data/test-unit/lib/test/unit/assertions.rb +1149 -0
- data/test-unit/lib/test/unit/attribute.rb +125 -0
- data/test-unit/lib/test/unit/autorunner.rb +306 -0
- data/test-unit/lib/test/unit/collector.rb +43 -0
- data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
- data/test-unit/lib/test/unit/collector/dir.rb +108 -0
- data/test-unit/lib/test/unit/collector/load.rb +135 -0
- data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
- data/test-unit/lib/test/unit/color-scheme.rb +86 -0
- data/test-unit/lib/test/unit/color.rb +96 -0
- data/test-unit/lib/test/unit/diff.rb +538 -0
- data/test-unit/lib/test/unit/error.rb +124 -0
- data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
- data/test-unit/lib/test/unit/failure.rb +110 -0
- data/test-unit/lib/test/unit/fixture.rb +176 -0
- data/test-unit/lib/test/unit/notification.rb +125 -0
- data/test-unit/lib/test/unit/omission.rb +143 -0
- data/test-unit/lib/test/unit/pending.rb +146 -0
- data/test-unit/lib/test/unit/priority.rb +161 -0
- data/test-unit/lib/test/unit/runner/console.rb +52 -0
- data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
- data/test-unit/lib/test/unit/testcase.rb +360 -0
- data/test-unit/lib/test/unit/testresult.rb +89 -0
- data/test-unit/lib/test/unit/testsuite.rb +110 -0
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +220 -0
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- data/test-unit/lib/test/unit/ui/testrunner.rb +20 -0
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/test-unit/lib/test/unit/util/backtracefilter.rb +41 -0
- data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/test-unit/lib/test/unit/util/observable.rb +90 -0
- data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
- data/test-unit/lib/test/unit/version.rb +7 -0
- data/test-unit/sample/adder.rb +13 -0
- data/test-unit/sample/subtracter.rb +12 -0
- data/test-unit/sample/tc_adder.rb +18 -0
- data/test-unit/sample/tc_subtracter.rb +18 -0
- data/test-unit/sample/test_user.rb +22 -0
- data/test-unit/sample/ts_examples.rb +7 -0
- data/test-unit/test/collector/test-descendant.rb +135 -0
- data/test-unit/test/collector/test-load.rb +333 -0
- data/test-unit/test/collector/test_dir.rb +406 -0
- data/test-unit/test/collector/test_objectspace.rb +98 -0
- data/test-unit/test/run-test.rb +13 -0
- data/test-unit/test/test-attribute.rb +86 -0
- data/test-unit/test/test-color-scheme.rb +56 -0
- data/test-unit/test/test-color.rb +47 -0
- data/test-unit/test/test-diff.rb +477 -0
- data/test-unit/test/test-emacs-runner.rb +60 -0
- data/test-unit/test/test-fixture.rb +287 -0
- data/test-unit/test/test-notification.rb +33 -0
- data/test-unit/test/test-omission.rb +81 -0
- data/test-unit/test/test-pending.rb +70 -0
- data/test-unit/test/test-priority.rb +119 -0
- data/test-unit/test/test_assertions.rb +1082 -0
- data/test-unit/test/test_error.rb +26 -0
- data/test-unit/test/test_failure.rb +33 -0
- data/test-unit/test/test_testcase.rb +478 -0
- data/test-unit/test/test_testresult.rb +113 -0
- data/test-unit/test/test_testsuite.rb +129 -0
- data/test-unit/test/testunit-test-util.rb +14 -0
- data/test-unit/test/ui/test_testrunmediator.rb +20 -0
- data/test-unit/test/util/test-method-owner-finder.rb +38 -0
- data/test-unit/test/util/test_backtracefilter.rb +41 -0
- data/test-unit/test/util/test_observable.rb +102 -0
- data/test-unit/test/util/test_procwrapper.rb +36 -0
- data/test/.gitignore +1 -0
- data/test/groonga-test-utils.rb +90 -0
- data/test/run-test.rb +54 -0
- data/test/test-column.rb +190 -0
- data/test/test-context.rb +90 -0
- data/test/test-database.rb +62 -0
- data/test/test-encoding.rb +33 -0
- data/test/test-exception.rb +85 -0
- data/test/test-procedure.rb +35 -0
- data/test/test-query.rb +22 -0
- data/test/test-record.rb +188 -0
- data/test/test-snippet.rb +121 -0
- data/test/test-table-cursor.rb +51 -0
- data/test/test-table.rb +447 -0
- data/test/test-type.rb +52 -0
- data/test/test-version.rb +31 -0
- metadata +213 -0
data/test/test-type.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License version 2.1 as published by the Free Software Foundation.
|
6
|
+
#
|
7
|
+
# This library is distributed in the hope that it will be useful,
|
8
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
+
# Lesser General Public License for more details.
|
11
|
+
#
|
12
|
+
# You should have received a copy of the GNU Lesser General Public
|
13
|
+
# License along with this library; if not, write to the Free Software
|
14
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
+
|
16
|
+
class TypeTest < Test::Unit::TestCase
|
17
|
+
include GroongaTestUtils
|
18
|
+
|
19
|
+
setup :setup_database
|
20
|
+
|
21
|
+
def test_new
|
22
|
+
type = Groonga::Type.new("user-id", :type => :integer)
|
23
|
+
assert_equal("user-id", type.name)
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_builtins
|
27
|
+
assert_equal_type("<int>", Groonga::Type::INT)
|
28
|
+
assert_equal_type("<uint>", Groonga::Type::UINT)
|
29
|
+
assert_equal_type("<int64>", Groonga::Type::INT64)
|
30
|
+
assert_equal_type("<float>", Groonga::Type::FLOAT)
|
31
|
+
assert_equal_type("<time>", Groonga::Type::TIME)
|
32
|
+
assert_equal_type("<shorttext>", Groonga::Type::SHORT_TEXT)
|
33
|
+
assert_equal_type("<text>", Groonga::Type::TEXT)
|
34
|
+
assert_equal_type("<longtext>", Groonga::Type::LONG_TEXT)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_inspect
|
38
|
+
assert_equal("#<Groonga::Type id: <8>, " +
|
39
|
+
"name: <<longtext>>, " +
|
40
|
+
"path: (temporary), " +
|
41
|
+
"domain: <nil>, " +
|
42
|
+
"range: <2147483648>>",
|
43
|
+
context["<longtext>"].inspect)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
def assert_equal_type(expected_name, id)
|
48
|
+
type = Groonga::Context.default[id]
|
49
|
+
assert_equal(expected_name,
|
50
|
+
type ? type.name : type)
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License version 2.1 as published by the Free Software Foundation.
|
6
|
+
#
|
7
|
+
# This library is distributed in the hope that it will be useful,
|
8
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
+
# Lesser General Public License for more details.
|
11
|
+
#
|
12
|
+
# You should have received a copy of the GNU Lesser General Public
|
13
|
+
# License along with this library; if not, write to the Free Software
|
14
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
+
|
16
|
+
class VersionTest < Test::Unit::TestCase
|
17
|
+
def test_build_version
|
18
|
+
assert_match(/\A\d+\.\d+\.\d+\z/, Groonga.build_version)
|
19
|
+
assert_match(Groonga.build_version, Groonga::BUILD_VERSION.join("."))
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_version
|
23
|
+
assert_match(/\A\d+\.\d+\.\d+\z/, Groonga.version)
|
24
|
+
assert_match(Groonga.version, Groonga::VERSION.join("."))
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_bindings_version
|
28
|
+
assert_match(/\A\d+\.\d+\.\d+\z/, Groonga.bindings_version)
|
29
|
+
assert_match(Groonga.bindings_version, Groonga::BINDINGS_VERSION.join("."))
|
30
|
+
end
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,213 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: groonga
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kouhei Sutou
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-04-30 00:00:00 +09:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: |-
|
17
|
+
Ruby/groonga is a extension library to use groonga's DB-API
|
18
|
+
layer. Ruby/groonga provides Rubyish readable and writable
|
19
|
+
API. You can use groonga's first and highly functional
|
20
|
+
features from Ruby.
|
21
|
+
email:
|
22
|
+
- groonga-users-en@rubyforge.org
|
23
|
+
- groonga-dev@lists.sourceforge.jp
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions:
|
27
|
+
- extconf.rb
|
28
|
+
extra_rdoc_files:
|
29
|
+
- TUTORIAL.ja.rdoc
|
30
|
+
- NEWS.ja.rdoc
|
31
|
+
- NEWS.rdoc
|
32
|
+
- README.rdoc
|
33
|
+
- README.ja.rdoc
|
34
|
+
files:
|
35
|
+
- AUTHORS
|
36
|
+
- NEWS.ja.rdoc
|
37
|
+
- NEWS.rdoc
|
38
|
+
- README.ja.rdoc
|
39
|
+
- README.rdoc
|
40
|
+
- Rakefile
|
41
|
+
- TUTORIAL.ja.rdoc
|
42
|
+
- benchmark/small-many-items.rb
|
43
|
+
- example/bookmark.rb
|
44
|
+
- ext/.gitignore
|
45
|
+
- ext/rb-grn-accessor.c
|
46
|
+
- ext/rb-grn-array-cursor.c
|
47
|
+
- ext/rb-grn-array.c
|
48
|
+
- ext/rb-grn-column.c
|
49
|
+
- ext/rb-grn-context.c
|
50
|
+
- ext/rb-grn-database.c
|
51
|
+
- ext/rb-grn-encoding.c
|
52
|
+
- ext/rb-grn-exception.c
|
53
|
+
- ext/rb-grn-hash-cursor.c
|
54
|
+
- ext/rb-grn-hash.c
|
55
|
+
- ext/rb-grn-logger.c
|
56
|
+
- ext/rb-grn-object.c
|
57
|
+
- ext/rb-grn-patricia-trie-cursor.c
|
58
|
+
- ext/rb-grn-patricia-trie.c
|
59
|
+
- ext/rb-grn-procedure.c
|
60
|
+
- ext/rb-grn-query.c
|
61
|
+
- ext/rb-grn-record.c
|
62
|
+
- ext/rb-grn-snippet.c
|
63
|
+
- ext/rb-grn-table-cursor-key-support.c
|
64
|
+
- ext/rb-grn-table-cursor.c
|
65
|
+
- ext/rb-grn-table-key-support.c
|
66
|
+
- ext/rb-grn-table.c
|
67
|
+
- ext/rb-grn-type.c
|
68
|
+
- ext/rb-grn-utils.c
|
69
|
+
- ext/rb-grn.h
|
70
|
+
- ext/rb-groonga.c
|
71
|
+
- extconf.rb
|
72
|
+
- html/bar.svg
|
73
|
+
- html/developer.html
|
74
|
+
- html/developer.svg
|
75
|
+
- html/download.svg
|
76
|
+
- html/footer.html.erb
|
77
|
+
- html/head.html.erb
|
78
|
+
- html/header.html.erb
|
79
|
+
- html/index.html
|
80
|
+
- html/install.svg
|
81
|
+
- html/logo.xcf
|
82
|
+
- html/ranguba.css
|
83
|
+
- html/tutorial.svg
|
84
|
+
- lib/groonga.rb
|
85
|
+
- lib/groonga/record.rb
|
86
|
+
- license/GPL
|
87
|
+
- license/LGPL
|
88
|
+
- license/RUBY
|
89
|
+
- pkg-config.rb
|
90
|
+
- test-unit/Rakefile
|
91
|
+
- test-unit/TODO
|
92
|
+
- test-unit/bin/testrb
|
93
|
+
- test-unit/html/classic.html
|
94
|
+
- test-unit/html/index.html
|
95
|
+
- test-unit/html/index.html.ja
|
96
|
+
- test-unit/lib/test/unit.rb
|
97
|
+
- test-unit/lib/test/unit/assertionfailederror.rb
|
98
|
+
- test-unit/lib/test/unit/assertions.rb
|
99
|
+
- test-unit/lib/test/unit/attribute.rb
|
100
|
+
- test-unit/lib/test/unit/autorunner.rb
|
101
|
+
- test-unit/lib/test/unit/collector.rb
|
102
|
+
- test-unit/lib/test/unit/collector/descendant.rb
|
103
|
+
- test-unit/lib/test/unit/collector/dir.rb
|
104
|
+
- test-unit/lib/test/unit/collector/load.rb
|
105
|
+
- test-unit/lib/test/unit/collector/objectspace.rb
|
106
|
+
- test-unit/lib/test/unit/color-scheme.rb
|
107
|
+
- test-unit/lib/test/unit/color.rb
|
108
|
+
- test-unit/lib/test/unit/diff.rb
|
109
|
+
- test-unit/lib/test/unit/error.rb
|
110
|
+
- test-unit/lib/test/unit/exceptionhandler.rb
|
111
|
+
- test-unit/lib/test/unit/failure.rb
|
112
|
+
- test-unit/lib/test/unit/fixture.rb
|
113
|
+
- test-unit/lib/test/unit/notification.rb
|
114
|
+
- test-unit/lib/test/unit/omission.rb
|
115
|
+
- test-unit/lib/test/unit/pending.rb
|
116
|
+
- test-unit/lib/test/unit/priority.rb
|
117
|
+
- test-unit/lib/test/unit/runner/console.rb
|
118
|
+
- test-unit/lib/test/unit/runner/emacs.rb
|
119
|
+
- test-unit/lib/test/unit/testcase.rb
|
120
|
+
- test-unit/lib/test/unit/testresult.rb
|
121
|
+
- test-unit/lib/test/unit/testsuite.rb
|
122
|
+
- test-unit/lib/test/unit/ui/console/outputlevel.rb
|
123
|
+
- test-unit/lib/test/unit/ui/console/testrunner.rb
|
124
|
+
- test-unit/lib/test/unit/ui/emacs/testrunner.rb
|
125
|
+
- test-unit/lib/test/unit/ui/testrunner.rb
|
126
|
+
- test-unit/lib/test/unit/ui/testrunnermediator.rb
|
127
|
+
- test-unit/lib/test/unit/ui/testrunnerutilities.rb
|
128
|
+
- test-unit/lib/test/unit/util/backtracefilter.rb
|
129
|
+
- test-unit/lib/test/unit/util/method-owner-finder.rb
|
130
|
+
- test-unit/lib/test/unit/util/observable.rb
|
131
|
+
- test-unit/lib/test/unit/util/procwrapper.rb
|
132
|
+
- test-unit/lib/test/unit/version.rb
|
133
|
+
- test-unit/sample/adder.rb
|
134
|
+
- test-unit/sample/subtracter.rb
|
135
|
+
- test-unit/sample/tc_adder.rb
|
136
|
+
- test-unit/sample/tc_subtracter.rb
|
137
|
+
- test-unit/sample/test_user.rb
|
138
|
+
- test-unit/sample/ts_examples.rb
|
139
|
+
- test-unit/test/collector/test-descendant.rb
|
140
|
+
- test-unit/test/collector/test-load.rb
|
141
|
+
- test-unit/test/collector/test_dir.rb
|
142
|
+
- test-unit/test/collector/test_objectspace.rb
|
143
|
+
- test-unit/test/run-test.rb
|
144
|
+
- test-unit/test/test-attribute.rb
|
145
|
+
- test-unit/test/test-color-scheme.rb
|
146
|
+
- test-unit/test/test-color.rb
|
147
|
+
- test-unit/test/test-diff.rb
|
148
|
+
- test-unit/test/test-emacs-runner.rb
|
149
|
+
- test-unit/test/test-fixture.rb
|
150
|
+
- test-unit/test/test-notification.rb
|
151
|
+
- test-unit/test/test-omission.rb
|
152
|
+
- test-unit/test/test-pending.rb
|
153
|
+
- test-unit/test/test-priority.rb
|
154
|
+
- test-unit/test/test_assertions.rb
|
155
|
+
- test-unit/test/test_error.rb
|
156
|
+
- test-unit/test/test_failure.rb
|
157
|
+
- test-unit/test/test_testcase.rb
|
158
|
+
- test-unit/test/test_testresult.rb
|
159
|
+
- test-unit/test/test_testsuite.rb
|
160
|
+
- test-unit/test/testunit-test-util.rb
|
161
|
+
- test-unit/test/ui/test_testrunmediator.rb
|
162
|
+
- test-unit/test/util/test-method-owner-finder.rb
|
163
|
+
- test-unit/test/util/test_backtracefilter.rb
|
164
|
+
- test-unit/test/util/test_observable.rb
|
165
|
+
- test-unit/test/util/test_procwrapper.rb
|
166
|
+
- test/.gitignore
|
167
|
+
- test/groonga-test-utils.rb
|
168
|
+
- test/run-test.rb
|
169
|
+
- test/test-column.rb
|
170
|
+
- test/test-context.rb
|
171
|
+
- test/test-database.rb
|
172
|
+
- test/test-encoding.rb
|
173
|
+
- test/test-exception.rb
|
174
|
+
- test/test-procedure.rb
|
175
|
+
- test/test-query.rb
|
176
|
+
- test/test-record.rb
|
177
|
+
- test/test-snippet.rb
|
178
|
+
- test/test-table-cursor.rb
|
179
|
+
- test/test-table.rb
|
180
|
+
- test/test-type.rb
|
181
|
+
- test/test-version.rb
|
182
|
+
has_rdoc: true
|
183
|
+
homepage: http://groonga.rubyforge.org/
|
184
|
+
licenses: []
|
185
|
+
|
186
|
+
post_install_message:
|
187
|
+
rdoc_options:
|
188
|
+
- --main
|
189
|
+
- README.ja.rdoc
|
190
|
+
require_paths:
|
191
|
+
- lib
|
192
|
+
- ext
|
193
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
194
|
+
requirements:
|
195
|
+
- - ">="
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: "0"
|
198
|
+
version:
|
199
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
|
+
requirements:
|
201
|
+
- - ">="
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: "0"
|
204
|
+
version:
|
205
|
+
requirements: []
|
206
|
+
|
207
|
+
rubyforge_project: groonga
|
208
|
+
rubygems_version: 1.3.2
|
209
|
+
signing_key:
|
210
|
+
specification_version: 3
|
211
|
+
summary: Ruby bindings for groonga that provides full text search and column store features.
|
212
|
+
test_files:
|
213
|
+
- test/run-test.rb
|