rroonga 2.1.3-x86-mingw32 → 3.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/grndump +1 -1
- data/doc/text/news.textile +22 -4
- data/ext/groonga/rb-grn-accessor.c +1 -1
- data/ext/groonga/rb-grn-array-cursor.c +1 -1
- data/ext/groonga/rb-grn-array.c +218 -2
- data/ext/groonga/rb-grn-column.c +1 -1
- data/ext/groonga/rb-grn-context.c +1 -1
- data/ext/groonga/rb-grn-database.c +1 -1
- data/ext/groonga/rb-grn-double-array-trie-cursor.c +1 -1
- data/ext/groonga/rb-grn-double-array-trie.c +1 -1
- data/ext/groonga/rb-grn-encoding-support.c +1 -1
- data/ext/groonga/rb-grn-encoding.c +1 -1
- data/ext/groonga/rb-grn-exception.c +1 -1
- data/ext/groonga/rb-grn-expression-builder.c +1 -1
- data/ext/groonga/rb-grn-expression.c +1 -1
- data/ext/groonga/rb-grn-fix-size-column.c +1 -1
- data/ext/groonga/rb-grn-geo-point.c +1 -1
- data/ext/groonga/rb-grn-hash-cursor.c +1 -1
- data/ext/groonga/rb-grn-hash.c +1 -1
- data/ext/groonga/rb-grn-index-column.c +1 -1
- data/ext/groonga/rb-grn-index-cursor.c +1 -1
- data/ext/groonga/rb-grn-logger.c +1 -1
- data/ext/groonga/rb-grn-normalizer.c +1 -1
- data/ext/groonga/rb-grn-object.c +7 -7
- data/ext/groonga/rb-grn-operator.c +1 -1
- data/ext/groonga/rb-grn-patricia-trie-cursor.c +1 -1
- data/ext/groonga/rb-grn-patricia-trie.c +1 -1
- data/ext/groonga/rb-grn-plugin.c +1 -1
- data/ext/groonga/rb-grn-posting.c +1 -1
- data/ext/groonga/rb-grn-procedure.c +1 -1
- data/ext/groonga/rb-grn-record.c +1 -1
- data/ext/groonga/rb-grn-snippet.c +1 -1
- data/ext/groonga/rb-grn-table-cursor-key-support.c +1 -1
- data/ext/groonga/rb-grn-table-cursor.c +1 -1
- data/ext/groonga/rb-grn-table-key-support.c +1 -1
- data/ext/groonga/rb-grn-table.c +1 -1
- data/ext/groonga/rb-grn-type.c +1 -1
- data/ext/groonga/rb-grn-utils.c +1 -1
- data/ext/groonga/rb-grn-variable-size-column.c +1 -1
- data/ext/groonga/rb-grn-variable.c +1 -1
- data/ext/groonga/rb-grn.h +4 -4
- data/ext/groonga/rb-groonga.c +1 -1
- data/lib/1.9/groonga.so +0 -0
- data/lib/2.0/groonga.so +0 -0
- data/lib/groonga/context.rb +93 -13
- data/rroonga-build.rb +2 -2
- data/test/groonga-test-utils.rb +2 -1
- data/test/test-array.rb +86 -2
- data/test/test-context.rb +22 -2
- data/vendor/local/bin/groonga-benchmark.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/libmsgpack-3.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +1 -1
- data/vendor/local/include/groonga/groonga.h +16 -8
- data/vendor/local/include/groonga/groonga/nfkc.h +32 -0
- data/vendor/local/include/groonga/groonga/plugin.h +39 -21
- data/vendor/local/include/groonga/groonga/tokenizer.h +4 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development.txt +1 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +9 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/repository.txt +12 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +20 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +28 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +12 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +8 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +36 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +11 -11
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +112 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/cache_limit.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/check.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/clearlock.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_create.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_remove.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_rename.txt +79 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/define_selector.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/defrag.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/delete.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/load.txt +51 -51
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_level.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_put.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_reopen.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalize.txt +85 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +98 -89
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/status.txt +5 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_remove.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt +73 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/sub_filter.txt +124 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/normalizers.txt +24 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +5 -5
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution.html +58 -57
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +17 -16
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +18 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +61 -61
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +104 -95
- data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +138 -0
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +37 -37
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +36 -30
- data/vendor/local/share/doc/groonga/en/html/install.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +23 -9
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +30 -9
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +16 -9
- data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +37 -9
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +251 -120
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +28 -23
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +25 -22
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +8 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +71 -87
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +8 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +8 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +13 -14
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +321 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +35 -36
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +32 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +32 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +70 -69
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +34 -35
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +34 -35
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +37 -38
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +218 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +294 -288
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +38 -41
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +47 -47
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +33 -34
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +268 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grntest.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +11 -9
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +6 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +292 -0
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +32 -7
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/tables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/package.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development.txt +1 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +9 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/repository.txt +12 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +20 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +28 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +12 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +8 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +36 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +11 -11
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +112 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/cache_limit.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/check.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/clearlock.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_create.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_remove.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_rename.txt +79 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/define_selector.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/defrag.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/delete.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/load.txt +51 -51
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_level.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_put.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_reopen.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalize.txt +85 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +98 -89
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/status.txt +5 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_remove.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt +73 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/sub_filter.txt +124 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/normalizers.txt +24 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +5 -5
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +58 -57
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +17 -16
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +18 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +61 -61
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +104 -95
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +139 -0
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +37 -37
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/index.html +36 -30
- data/vendor/local/share/doc/groonga/ja/html/install.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +19 -9
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +24 -9
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +14 -9
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +29 -9
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news.html +225 -124
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +28 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +25 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +8 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +71 -87
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +8 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +8 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +13 -14
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +321 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +35 -36
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +32 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +32 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +56 -61
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +34 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +34 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +37 -38
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +213 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +235 -229
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +38 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +47 -47
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +33 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +268 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +11 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +6 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +291 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +30 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
- data/vendor/local/share/man/ja/man1/groonga.1 +1231 -420
- data/vendor/local/share/man/man1/groonga.1 +1370 -521
- metadata +1025 -998
- data/lib/1.8/groonga.so +0 -0
data/ext/groonga/rb-grn-plugin.c
CHANGED
data/ext/groonga/rb-grn-record.c
CHANGED
data/ext/groonga/rb-grn-table.c
CHANGED
data/ext/groonga/rb-grn-type.c
CHANGED
data/ext/groonga/rb-grn-utils.c
CHANGED
data/ext/groonga/rb-grn.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* -*- c-
|
1
|
+
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/*
|
3
3
|
Copyright (C) 2009-2013 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
|
@@ -74,9 +74,9 @@ RB_GRN_BEGIN_DECLS
|
|
74
74
|
# define debug(...)
|
75
75
|
#endif
|
76
76
|
|
77
|
-
#define RB_GRN_MAJOR_VERSION
|
78
|
-
#define RB_GRN_MINOR_VERSION
|
79
|
-
#define RB_GRN_MICRO_VERSION
|
77
|
+
#define RB_GRN_MAJOR_VERSION 3
|
78
|
+
#define RB_GRN_MINOR_VERSION 0
|
79
|
+
#define RB_GRN_MICRO_VERSION 0
|
80
80
|
|
81
81
|
#define RB_GRN_QUERY_DEFAULT_MAX_EXPRESSIONS 32
|
82
82
|
|
data/ext/groonga/rb-groonga.c
CHANGED
data/lib/1.9/groonga.so
CHANGED
Binary file
|
data/lib/2.0/groonga.so
ADDED
Binary file
|
data/lib/groonga/context.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2010-
|
3
|
+
# Copyright (C) 2010-2013 Kouhei Sutou <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
|
@@ -28,22 +28,81 @@ module Groonga
|
|
28
28
|
Database.open(path, options, &block)
|
29
29
|
end
|
30
30
|
|
31
|
-
#
|
32
|
-
#
|
31
|
+
# This is convenience method. It wraps {Groonga::Database.create}
|
32
|
+
# for the context.
|
33
33
|
#
|
34
|
-
# @
|
35
|
-
#
|
36
|
-
# context.create_database
|
34
|
+
# @overload create_database
|
35
|
+
# Creates a new temproary database for the context.
|
37
36
|
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
|
37
|
+
# @return [Groonga::Database] A new temporary database.
|
38
|
+
#
|
39
|
+
# @example Creating a new temporary database
|
40
|
+
# temporary_database = context.create_database
|
41
|
+
#
|
42
|
+
# @overload create_database(&block)
|
43
|
+
# Creates a new temproary database for the context. The database
|
44
|
+
# is closed after the passed block is finished.
|
45
|
+
#
|
46
|
+
# @yield [database] Yields a newly created temporary database
|
47
|
+
# for the context. The database is available only in the
|
48
|
+
# block.
|
49
|
+
#
|
50
|
+
# @yieldparam [Groonga::Database] database A newly created
|
51
|
+
# temporary database for the context.
|
52
|
+
#
|
53
|
+
# @yieldreturn [Object] The returned value from the block is the
|
54
|
+
# returned value from this method.
|
55
|
+
#
|
56
|
+
# @return Returned value from the block.
|
57
|
+
#
|
58
|
+
# @example Creating a new temporary database with block
|
59
|
+
# context.create_database do |temporary_database|
|
60
|
+
# # ...
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# @overload create_database(path)
|
64
|
+
# Creates a new persistent database for the context to the _path_.
|
65
|
+
#
|
66
|
+
# @param [String] path Database path for a new persistent
|
67
|
+
# database.
|
68
|
+
#
|
69
|
+
# @return [Groonga::Database] A new persistent database for the
|
70
|
+
# context.
|
71
|
+
#
|
72
|
+
# @example Creating a new persistent database to _"/tmp/db.groonga"_
|
73
|
+
# database = context.create_database("/tmp/db.groonga")
|
74
|
+
#
|
75
|
+
# @overload create_database(path, &block)
|
76
|
+
# Creates a new persistent database for the context to the
|
77
|
+
# _path_. The database is closed after the passed block is
|
78
|
+
# finished.
|
79
|
+
#
|
80
|
+
# @param [String] path Database path for a new persistent
|
81
|
+
# database.
|
82
|
+
#
|
83
|
+
# @yield [database] Yields a newly created persistent database
|
84
|
+
# for the context. The database is available only in the
|
85
|
+
# block.
|
86
|
+
#
|
87
|
+
# @yieldparam [Groonga::Database] database A newly created
|
88
|
+
# persistent database for the context.
|
89
|
+
#
|
90
|
+
# @yieldreturn [Object] The returned value from the block is the
|
91
|
+
# returned value from this method.
|
92
|
+
#
|
93
|
+
# @return Returned value from the block.
|
94
|
+
#
|
95
|
+
# @example Creating a new persistent database to _"/tmp/db.groonga"_ database with block
|
96
|
+
# context.create_database("/tmp/db.groonga") do |persistent_database|
|
97
|
+
# # ...
|
98
|
+
# end
|
99
|
+
def create_database(path=nil, &block)
|
41
100
|
options = {:context => self}
|
42
101
|
if path
|
43
102
|
options[:path] = path
|
44
103
|
end
|
45
104
|
|
46
|
-
Database.create(options)
|
105
|
+
Database.create(options, &block)
|
47
106
|
end
|
48
107
|
|
49
108
|
# groongaのプラグインディレクトリにあるプラグイン _name_
|
@@ -78,28 +137,49 @@ module Groonga
|
|
78
137
|
|
79
138
|
# Restore commands dumped by "grndump" command.
|
80
139
|
#
|
81
|
-
# @example
|
140
|
+
# @example Restore dumped commands.
|
82
141
|
# dumped_commands = File.read("dump.grn")
|
83
142
|
# context.restore(dumped_commands)
|
84
143
|
#
|
144
|
+
# If block is given, response is yielded.
|
145
|
+
#
|
146
|
+
# @example Restore dumped commands and reports result.
|
147
|
+
# dumped_commands = File.read("dump.grn")
|
148
|
+
# context.restore(dumped_commands) do |command, response|
|
149
|
+
# puts("#{command} -> #{response}")
|
150
|
+
# end
|
151
|
+
#
|
85
152
|
# @param [String] dumped_commands commands dumped by grndump.
|
153
|
+
# @yield [command, response]
|
154
|
+
# Yields a sent command and its response if block is given.
|
155
|
+
# @yieldparam command [String] A sent command.
|
156
|
+
# @yieldparam response [String] A response for a command.
|
157
|
+
# @return [void]
|
86
158
|
def restore(dumped_commands)
|
87
159
|
buffer = ""
|
160
|
+
continued = false
|
88
161
|
dumped_commands.each_line do |line|
|
89
162
|
line = line.chomp
|
90
163
|
case line
|
91
164
|
when /\\\z/
|
165
|
+
continued = true
|
92
166
|
buffer << $PREMATCH
|
93
167
|
else
|
168
|
+
continued = false
|
94
169
|
buffer << line
|
95
170
|
send(buffer)
|
96
|
-
receive
|
171
|
+
_, response = receive
|
172
|
+
if block_given?
|
173
|
+
not_shared_command = continued ? buffer.dup : line
|
174
|
+
yield(not_shared_command, response)
|
175
|
+
end
|
97
176
|
buffer.clear
|
98
177
|
end
|
99
178
|
end
|
100
179
|
unless buffer.empty?
|
101
180
|
send(buffer)
|
102
|
-
receive
|
181
|
+
_, response = receive
|
182
|
+
yield(buffer.dup, response) if block_given?
|
103
183
|
end
|
104
184
|
end
|
105
185
|
end
|
data/rroonga-build.rb
CHANGED
data/test/groonga-test-utils.rb
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
|
16
16
|
require 'fileutils'
|
17
17
|
require 'pathname'
|
18
|
+
require 'tempfile'
|
18
19
|
require 'time'
|
19
20
|
require 'erb'
|
20
21
|
require 'stringio'
|
@@ -46,7 +47,7 @@ module GroongaTestUtils
|
|
46
47
|
|
47
48
|
def setup_tmp_directory
|
48
49
|
@base_tmp_dir = Pathname(File.dirname(__FILE__)) + "tmp"
|
49
|
-
memory_file_system = "/
|
50
|
+
memory_file_system = "/run/shm"
|
50
51
|
if File.exist?(memory_file_system)
|
51
52
|
FileUtils.mkdir_p(@base_tmp_dir.parent.to_s)
|
52
53
|
FileUtils.rm_f(@base_tmp_dir.to_s)
|
data/test/test-array.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009-
|
1
|
+
# Copyright (C) 2009-2013 Kouhei Sutou <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,7 +16,7 @@
|
|
16
16
|
class ArrayTest < Test::Unit::TestCase
|
17
17
|
include GroongaTestUtils
|
18
18
|
|
19
|
-
setup :setup_database
|
19
|
+
setup :setup_database, :before => :append
|
20
20
|
|
21
21
|
def test_support_key?
|
22
22
|
assert_not_predicate(Groonga::Array.create(:name => "Users"), :support_key?)
|
@@ -143,4 +143,88 @@ class ArrayTest < Test::Unit::TestCase
|
|
143
143
|
user_ids = users.each.collect(&:id)
|
144
144
|
assert_equal([1, 2, 3], user_ids)
|
145
145
|
end
|
146
|
+
|
147
|
+
class TestPushPull < self
|
148
|
+
def setup
|
149
|
+
@queue = Groonga::Array.create(:name => "Queue")
|
150
|
+
@queue.define_column("content", "ShortText")
|
151
|
+
end
|
152
|
+
|
153
|
+
def teardown
|
154
|
+
@queue = nil
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_block?
|
158
|
+
Tempfile.open("output") do |output|
|
159
|
+
Tempfile.open("blocked_pull.rb") do |pull_rb|
|
160
|
+
pull_rb.puts(pull_rb_source(":block? => true"))
|
161
|
+
pull_rb.close
|
162
|
+
|
163
|
+
pid = spawn({}, RbConfig.ruby, pull_rb.path, :out => output.path)
|
164
|
+
sleep(0.5)
|
165
|
+
@queue.push do |record|
|
166
|
+
record.content = "The first record"
|
167
|
+
end
|
168
|
+
Process.waitpid(pid)
|
169
|
+
assert_equal(<<-EXPECTED_OUTPUT, output.read)
|
170
|
+
start
|
171
|
+
1, The first record
|
172
|
+
done
|
173
|
+
EXPECTED_OUTPUT
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_not_block?
|
179
|
+
Tempfile.open("output") do |output|
|
180
|
+
Tempfile.open("not_blocked_pull.rb") do |pull_rb|
|
181
|
+
pull_rb.puts(pull_rb_source(":block? => false"))
|
182
|
+
pull_rb.close
|
183
|
+
|
184
|
+
pid = spawn({}, RbConfig.ruby, pull_rb.path, :out => output.path)
|
185
|
+
Process.waitpid(pid)
|
186
|
+
assert_equal(<<-EXPECTED_OUTPUT, output.read)
|
187
|
+
start
|
188
|
+
done
|
189
|
+
EXPECTED_OUTPUT
|
190
|
+
|
191
|
+
@queue.push do |record|
|
192
|
+
record.content = "The first record"
|
193
|
+
end
|
194
|
+
pid = spawn({}, RbConfig.ruby, pull_rb.path, :out => output.path)
|
195
|
+
Process.waitpid(pid)
|
196
|
+
output.rewind
|
197
|
+
assert_equal(<<-EXPECTED_OUTPUT, output.read)
|
198
|
+
start
|
199
|
+
1, The first record
|
200
|
+
done
|
201
|
+
EXPECTED_OUTPUT
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
private
|
207
|
+
def pull_rb_source(options)
|
208
|
+
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
209
|
+
<<-CODE
|
210
|
+
base_dir = #{base_dir.dump}
|
211
|
+
ext_dir = File.join(base_dir, "ext", "groonga")
|
212
|
+
lib_dir = File.join(base_dir, "lib")
|
213
|
+
|
214
|
+
$LOAD_PATH.unshift(ext_dir)
|
215
|
+
$LOAD_PATH.unshift(lib_dir)
|
216
|
+
|
217
|
+
require "groonga"
|
218
|
+
|
219
|
+
puts("start")
|
220
|
+
Groonga::Context.default.open_database(#{@database_path.to_s.dump}) do
|
221
|
+
queue = Groonga["Queue"]
|
222
|
+
queue.pull(#{options}) do |record|
|
223
|
+
puts([record.id, record.content].join(", "))
|
224
|
+
end
|
225
|
+
end
|
226
|
+
puts("done")
|
227
|
+
CODE
|
228
|
+
end
|
229
|
+
end
|
146
230
|
end
|
data/test/test-context.rb
CHANGED
@@ -178,12 +178,32 @@ column_create Items title COLUMN_SCALAR Text
|
|
178
178
|
EOC
|
179
179
|
end
|
180
180
|
|
181
|
+
def test_block
|
182
|
+
table_create = "table_create Items TABLE_HASH_KEY --key_type ShortText"
|
183
|
+
column_create = "column_create Items title COLUMN_SCALAR Text"
|
184
|
+
commands = <<-COMMANDS
|
185
|
+
#{table_create}
|
186
|
+
|
187
|
+
#{column_create}
|
188
|
+
COMMANDS
|
189
|
+
responses = []
|
190
|
+
restore(commands) do |command, response|
|
191
|
+
responses << [command.dup, response]
|
192
|
+
end
|
193
|
+
assert_equal([
|
194
|
+
[table_create, "true"],
|
195
|
+
["", ""],
|
196
|
+
[column_create,"true"]
|
197
|
+
],
|
198
|
+
responses)
|
199
|
+
end
|
200
|
+
|
181
201
|
private
|
182
|
-
def restore(commands)
|
202
|
+
def restore(commands, &block)
|
183
203
|
restored_db_path = @tmp_dir + "restored.db"
|
184
204
|
Groonga::Database.create(:path => restored_db_path.to_s)
|
185
205
|
|
186
|
-
context.restore(commands)
|
206
|
+
context.restore(commands, &block)
|
187
207
|
end
|
188
208
|
|
189
209
|
def dump
|