rroonga 1.2.5-x86-mingw32 → 1.2.7-x86-mingw32

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.
Files changed (300) hide show
  1. data/Gemfile +30 -0
  2. data/Rakefile +24 -285
  3. data/ext/groonga/extconf.rb +4 -2
  4. data/ext/groonga/rb-grn-array.c +5 -4
  5. data/ext/groonga/rb-grn-context.c +7 -22
  6. data/ext/groonga/rb-grn-database.c +42 -1
  7. data/ext/groonga/rb-grn-index-column.c +5 -0
  8. data/ext/groonga/rb-grn-object.c +58 -26
  9. data/ext/groonga/rb-grn-patricia-trie.c +2 -1
  10. data/ext/groonga/rb-grn-record.c +11 -1
  11. data/ext/groonga/rb-grn-snippet.c +44 -1
  12. data/ext/groonga/rb-grn-table-key-support.c +21 -10
  13. data/ext/groonga/rb-grn-utils.c +3 -1
  14. data/ext/groonga/rb-grn-variable-size-column.c +47 -1
  15. data/ext/groonga/rb-grn.h +4 -1
  16. data/extconf.rb +1 -0
  17. data/lib/1.8/groonga.so +0 -0
  18. data/lib/1.9/groonga.so +0 -0
  19. data/lib/groonga/dumper.rb +3 -3
  20. data/lib/groonga/pagination.rb +1 -1
  21. data/lib/groonga/record.rb +10 -0
  22. data/rroonga-build.rb +1 -1
  23. data/test/test-accessor.rb +4 -0
  24. data/test/test-array.rb +9 -1
  25. data/test/test-database.rb +16 -0
  26. data/test/test-expression.rb +2 -0
  27. data/test/test-hash.rb +11 -2
  28. data/test/test-patricia-trie.rb +10 -1
  29. data/test/test-table-select.rb +31 -17
  30. data/test/test-type.rb +3 -3
  31. data/test/test-variable-size-column.rb +8 -1
  32. data/vendor/local/bin/grntest.exe +0 -0
  33. data/vendor/local/bin/groonga.exe +0 -0
  34. data/vendor/local/bin/libgroonga-0.dll +0 -0
  35. data/vendor/local/bin/libmecab-1.dll +0 -0
  36. data/vendor/local/bin/mecab-config +2 -2
  37. data/vendor/local/bin/mecab.exe +0 -0
  38. data/vendor/local/include/groonga/groonga.h +20 -4
  39. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  40. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  41. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  42. data/vendor/local/lib/groonga/plugins/suggest/suggest.la +3 -3
  43. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  44. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  45. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  46. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +3 -3
  47. data/vendor/local/lib/libgroonga.a +0 -0
  48. data/vendor/local/lib/libgroonga.dll.a +0 -0
  49. data/vendor/local/lib/libgroonga.la +2 -2
  50. data/vendor/local/lib/libmecab.a +0 -0
  51. data/vendor/local/lib/libmecab.dll.a +0 -0
  52. data/vendor/local/lib/libmecab.la +1 -1
  53. data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
  54. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  55. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  56. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  57. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  58. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  59. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  60. data/vendor/local/share/doc/groonga/en/html/_sources/commands/suggest.txt +207 -35
  61. data/vendor/local/share/doc/groonga/en/html/_sources/executables/grntest.txt +1 -1
  62. data/vendor/local/share/doc/groonga/en/html/_sources/executables/{http.txt → groonga-http.txt} +1 -1
  63. data/vendor/local/share/doc/groonga/en/html/_sources/executables/groonga-suggest-create-dataset.txt +50 -0
  64. data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +1 -0
  65. data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +14 -3
  66. data/vendor/local/share/doc/groonga/en/html/_sources/log.txt +214 -0
  67. data/vendor/local/share/doc/groonga/en/html/_sources/news/1.0.x.txt +1 -1
  68. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +35 -3
  69. data/vendor/local/share/doc/groonga/en/html/_sources/suggest/completion.txt +195 -0
  70. data/vendor/local/share/doc/groonga/en/html/_sources/suggest/correction.txt +148 -0
  71. data/vendor/local/share/doc/groonga/en/html/_sources/suggest/introduction.txt +94 -0
  72. data/vendor/local/share/doc/groonga/en/html/_sources/suggest/suggestion.txt +115 -0
  73. data/vendor/local/share/doc/groonga/en/html/_sources/suggest/tutorial.txt +8 -0
  74. data/vendor/local/share/doc/groonga/en/html/_sources/suggest.txt +22 -0
  75. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/tutorial01.txt +2 -1
  76. data/vendor/local/share/doc/groonga/en/html/_static/groonga.css +1 -0
  77. data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
  78. data/vendor/local/share/doc/groonga/en/html/command_version.html +30 -30
  79. data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +34 -34
  80. data/vendor/local/share/doc/groonga/en/html/commands/check.html +34 -34
  81. data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +34 -34
  82. data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +34 -34
  83. data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +34 -34
  84. data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +34 -34
  85. data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +36 -36
  86. data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +34 -34
  87. data/vendor/local/share/doc/groonga/en/html/commands/delete.html +34 -34
  88. data/vendor/local/share/doc/groonga/en/html/commands/dump.html +32 -32
  89. data/vendor/local/share/doc/groonga/en/html/commands/load.html +36 -36
  90. data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +36 -36
  91. data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +36 -36
  92. data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +38 -38
  93. data/vendor/local/share/doc/groonga/en/html/commands/quit.html +32 -32
  94. data/vendor/local/share/doc/groonga/en/html/commands/select.html +38 -38
  95. data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +32 -32
  96. data/vendor/local/share/doc/groonga/en/html/commands/status.html +34 -34
  97. data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +258 -72
  98. data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +34 -34
  99. data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +34 -34
  100. data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +34 -34
  101. data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +34 -34
  102. data/vendor/local/share/doc/groonga/en/html/commands.html +42 -42
  103. data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
  104. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
  105. data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +7 -7
  106. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
  107. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
  108. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +8 -8
  109. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
  110. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
  111. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +8 -8
  112. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +12 -12
  113. data/vendor/local/share/doc/groonga/en/html/contribution.html +10 -10
  114. data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +32 -32
  115. data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +49 -49
  116. data/vendor/local/share/doc/groonga/en/html/executables/{http.html → groonga-http.html} +34 -34
  117. data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +186 -0
  118. data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +37 -37
  119. data/vendor/local/share/doc/groonga/en/html/executables.html +22 -21
  120. data/vendor/local/share/doc/groonga/en/html/expr.html +26 -26
  121. data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +32 -32
  122. data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +32 -32
  123. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +32 -32
  124. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +32 -32
  125. data/vendor/local/share/doc/groonga/en/html/functions/now.html +30 -30
  126. data/vendor/local/share/doc/groonga/en/html/functions/rand.html +32 -32
  127. data/vendor/local/share/doc/groonga/en/html/functions.html +23 -23
  128. data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
  129. data/vendor/local/share/doc/groonga/en/html/index.html +105 -74
  130. data/vendor/local/share/doc/groonga/en/html/install.html +22 -11
  131. data/vendor/local/share/doc/groonga/en/html/limitations.html +17 -17
  132. data/vendor/local/share/doc/groonga/en/html/log.html +345 -0
  133. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
  134. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +6 -6
  135. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
  136. data/vendor/local/share/doc/groonga/en/html/news.html +94 -57
  137. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  138. data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +22 -22
  139. data/vendor/local/share/doc/groonga/en/html/reference.html +69 -68
  140. data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
  141. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  142. data/vendor/local/share/doc/groonga/en/html/spec/search.html +28 -28
  143. data/vendor/local/share/doc/groonga/en/html/spec.html +15 -15
  144. data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +357 -0
  145. data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +286 -0
  146. data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +243 -0
  147. data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +265 -0
  148. data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +134 -0
  149. data/vendor/local/share/doc/groonga/en/html/suggest.html +166 -0
  150. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +26 -26
  151. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +19 -19
  152. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial01.html +6 -6
  153. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial02.html +5 -5
  154. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial03.html +5 -5
  155. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial04.html +5 -5
  156. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial05.html +5 -5
  157. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial06.html +5 -5
  158. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial07.html +5 -5
  159. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial08.html +5 -5
  160. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial09.html +5 -5
  161. data/vendor/local/share/doc/groonga/en/html/tutorial/tutorial10.html +10 -10
  162. data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
  163. data/vendor/local/share/doc/groonga/en/html/type.html +30 -30
  164. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  165. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/suggest.txt +207 -35
  166. data/vendor/local/share/doc/groonga/ja/html/_sources/executables/grntest.txt +1 -1
  167. data/vendor/local/share/doc/groonga/{source/executables/http.txt → ja/html/_sources/executables/groonga-http.txt} +1 -1
  168. data/vendor/local/share/doc/groonga/ja/html/_sources/executables/groonga-suggest-create-dataset.txt +50 -0
  169. data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +1 -0
  170. data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +14 -3
  171. data/vendor/local/share/doc/groonga/ja/html/_sources/log.txt +214 -0
  172. data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.0.x.txt +1 -1
  173. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +35 -3
  174. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest/completion.txt +195 -0
  175. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest/correction.txt +148 -0
  176. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest/introduction.txt +94 -0
  177. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest/suggestion.txt +115 -0
  178. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest/tutorial.txt +8 -0
  179. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest.txt +22 -0
  180. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/tutorial01.txt +2 -1
  181. data/vendor/local/share/doc/groonga/ja/html/_static/groonga.css +1 -0
  182. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
  183. data/vendor/local/share/doc/groonga/ja/html/command_version.html +30 -30
  184. data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +34 -34
  185. data/vendor/local/share/doc/groonga/ja/html/commands/check.html +34 -34
  186. data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +34 -34
  187. data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +34 -34
  188. data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +34 -34
  189. data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +34 -34
  190. data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +36 -36
  191. data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +34 -34
  192. data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +34 -34
  193. data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +32 -32
  194. data/vendor/local/share/doc/groonga/ja/html/commands/load.html +36 -36
  195. data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +36 -36
  196. data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +36 -36
  197. data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +38 -38
  198. data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +32 -32
  199. data/vendor/local/share/doc/groonga/ja/html/commands/select.html +38 -38
  200. data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +32 -32
  201. data/vendor/local/share/doc/groonga/ja/html/commands/status.html +34 -34
  202. data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +237 -72
  203. data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +34 -34
  204. data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +34 -34
  205. data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +34 -34
  206. data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +34 -34
  207. data/vendor/local/share/doc/groonga/ja/html/commands.html +42 -42
  208. data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
  209. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
  210. data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +7 -7
  211. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
  212. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
  213. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +8 -8
  214. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
  215. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
  216. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +8 -8
  217. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +12 -12
  218. data/vendor/local/share/doc/groonga/ja/html/contribution.html +10 -10
  219. data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +32 -32
  220. data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +49 -49
  221. data/vendor/local/share/doc/groonga/ja/html/executables/{http.html → groonga-http.html} +34 -34
  222. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +187 -0
  223. data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +37 -37
  224. data/vendor/local/share/doc/groonga/ja/html/executables.html +22 -21
  225. data/vendor/local/share/doc/groonga/ja/html/expr.html +26 -26
  226. data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +32 -32
  227. data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +32 -32
  228. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +32 -32
  229. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +32 -32
  230. data/vendor/local/share/doc/groonga/ja/html/functions/now.html +30 -30
  231. data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +32 -32
  232. data/vendor/local/share/doc/groonga/ja/html/functions.html +23 -23
  233. data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
  234. data/vendor/local/share/doc/groonga/ja/html/index.html +105 -74
  235. data/vendor/local/share/doc/groonga/ja/html/install.html +24 -11
  236. data/vendor/local/share/doc/groonga/ja/html/limitations.html +17 -17
  237. data/vendor/local/share/doc/groonga/ja/html/log.html +346 -0
  238. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
  239. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +6 -6
  240. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
  241. data/vendor/local/share/doc/groonga/ja/html/news.html +87 -55
  242. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  243. data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +22 -22
  244. data/vendor/local/share/doc/groonga/ja/html/reference.html +69 -68
  245. data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
  246. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  247. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +28 -28
  248. data/vendor/local/share/doc/groonga/ja/html/spec.html +15 -15
  249. data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +327 -0
  250. data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +254 -0
  251. data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +225 -0
  252. data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +248 -0
  253. data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +135 -0
  254. data/vendor/local/share/doc/groonga/ja/html/suggest.html +166 -0
  255. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +26 -26
  256. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +19 -19
  257. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial01.html +6 -6
  258. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial02.html +5 -5
  259. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial03.html +5 -5
  260. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial04.html +5 -5
  261. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial05.html +5 -5
  262. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial06.html +5 -5
  263. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial07.html +5 -5
  264. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial08.html +5 -5
  265. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial09.html +5 -5
  266. data/vendor/local/share/doc/groonga/ja/html/tutorial/tutorial10.html +10 -10
  267. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
  268. data/vendor/local/share/doc/groonga/ja/html/type.html +30 -30
  269. data/vendor/local/share/doc/groonga/source/commands/suggest.txt +207 -35
  270. data/vendor/local/share/doc/groonga/source/example/completion-1.log +5 -0
  271. data/vendor/local/share/doc/groonga/source/example/correction-1.log +5 -0
  272. data/vendor/local/share/doc/groonga/source/example/suggestion-1.log +5 -0
  273. data/vendor/local/share/doc/groonga/source/executables/grntest.txt +1 -1
  274. data/vendor/local/share/doc/groonga/{ja/html/_sources/executables/http.txt → source/executables/groonga-http.txt} +1 -1
  275. data/vendor/local/share/doc/groonga/source/executables/groonga-suggest-create-dataset.txt +50 -0
  276. data/vendor/local/share/doc/groonga/source/index.txt +1 -0
  277. data/vendor/local/share/doc/groonga/source/install.txt +14 -3
  278. data/vendor/local/share/doc/groonga/source/log.txt +214 -0
  279. data/vendor/local/share/doc/groonga/source/news/1.0.x.txt +1 -1
  280. data/vendor/local/share/doc/groonga/source/news.txt +35 -3
  281. data/vendor/local/share/doc/groonga/source/suggest/completion.txt +195 -0
  282. data/vendor/local/share/doc/groonga/source/suggest/correction.txt +148 -0
  283. data/vendor/local/share/doc/groonga/source/suggest/introduction.txt +94 -0
  284. data/vendor/local/share/doc/groonga/source/suggest/suggestion.txt +115 -0
  285. data/vendor/local/share/doc/groonga/source/suggest/tutorial.txt +8 -0
  286. data/vendor/local/share/doc/groonga/source/suggest.txt +22 -0
  287. data/vendor/local/share/doc/groonga/source/tutorial/tutorial01.txt +2 -1
  288. data/vendor/local/share/doc/groonga/source/update_execution_example.py +46 -20
  289. data/vendor/local/share/license/groonga/AUTHORS +17 -0
  290. data/vendor/local/share/license/groonga/COPYING +504 -0
  291. data/vendor/local/share/license/mecab/AUTHORS +1 -0
  292. data/vendor/local/share/license/mecab/BSD +29 -0
  293. data/vendor/local/share/license/mecab/COPYING +4 -0
  294. data/vendor/local/share/license/mecab/GPL +340 -0
  295. data/vendor/local/share/license/mecab/LGPL +504 -0
  296. data/vendor/local/share/license/naist-jdic/AUTHORS +2 -0
  297. data/vendor/local/share/license/naist-jdic/COPYING +31 -0
  298. data/vendor/local/share/man/ja/man1/groonga.1 +1050 -45
  299. data/vendor/local/share/man/man1/groonga.1 +1174 -48
  300. metadata +62 -9
data/Gemfile ADDED
@@ -0,0 +1,30 @@
1
+ # -*- mode: ruby; coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License version 2.1 as published by the Free Software Foundation.
8
+ #
9
+ # This library is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ # Lesser General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU Lesser General Public
15
+ # License along with this library; if not, write to the Free Software
16
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+
18
+ source "http://rubygems.org/"
19
+
20
+ gem 'pkg-config'
21
+
22
+ group :development, :test do
23
+ gem "test-unit"
24
+ gem "test-unit-notify"
25
+ gem "rake"
26
+ gem "rake-compiler"
27
+ gem "jeweler"
28
+ gem "yard"
29
+ gem "packnga"
30
+ end
data/Rakefile CHANGED
@@ -26,6 +26,7 @@ require 'rubygems/package_task'
26
26
  require 'yard'
27
27
  require 'jeweler'
28
28
  require 'rake/extensiontask'
29
+ require 'packnga'
29
30
 
30
31
  if YAML.const_defined?(:ENGINE)
31
32
  begin
@@ -89,6 +90,7 @@ Jeweler::Tasks.new do |_spec|
89
90
  "*.rb",
90
91
  "example/*.rb",
91
92
  "Rakefile",
93
+ "Gemfile",
92
94
  "ext/**/*"]
93
95
  spec.test_files = FileList["test/**/*.rb"]
94
96
  end
@@ -101,6 +103,28 @@ Gem::PackageTask.new(spec) do |pkg|
101
103
  pkg.need_tar_gz = true
102
104
  end
103
105
 
106
+ document_task = Packnga::DocumentTask.new(spec) do |t|
107
+ t.yard do |yard_task|
108
+ yard_task.files += FileList["ext/**/*.c"]
109
+ end
110
+ end
111
+
112
+ namespace :reference do
113
+ namespace :publication do
114
+ task :keep_compatible do
115
+ File.open(document_task.htaccess, "a") do |file|
116
+ file.puts("Redirect permanent /#{spec.name}/text/TUTORIAL_ja_rdoc.html " +
117
+ "#{spec.homepage}#{spec.name}/ja/file.tutorial.html")
118
+ end
119
+ end
120
+
121
+ task :generate => :keep_compatible
122
+ end
123
+ end
124
+
125
+ Packnga::ReleaseTask.new(spec) do |task|
126
+ end
127
+
104
128
  module YARD
105
129
  module CodeObjects
106
130
  class Proxy
@@ -123,33 +147,6 @@ module YARD
123
147
  end
124
148
  end
125
149
 
126
- reference_base_dir = Pathname.new("doc/reference")
127
- doc_en_dir = reference_base_dir + "en"
128
- html_base_dir = Pathname.new("doc/html")
129
- html_reference_dir = html_base_dir + spec.name
130
- YARD::Rake::YardocTask.new do |task|
131
- task.options += ["--title", spec.name]
132
- # task.options += ["--charset", "UTF-8"]
133
- task.options += ["--readme", "README.textile"]
134
- task.options += ["--files", "doc/text/**/*"]
135
- task.options += ["--output-dir", doc_en_dir.to_s]
136
- task.options += ["--charset", "utf-8"]
137
- task.files += FileList["ext/groonga/**/*.c"]
138
- task.files += FileList["lib/**/*.rb"]
139
- end
140
-
141
- task :yard do
142
- doc_en_dir.find do |path|
143
- next if path.extname != ".html"
144
- html = path.read
145
- html = html.gsub(/<div id="footer">.+<\/div>/m,
146
- "<div id=\"footer\"></div>")
147
- path.open("w") do |html_file|
148
- html_file.print(html)
149
- end
150
- end
151
- end
152
-
153
150
  def windows?(platform=nil)
154
151
  platform ||= RUBY_PLATFORM
155
152
  platform =~ /mswin(?!ce)|mingw|cygwin|bccwin/
@@ -191,264 +188,6 @@ Rake::ExtensionTask.new("groonga", spec) do |ext|
191
188
  end
192
189
  end
193
190
 
194
- include ERB::Util
195
-
196
- def apply_template(content, paths, templates, language)
197
- content = content.sub(/lang="en"/, "lang=\"#{language}\"")
198
-
199
- title = nil
200
- content = content.sub(/<title>(.+?)<\/title>/m) do
201
- title = $1
202
- templates[:head].result(binding)
203
- end
204
-
205
- content = content.sub(/<body(?:.*?)>/) do |body_start|
206
- "#{body_start}\n#{templates[:header].result(binding)}\n"
207
- end
208
-
209
- content = content.sub(/<\/body/) do |body_end|
210
- "\n#{templates[:footer].result(binding)}\n#{body_end}"
211
- end
212
-
213
- content
214
- end
215
-
216
- def erb_template(name)
217
- file = File.join("doc/templates", "#{name}.html.erb")
218
- template = File.read(file)
219
- erb = ERB.new(template, nil, "-")
220
- erb.filename = file
221
- erb
222
- end
223
-
224
- def rsync_to_rubyforge(spec, source, destination, options={})
225
- config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
226
- host = "#{config["username"]}@rubyforge.org"
227
-
228
- rsync_args = "-av --exclude '*.erb' --chmod=ug+w"
229
- rsync_args << " --delete" if options[:delete]
230
- remote_dir = "/var/www/gforge-projects/#{spec.rubyforge_project}/"
231
- sh("rsync #{rsync_args} #{source} #{host}:#{remote_dir}#{destination}")
232
- end
233
-
234
- def rake(*arguments)
235
- ruby($0, *arguments)
236
- end
237
-
238
- namespace :reference do
239
- translate_languages = [:ja]
240
- supported_languages = [:en, *translate_languages]
241
- html_files = FileList[doc_en_dir + "**/*.html"].to_a
242
-
243
- directory reference_base_dir.to_s
244
- CLOBBER.include(reference_base_dir.to_s)
245
-
246
- po_dir = "doc/po"
247
- namespace :pot do
248
- pot_file = "#{po_dir}/#{spec.name}.pot"
249
-
250
- directory po_dir
251
- file pot_file => ["po", *html_files] do |t|
252
- sh("xml2po", "--keep-entities", "--output", t.name, *html_files)
253
- end
254
-
255
- desc "Generates pot file."
256
- task :generate => pot_file
257
- end
258
-
259
- namespace :po do
260
- translate_languages.each do |language|
261
- namespace language do
262
- po_file = "#{po_dir}/#{language}.po"
263
-
264
- file po_file => html_files do |t|
265
- sh("xml2po", "--keep-entities", "--update", t.name, *html_files)
266
- end
267
-
268
- desc "Updates po file for #{language}."
269
- task :update => po_file
270
- end
271
- end
272
-
273
- desc "Updates po files."
274
- task :update do
275
- ruby($0, "clobber")
276
- ruby($0, "yard")
277
- translate_languages.each do |language|
278
- ruby($0, "reference:po:#{language}:update")
279
- end
280
- end
281
- end
282
-
283
- namespace :translate do
284
- translate_languages.each do |language|
285
- po_file = "#{po_dir}/#{language}.po"
286
- translate_doc_dir = "#{reference_base_dir}/#{language}"
287
-
288
- desc "Translates documents to #{language}."
289
- task language => [po_file, reference_base_dir, *html_files] do
290
- doc_en_dir.find do |path|
291
- base_path = path.relative_path_from(doc_en_dir)
292
- translated_path = "#{translate_doc_dir}/#{base_path}"
293
- if path.directory?
294
- mkdir_p(translated_path)
295
- next
296
- end
297
- case path.extname
298
- when ".html"
299
- sh("xml2po --keep-entities " +
300
- "--po-file #{po_file} --language #{language} " +
301
- "#{path} > #{translated_path}")
302
- else
303
- cp(path.to_s, translated_path, :preserve => true)
304
- end
305
- end
306
- end
307
- end
308
- end
309
-
310
- translate_task_names = translate_languages.collect do |language|
311
- "reference:translate:#{language}"
312
- end
313
- desc "Translates references."
314
- task :translate => translate_task_names
315
-
316
- desc "Generates references."
317
- task :generate => [:yard, :translate]
318
-
319
- namespace :publication do
320
- task :prepare do
321
- supported_languages.each do |language|
322
- raw_reference_dir = reference_base_dir + language.to_s
323
- prepared_reference_dir = html_reference_dir + language.to_s
324
- rm_rf(prepared_reference_dir.to_s)
325
- head = erb_template("head.#{language}")
326
- header = erb_template("header.#{language}")
327
- footer = erb_template("footer.#{language}")
328
- raw_reference_dir.find do |path|
329
- relative_path = path.relative_path_from(raw_reference_dir)
330
- prepared_path = prepared_reference_dir + relative_path
331
- if path.directory?
332
- mkdir_p(prepared_path.to_s)
333
- else
334
- case path.basename.to_s
335
- when /(?:file|method|class)_list\.html\z/
336
- cp(path.to_s, prepared_path.to_s)
337
- when /\.html\z/
338
- relative_dir_path = relative_path.dirname
339
- current_path = relative_dir_path + path.basename
340
- if current_path.basename.to_s == "index.html"
341
- current_path = current_path.dirname
342
- end
343
- top_path = html_base_dir.relative_path_from(prepared_path.dirname)
344
- paths = {
345
- :top => top_path,
346
- :current => current_path,
347
- }
348
- templates = {
349
- :head => head,
350
- :header => header,
351
- :footer => footer
352
- }
353
- content = apply_template(File.read(path.to_s),
354
- paths,
355
- templates,
356
- language)
357
- File.open(prepared_path.to_s, "w") do |file|
358
- file.print(content)
359
- end
360
- else
361
- cp(path.to_s, prepared_path.to_s)
362
- end
363
- end
364
- end
365
- end
366
- File.open("#{html_reference_dir}/.htaccess", "w") do |file|
367
- file.puts("Redirect permanent /#{spec.name}/text/TUTORIAL_ja_rdoc.html " +
368
- "#{spec.homepage}#{spec.name}/ja/file.tutorial.html")
369
- file.puts("RedirectMatch permanent ^/#{spec.name}/$ " +
370
- "#{spec.homepage}#{spec.name}/en/")
371
- end
372
- end
373
- end
374
-
375
- desc "Upload document to rubyforge."
376
- task :publish => [:generate, "reference:publication:prepare"] do
377
- rsync_to_rubyforge(spec, "#{html_reference_dir}/", spec.name)
378
- end
379
- end
380
-
381
- namespace :html do
382
- desc "Publish HTML to Web site."
383
- task :publish do
384
- rsync_to_rubyforge(spec, "#{html_base_dir}/", "")
385
- end
386
- end
387
-
388
- desc "Upload document and HTML to rubyforge."
389
- task :publish => ["html:publish", "reference:publish"]
390
-
391
- desc "Tag the current revision."
392
- task :tag do
393
- sh("git tag -a #{version} -m 'release #{version}!!!'")
394
- end
395
-
396
- namespace :release do
397
- namespace :info do
398
- desc "update version in index HTML."
399
- task :update do
400
- old_version = ENV["OLD_VERSION"]
401
- old_release_date = ENV["OLD_RELEASE_DATE"]
402
- new_release_date = ENV["RELEASE_DATE"] || Time.now.strftime("%Y-%m-%d")
403
- new_version = ENV["VERSION"]
404
-
405
- empty_options = []
406
- empty_options << "OLD_VERSION" if old_version.nil?
407
- empty_options << "OLD_RELEASE_DATE" if old_release_date.nil?
408
-
409
- unless empty_options.empty?
410
- raise ArgumentError, "Specify option(s) of #{empty_options.join(",")}."
411
- end
412
-
413
- indexes = ["doc/html/index.html", "doc/html/index.html.ja"]
414
- indexes.each do |index|
415
- content = replaced_content = File.read(index)
416
- [[old_version, new_version],
417
- [old_release_date, new_release_date]].each do |old, new|
418
- replaced_content = replaced_content.gsub(/#{Regexp.escape(old)}/, new)
419
- if /\./ =~ old
420
- old_undnerscore = old.gsub(/\./, '-')
421
- new_underscore = new.gsub(/\./, '-')
422
- replaced_content =
423
- replaced_content.gsub(/#{Regexp.escape(old_underscore)}/,
424
- new_underscore)
425
- end
426
- end
427
-
428
- next if replaced_content == content
429
- File.open(index, "w") do |output|
430
- output.print(replaced_content)
431
- end
432
- end
433
- end
434
- end
435
-
436
- namespace :rubyforge do
437
- desc "Upload tar.gz to RubyForge."
438
- task :upload => "package" do
439
- ruby("-S", "rubyforge",
440
- "add_release",
441
- spec.rubyforge_project,
442
- spec.name,
443
- spec.version.to_s,
444
- "pkg/#{spec.name}-#{spec.version}.tar.gz")
445
- end
446
- end
447
-
448
- desc "Release to RubyForge."
449
- task :rubyforge => "release:rubyforge:upload"
450
- end
451
-
452
191
  namespace :test do
453
192
  task :install do
454
193
  gemspec_helper = Rake.application.jeweler.gemspec_helper
@@ -158,7 +158,9 @@ checking_for(checking_message("debug flag")) do
158
158
  debug
159
159
  end
160
160
 
161
- $INSTALLFILES ||= []
162
- $INSTALLFILES << ["../../lib/**/*.rb", "$(RUBYLIBDIR)", "../../lib"]
161
+ if ENV["INSTALL_RB"] == "yes"
162
+ $INSTALLFILES ||= []
163
+ $INSTALLFILES << ["../../lib/**/*.rb", "$(RUBYLIBDIR)", "../../lib"]
164
+ end
163
165
 
164
166
  create_makefile(module_name)
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby" -*- */
2
2
  /*
3
- Copyright (C) 2009-2010 Kouhei Sutou <kou@clear-code.com>
3
+ Copyright (C) 2009-2011 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
@@ -192,10 +192,11 @@ rb_grn_array_add (int argc, VALUE *argv, VALUE self)
192
192
  id = grn_table_add(context, table, NULL, 0, NULL);
193
193
  rb_grn_context_check(context, self);
194
194
 
195
- if (GRN_ID_NIL == id)
195
+ if (GRN_ID_NIL == id) {
196
196
  return Qnil;
197
- else
198
- return rb_grn_record_new(self, id, values);
197
+ } else {
198
+ return rb_grn_record_new_added(self, id, values);
199
+ }
199
200
  }
200
201
 
201
202
  void
@@ -59,27 +59,12 @@ rb_grn_context_from_ruby_object (VALUE object)
59
59
  return rb_grn_context->context;
60
60
  }
61
61
 
62
- static void
63
- rb_grn_context_unlink_database (grn_ctx *context)
64
- {
65
- grn_obj *database;
66
-
67
- database = grn_ctx_db(context);
68
- debug("context:database: %p:%p\n", context, database);
69
- if (database && database->header.type == GRN_DB) {
70
- debug("context:database: %p:%p: unlink\n", context, database);
71
- grn_obj_unlink(context, database);
72
- }
73
- debug("context:database: %p:%p: done\n", context, database);
74
- }
75
-
76
62
  void
77
63
  rb_grn_context_fin (grn_ctx *context)
78
64
  {
79
65
  if (context->stat == GRN_CTX_FIN)
80
66
  return;
81
67
 
82
- rb_grn_context_unlink_database(context);
83
68
  grn_ctx_fin(context);
84
69
  }
85
70
 
@@ -122,8 +107,6 @@ rb_grn_context_finalizer (grn_ctx *context, int n_args, grn_obj **grn_objects,
122
107
 
123
108
  rb_grn_context->context = NULL;
124
109
 
125
- rb_grn_context_unlink_database(context);
126
-
127
110
  debug("context-finalize: %p:%p:%p: done\n",
128
111
  context, rb_grn_context, rb_grn_context->context);
129
112
 
@@ -315,7 +298,7 @@ rb_grn_context_initialize (int argc, VALUE *argv, VALUE self)
315
298
  {
316
299
  RbGrnContext *rb_grn_context;
317
300
  grn_ctx *context;
318
- int flags = 0;
301
+ int flags = GRN_CTX_PER_DB;
319
302
  VALUE options, default_options;
320
303
  VALUE rb_encoding;
321
304
 
@@ -369,10 +352,12 @@ rb_grn_context_close (VALUE self)
369
352
  RbGrnContext *rb_grn_context;
370
353
 
371
354
  context = SELF(self);
372
- rc = grn_ctx_fin(context);
373
- Data_Get_Struct(self, RbGrnContext, rb_grn_context);
374
- rb_grn_context->context = NULL;
375
- rb_grn_rc_check(rc, self);
355
+ if (context) {
356
+ rc = grn_ctx_fin(context);
357
+ Data_Get_Struct(self, RbGrnContext, rb_grn_context);
358
+ rb_grn_context->context = NULL;
359
+ rb_grn_rc_check(rc, self);
360
+ }
376
361
 
377
362
  return Qnil;
378
363
  }
@@ -195,7 +195,7 @@ rb_grn_database_s_create (int argc, VALUE *argv, VALUE klass)
195
195
  grn_obj_unlink(context, old_database);
196
196
  database = grn_db_create(context, path, &create_args);
197
197
  rb_grn_context_check(context, rb_ary_new4(argc, argv));
198
- rb_database = GRNOBJECT2RVAL(klass, context, database, GRN_TRUE);
198
+ rb_database = GRNOBJECT2RVAL(klass, context, database, GRN_FALSE);
199
199
  rb_iv_set(rb_database, "@context", rb_context);
200
200
  if (!NIL_P(rb_context))
201
201
  rb_iv_set(rb_context, "database", rb_database);
@@ -504,6 +504,46 @@ rb_grn_database_touch (VALUE self)
504
504
  return Qnil;
505
505
  }
506
506
 
507
+ /*
508
+ * Document-method: defrag
509
+ *
510
+ * call-seq:
511
+ * database.defrag(options={}) -> n_segments
512
+ *
513
+ * Defrags all variable size columns in the database.
514
+ *
515
+ * @return [Integer] the number of defraged segments
516
+ * @option options [Integer] :threshold (0) the threshold to
517
+ * determine whether a segment is defraged. Available
518
+ * values are -4..22. -4 means all segments are defraged.
519
+ * 22 means no segment is defraged.
520
+ * @since 1.2.6
521
+ */
522
+ static VALUE
523
+ rb_grn_database_defrag (int argc, VALUE *argv, VALUE self)
524
+ {
525
+ grn_ctx *context;
526
+ grn_obj *database;
527
+ int n_segments;
528
+ VALUE options, rb_threshold;
529
+ int threshold = 0;
530
+
531
+ rb_scan_args(argc, argv, "01", &options);
532
+ rb_grn_scan_options(options,
533
+ "threshold", &rb_threshold,
534
+ NULL);
535
+ if (!NIL_P(rb_threshold)) {
536
+ threshold = NUM2INT(rb_threshold);
537
+ }
538
+
539
+ rb_grn_database_deconstruct(SELF(self), &database, &context,
540
+ NULL, NULL, NULL, NULL);
541
+ n_segments = grn_obj_defrag(context, database, threshold);
542
+ rb_grn_context_check(context, self);
543
+
544
+ return INT2NUM(n_segments);
545
+ }
546
+
507
547
  void
508
548
  rb_grn_init_database (VALUE mGrn)
509
549
  {
@@ -534,4 +574,5 @@ rb_grn_init_database (VALUE mGrn)
534
574
  rb_define_method(rb_cGrnDatabase, "locked?", rb_grn_database_is_locked, 0);
535
575
 
536
576
  rb_define_method(rb_cGrnDatabase, "touch", rb_grn_database_touch, 0);
577
+ rb_define_method(rb_cGrnDatabase, "defrag", rb_grn_database_defrag, -1);
537
578
  }
@@ -276,6 +276,7 @@ resolve_source_id (grn_ctx *context, grn_obj *column, grn_id range_id,
276
276
  source_id = NUM2UINT(rb_source);
277
277
  } else {
278
278
  grn_obj *source;
279
+ grn_bool need_source_unlink = GRN_FALSE;
279
280
 
280
281
  if (TYPE(rb_source) == T_STRING) {
281
282
  grn_obj *table;
@@ -304,6 +305,7 @@ resolve_source_id (grn_ctx *context, grn_obj *column, grn_id range_id,
304
305
  name = dot_point + 1;
305
306
  }
306
307
  source = grn_obj_column(context, table, name, length);
308
+ need_source_unlink = GRN_TRUE;
307
309
  } else {
308
310
  source = RVAL2GRNOBJECT(rb_source, &context);
309
311
  }
@@ -321,6 +323,9 @@ resolve_source_id (grn_ctx *context, grn_obj *column, grn_id range_id,
321
323
  } else {
322
324
  source_id = grn_obj_id(context, source);
323
325
  }
326
+ if (need_source_unlink) {
327
+ grn_obj_unlink(context, source);
328
+ }
324
329
  }
325
330
 
326
331
  return source_id;