rroonga 0.9.2-mswin32

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 (202) hide show
  1. data/AUTHORS +5 -0
  2. data/NEWS.ja.rdoc +114 -0
  3. data/NEWS.rdoc +116 -0
  4. data/README.ja.rdoc +65 -0
  5. data/README.rdoc +66 -0
  6. data/Rakefile +217 -0
  7. data/benchmark/common.rb +49 -0
  8. data/benchmark/read-write-many-small-items.rb +144 -0
  9. data/benchmark/write-many-small-items.rb +135 -0
  10. data/example/bookmark.rb +161 -0
  11. data/example/index-html.rb +89 -0
  12. data/example/search/config.ru +211 -0
  13. data/example/search/public/css/groonga.css +122 -0
  14. data/ext/.gitignore +2 -0
  15. data/ext/libruby-groonga.a +0 -0
  16. data/ext/rb-grn-accessor.c +52 -0
  17. data/ext/rb-grn-array-cursor.c +36 -0
  18. data/ext/rb-grn-array.c +210 -0
  19. data/ext/rb-grn-column.c +573 -0
  20. data/ext/rb-grn-context.c +655 -0
  21. data/ext/rb-grn-database.c +472 -0
  22. data/ext/rb-grn-encoding-support.c +64 -0
  23. data/ext/rb-grn-encoding.c +257 -0
  24. data/ext/rb-grn-exception.c +1110 -0
  25. data/ext/rb-grn-expression-builder.c +75 -0
  26. data/ext/rb-grn-expression.c +735 -0
  27. data/ext/rb-grn-fix-size-column.c +166 -0
  28. data/ext/rb-grn-hash-cursor.c +38 -0
  29. data/ext/rb-grn-hash.c +294 -0
  30. data/ext/rb-grn-index-column.c +488 -0
  31. data/ext/rb-grn-logger.c +504 -0
  32. data/ext/rb-grn-object.c +1369 -0
  33. data/ext/rb-grn-operation.c +198 -0
  34. data/ext/rb-grn-patricia-trie-cursor.c +39 -0
  35. data/ext/rb-grn-patricia-trie.c +488 -0
  36. data/ext/rb-grn-procedure.c +52 -0
  37. data/ext/rb-grn-query.c +260 -0
  38. data/ext/rb-grn-record.c +40 -0
  39. data/ext/rb-grn-snippet.c +334 -0
  40. data/ext/rb-grn-table-cursor-key-support.c +69 -0
  41. data/ext/rb-grn-table-cursor.c +247 -0
  42. data/ext/rb-grn-table-key-support.c +731 -0
  43. data/ext/rb-grn-table.c +2141 -0
  44. data/ext/rb-grn-type.c +181 -0
  45. data/ext/rb-grn-utils.c +769 -0
  46. data/ext/rb-grn-variable-size-column.c +36 -0
  47. data/ext/rb-grn-variable.c +108 -0
  48. data/ext/rb-grn-view-accessor.c +53 -0
  49. data/ext/rb-grn-view-cursor.c +35 -0
  50. data/ext/rb-grn-view-record.c +41 -0
  51. data/ext/rb-grn-view.c +421 -0
  52. data/ext/rb-grn.h +700 -0
  53. data/ext/rb-groonga.c +117 -0
  54. data/extconf.rb +266 -0
  55. data/html/bar.svg +153 -0
  56. data/html/developer.html +117 -0
  57. data/html/developer.svg +469 -0
  58. data/html/download.svg +253 -0
  59. data/html/favicon.ico +0 -0
  60. data/html/favicon.xcf +0 -0
  61. data/html/footer.html.erb +28 -0
  62. data/html/head.html.erb +4 -0
  63. data/html/header.html.erb +17 -0
  64. data/html/index.html +147 -0
  65. data/html/install.svg +636 -0
  66. data/html/logo.xcf +0 -0
  67. data/html/ranguba.css +250 -0
  68. data/html/tutorial.svg +559 -0
  69. data/lib/groonga.rb +90 -0
  70. data/lib/groonga/context.rb +184 -0
  71. data/lib/groonga/expression-builder.rb +285 -0
  72. data/lib/groonga/patricia-trie.rb +53 -0
  73. data/lib/groonga/record.rb +311 -0
  74. data/lib/groonga/schema.rb +1191 -0
  75. data/lib/groonga/view-record.rb +56 -0
  76. data/license/GPL +340 -0
  77. data/license/LGPL +504 -0
  78. data/license/RUBY +59 -0
  79. data/misc/grnop2ruby.rb +49 -0
  80. data/pkg-config.rb +333 -0
  81. data/test-unit/Rakefile +40 -0
  82. data/test-unit/TODO +5 -0
  83. data/test-unit/bin/testrb +5 -0
  84. data/test-unit/html/classic.html +15 -0
  85. data/test-unit/html/index.html +25 -0
  86. data/test-unit/html/index.html.ja +27 -0
  87. data/test-unit/lib/test/unit.rb +323 -0
  88. data/test-unit/lib/test/unit/assertionfailederror.rb +25 -0
  89. data/test-unit/lib/test/unit/assertions.rb +1230 -0
  90. data/test-unit/lib/test/unit/attribute.rb +125 -0
  91. data/test-unit/lib/test/unit/autorunner.rb +360 -0
  92. data/test-unit/lib/test/unit/collector.rb +36 -0
  93. data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
  94. data/test-unit/lib/test/unit/collector/dir.rb +108 -0
  95. data/test-unit/lib/test/unit/collector/load.rb +136 -0
  96. data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
  97. data/test-unit/lib/test/unit/color-scheme.rb +102 -0
  98. data/test-unit/lib/test/unit/color.rb +96 -0
  99. data/test-unit/lib/test/unit/diff.rb +724 -0
  100. data/test-unit/lib/test/unit/error.rb +130 -0
  101. data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
  102. data/test-unit/lib/test/unit/failure.rb +136 -0
  103. data/test-unit/lib/test/unit/fixture.rb +176 -0
  104. data/test-unit/lib/test/unit/notification.rb +129 -0
  105. data/test-unit/lib/test/unit/omission.rb +191 -0
  106. data/test-unit/lib/test/unit/pending.rb +150 -0
  107. data/test-unit/lib/test/unit/priority.rb +180 -0
  108. data/test-unit/lib/test/unit/runner/console.rb +52 -0
  109. data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
  110. data/test-unit/lib/test/unit/runner/tap.rb +8 -0
  111. data/test-unit/lib/test/unit/testcase.rb +476 -0
  112. data/test-unit/lib/test/unit/testresult.rb +89 -0
  113. data/test-unit/lib/test/unit/testsuite.rb +110 -0
  114. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
  115. data/test-unit/lib/test/unit/ui/console/testrunner.rb +466 -0
  116. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +63 -0
  117. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +92 -0
  118. data/test-unit/lib/test/unit/ui/testrunner.rb +28 -0
  119. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
  120. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  121. data/test-unit/lib/test/unit/util/backtracefilter.rb +41 -0
  122. data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
  123. data/test-unit/lib/test/unit/util/observable.rb +90 -0
  124. data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
  125. data/test-unit/lib/test/unit/version.rb +7 -0
  126. data/test-unit/sample/adder.rb +13 -0
  127. data/test-unit/sample/subtracter.rb +12 -0
  128. data/test-unit/sample/test_adder.rb +20 -0
  129. data/test-unit/sample/test_subtracter.rb +20 -0
  130. data/test-unit/sample/test_user.rb +23 -0
  131. data/test-unit/test/collector/test-descendant.rb +133 -0
  132. data/test-unit/test/collector/test-load.rb +348 -0
  133. data/test-unit/test/collector/test_dir.rb +406 -0
  134. data/test-unit/test/collector/test_objectspace.rb +100 -0
  135. data/test-unit/test/run-test.rb +15 -0
  136. data/test-unit/test/test-attribute.rb +86 -0
  137. data/test-unit/test/test-color-scheme.rb +67 -0
  138. data/test-unit/test/test-color.rb +47 -0
  139. data/test-unit/test/test-diff.rb +518 -0
  140. data/test-unit/test/test-emacs-runner.rb +60 -0
  141. data/test-unit/test/test-fixture.rb +287 -0
  142. data/test-unit/test/test-notification.rb +33 -0
  143. data/test-unit/test/test-omission.rb +81 -0
  144. data/test-unit/test/test-pending.rb +70 -0
  145. data/test-unit/test/test-priority.rb +119 -0
  146. data/test-unit/test/test-testcase.rb +544 -0
  147. data/test-unit/test/test_assertions.rb +1151 -0
  148. data/test-unit/test/test_error.rb +26 -0
  149. data/test-unit/test/test_failure.rb +33 -0
  150. data/test-unit/test/test_testresult.rb +113 -0
  151. data/test-unit/test/test_testsuite.rb +129 -0
  152. data/test-unit/test/testunit-test-util.rb +14 -0
  153. data/test-unit/test/ui/test_testrunmediator.rb +20 -0
  154. data/test-unit/test/util/test-method-owner-finder.rb +38 -0
  155. data/test-unit/test/util/test_backtracefilter.rb +41 -0
  156. data/test-unit/test/util/test_observable.rb +102 -0
  157. data/test-unit/test/util/test_procwrapper.rb +36 -0
  158. data/test/.gitignore +1 -0
  159. data/test/groonga-test-utils.rb +133 -0
  160. data/test/run-test.rb +58 -0
  161. data/test/test-array.rb +97 -0
  162. data/test/test-column.rb +316 -0
  163. data/test/test-context-select.rb +93 -0
  164. data/test/test-context.rb +73 -0
  165. data/test/test-database.rb +113 -0
  166. data/test/test-encoding.rb +33 -0
  167. data/test/test-exception.rb +93 -0
  168. data/test/test-expression-builder.rb +156 -0
  169. data/test/test-expression.rb +134 -0
  170. data/test/test-fix-size-column.rb +65 -0
  171. data/test/test-gqtp.rb +72 -0
  172. data/test/test-hash.rb +312 -0
  173. data/test/test-index-column.rb +81 -0
  174. data/test/test-logger.rb +37 -0
  175. data/test/test-patricia-trie.rb +189 -0
  176. data/test/test-procedure.rb +37 -0
  177. data/test/test-query.rb +22 -0
  178. data/test/test-record.rb +279 -0
  179. data/test/test-remote.rb +54 -0
  180. data/test/test-schema-view.rb +90 -0
  181. data/test/test-schema.rb +459 -0
  182. data/test/test-snippet.rb +130 -0
  183. data/test/test-table-cursor.rb +153 -0
  184. data/test/test-table-offset-and-limit.rb +102 -0
  185. data/test/test-table-select-normalize.rb +53 -0
  186. data/test/test-table-select.rb +150 -0
  187. data/test/test-table.rb +690 -0
  188. data/test/test-type.rb +71 -0
  189. data/test/test-variable-size-column.rb +98 -0
  190. data/test/test-variable.rb +28 -0
  191. data/test/test-vector-column.rb +76 -0
  192. data/test/test-version.rb +31 -0
  193. data/test/test-view.rb +72 -0
  194. data/text/TUTORIAL.ja.rdoc +392 -0
  195. data/text/expression.rdoc +284 -0
  196. data/vendor/local/bin/grntest.exe +0 -0
  197. data/vendor/local/bin/groonga.exe +0 -0
  198. data/vendor/local/bin/libgroonga.dll +0 -0
  199. data/vendor/local/bin/libmecab.dll +0 -0
  200. data/vendor/local/include/groonga.h +2285 -0
  201. data/vendor/local/lib/libgroonga.lib +0 -0
  202. metadata +280 -0
data/AUTHORS ADDED
@@ -0,0 +1,5 @@
1
+ Kouhei Sutou <kou@clear-code.com>
2
+ Tasuku SUENAGA <a@razil.jp>
3
+ daijiro <morita@razil.jp>
4
+ Yuto HAYAMIZU <y.hayamizu@gmail.com>
5
+ SHIDARA Yoji <dara@shidara.net>
data/NEWS.ja.rdoc ADDED
@@ -0,0 +1,114 @@
1
+ = お知らせ
2
+
3
+ == 0.9.1: 2010-02-09
4
+
5
+ * groonga 0.1.6対応
6
+
7
+ == 0.9.0: 2010-02-09
8
+
9
+ * groonga 0.1.5対応
10
+ * APIの追加
11
+ * Groonga::Object#context
12
+ * Groonga::Record#n_sub_records
13
+ * Groonga::Context#send
14
+ * Groonga::Context#receive
15
+ * Groonga::PatriciaTrie#prefix_search [Tasuku SUENAGA]
16
+ * Groonga::Object#path [Ryo Onodera]
17
+ * Groonga::Object#lock [Tasuku SUENAGA]
18
+ * Groonga::Object#unlock [Tasuku SUENAGA]
19
+ * Groonga::Object#locked? [Tasuku SUENAGA]
20
+ * Groonga::Object#temporary?
21
+ * Groonga::Object#persistent?
22
+ * Groonga::ObjectClosed
23
+ * Groonga::Context.[]
24
+ * Groonga::Table#column_value
25
+ * Groonga::Table#set_column_value
26
+ * APIの変更
27
+ * Groonga::Table#select, Groonga::Column#select
28
+ * Groonga::Expressionも受け付けるようになった
29
+ * grn式のシンタックスを指定する:syntaxオプションの追加
30
+ * Groonga::Table#open_cursor
31
+ * 開始位置を指定する:offsetオプションの追加
32
+ * 最大レコード数を指定する:limitオプションの追加
33
+ * Groonga::Expression.parseの引数を変更
34
+ * (nil (default) -> :column) -> (nil (default) -> :query)
35
+ * :column -> 廃止
36
+ * :table -> :query
37
+ * :table_query -> :query
38
+ * :expression -> :script
39
+ * :language -> :script
40
+ * Groonga::Table#define_column, Groonga::Table#define_index_column
41
+ * 永続テーブルをデフォルトにした
42
+ * Groonga::Table#[]をGroonga::Table#valueに変更
43
+ * Groonga::Table#[]=をGroonga::Table#set_valueに変更
44
+ * Groonga::Table#findをGroonga::Table#[]に変更
45
+ * Groonga::Table#findは非推奨
46
+ * Groonga::Table#[]=を削除
47
+ * Groonga::TableKeySupport#[]=はGroonga::TableKeySupport#addの別名
48
+ * Groonga::Recordで存在しないカラムにアクセスしたときの例外を
49
+ Groonga::InvalidArgumentからGroonga::NoSuchColumnに変更
50
+ * バグ修正
51
+ * スキーマにコンテキストが伝搬されない問題の修正 [dara]
52
+ * Groonga::PatriciaTrie#tag_keysが最後のテキストを返さない問題の修正
53
+ [Ryo Onodera]
54
+ * extconf.rbにデバッグモードでビルドする--with-debugオプションを追加
55
+ * Ruby 1.9.1でextconf.rbが失敗する問題の修正
56
+
57
+ === 感謝
58
+
59
+ * dara
60
+ * Ryo Onodera
61
+ * Tasuku SUENAGA
62
+
63
+ == 0.0.7: 2009-10-02
64
+
65
+ * groonga 0.1.4対応
66
+ * APIの追加
67
+ * Groonga::PatriciaTrie#scan
68
+ * Groonga::PatriciaTrie#tag_keys
69
+ * Groonga::Expression#snippet
70
+ * Groonga::Object#append
71
+ * Groonga::Object#prepend
72
+
73
+ == 0.0.6: 2009-07-31
74
+
75
+ * groonga 0.1.1対応
76
+ * ドキュメントの修正 [id:mat_aki]
77
+ * Groonga::Table#selectでのg式対応
78
+ * APIの追加
79
+ * Groonga::Table#union!
80
+ * Groonga::Table#intersect!
81
+ * Groonga::Table#differene!
82
+ * Groonga::Table#merge!
83
+ * tar.gzも提供 [id:m_seki]
84
+ * メモリリークの修正
85
+
86
+ == 0.0.3: 2009-07-18
87
+
88
+ * [#26145] Groonga::TableKeySupport#has_key?の追加 [Tasuku SUENAGA]
89
+ * [#26146] カラム名が存在しない場合はGroonga::Record#[]が例外
90
+ をあげるように変更 [Tasuku SUENAGA]
91
+ * 32ビット環境をサポート [niku]
92
+ * N-gramインデックスサーチのテストを追加 [dara]
93
+ * APIの追加
94
+ * Groonga::Record#incemrent!
95
+ * Groonga::Record#decemrent!
96
+ * Groonga::Record#lock
97
+ * Groonga::Table#lock
98
+ * Groonga::Schema: スキーマ定義用DSL
99
+ * Groonga::Expression
100
+
101
+ == 0.0.2: 2009-06-04
102
+
103
+ * groonga 0.0.8対応 [mori]
104
+ * 性能向上: キー、値、ドメイン、レンジをキャッシュ
105
+ * API改良
106
+ * ドキュメントの追加
107
+ * Ruby 1.9対応
108
+ * バグ修正:
109
+ * インストール処理の修正 [Tasuku SUENAGA]
110
+ * メモリリーク修正
111
+
112
+ == 0.0.1: 2009-04-30
113
+
114
+ * 最初のリリース!
data/NEWS.rdoc ADDED
@@ -0,0 +1,116 @@
1
+ = NEWS
2
+
3
+ == 0.9.1: 2010-02-09
4
+
5
+ * Supported groonga 0.1.6
6
+
7
+ == 0.9.0: 2010-02-09
8
+
9
+ * Supported groonga 0.1.5
10
+ * Added API
11
+ * Groonga::Object#context
12
+ * Groonga::Record#n_sub_records
13
+ * Groonga::Context#send
14
+ * Groonga::Context#receive
15
+ * Groonga::PatriciaTrie#prefix_search [Tasuku SUENAGA]
16
+ * Groonga::Object#path [Ryo Onodera]
17
+ * Groonga::Object#lock [Tasuku SUENAGA]
18
+ * Groonga::Object#unlock [Tasuku SUENAGA]
19
+ * Groonga::Object#locked? [Tasuku SUENAGA]
20
+ * Groonga::Object#temporary?
21
+ * Groonga::Object#persistent?
22
+ * Groonga::ObjectClosed
23
+ * Groonga::Context.[]
24
+ * Groonga::Table#column_value
25
+ * Groonga::Table#set_column_value
26
+ * Changed API
27
+ * Groonga::Table#select, Groonga::Column#select
28
+ * They also accept Groonga::Expression
29
+ * Added :syntax option that specifies grn expression syntax
30
+ * Groonga::Table#open_cursor
31
+ * Added :offset option that specifies offset.
32
+ * Added :limit option that specifies max number of records.
33
+ * Changed Groonga::Expression.parse options:
34
+ * (nil (default) -> :column) -> (nil (default) -> :query)
35
+ * :column -> removed
36
+ * :table -> :query
37
+ * :table_query -> :query
38
+ * :expression -> :script
39
+ * :language -> :script
40
+ * Groonga::Table#define_column, Groonga::Table#define_index_column
41
+ * Defined column becomes persistent table by default
42
+ * Groonga::Table#[] -> Groonga::Table#value
43
+ * Groonga::Table#[]= -> Groonga::Table#set_value
44
+ * Groonga::Table#find -> Groonga::Table#[]
45
+ * Groonga::Table#find -> obsolete
46
+ * Groonga::Table#[]= -> removed
47
+ * Groonga::TableKeySupport#[]= is alias of Groonga::TableKeySupport#add
48
+ * Changed exception class to Groonga::NoSuchColumn from
49
+ Groonga::InvalidArgument when Groonga::Record accesses nonexistent
50
+ a column.
51
+ * Bug fixes
52
+ * Fixed a bug that context isn't passed to schema [dara]
53
+ * Fixed a bug that Groonga::PatriciaTrie#tag_keys doesn't return
54
+ that last text.
55
+ [Ryo Onodera]
56
+ * Added --with-debug option to extconf.rb for debug build.
57
+ * Fixed a bug that Ruby 1.9.1 may fail extconf.rb.
58
+
59
+ === Thanks
60
+
61
+ * dara
62
+ * Ryo Onodera
63
+ * Tasuku SUENAGA
64
+
65
+ == 0.0.7: 2009-10-02
66
+
67
+ * Supported groonga 0.1.4
68
+ * Added API
69
+ * Groonga::PatriciaTrie#scan
70
+ * Groonga::PatriciaTrie#tag_keys
71
+ * Groonga::Expression#snippet
72
+ * Groonga::Object#append
73
+ * Groonga::Object#prepend
74
+
75
+ == 0.0.6: 2009-07-31
76
+
77
+ * Supported groonga 0.1.1.
78
+ * Fixed documents [id:mat_aki]
79
+ * Supported groonga expression for searching.
80
+ * Added API
81
+ * Groonga::Table#union!
82
+ * Groonga::Table#intersect!
83
+ * Groonga::Table#differene!
84
+ * Groonga::Table#merge!
85
+ * Provided tar.gz [id:m_seki]
86
+ * Fixed memory leaks
87
+
88
+ == 0.0.3: 2009-07-18
89
+
90
+ * [#26145] Added Groonga::TableKeySupport#has_key? [Tasuku SUENAGA]
91
+ * [#26146] Groonga::Record#[] raises an exception for nonexistent
92
+ column name. [Tasuku SUENAGA]
93
+ * Supported 32bit environment [niku]
94
+ * Added a test for N-gram index search [dara]
95
+ * Added APIs
96
+ * Groonga::Record#incemrent!
97
+ * Groonga::Record#decemrent!
98
+ * Groonga::Record#lock
99
+ * Groonga::Table#lock
100
+ * Groonga::Schema: A DSL for schema definition
101
+ * Groonga::Expression
102
+
103
+ == 0.0.2: 2009-06-04
104
+
105
+ * Supported groonga 0.0.8 [mori]
106
+ * Improved preformance: cache key, value, domain and range
107
+ * Improved API
108
+ * Added documents
109
+ * Supported Ruby 1.9
110
+ * Bug fixes:
111
+ * Fixed install process [Tasuku SUENAGA]
112
+ * Fixed memory leaks
113
+
114
+ == 0.0.1: 2009-04-30
115
+
116
+ * Initial release!
data/README.ja.rdoc ADDED
@@ -0,0 +1,65 @@
1
+ = はじめに
2
+
3
+ == 名前
4
+
5
+ Ruby/groonga
6
+
7
+ == 説明
8
+
9
+ 全文検索機能とカラムストア機能を提供するgroongaのRubyバイン
10
+ ディングです。
11
+
12
+ groongaのいわゆるDB-API層をRubyから使うための拡張ライブラリで
13
+ す。groongaのAPIをそのままRubyレベルに提供するのではなく、
14
+ Rubyらしく読み書きしやすいAPIとして提供します。高速・高機能な
15
+ groongaをRubyらしい書き方で利用できます。
16
+
17
+ groongaに関する情報は以下を参照して下さい。
18
+
19
+ * groonga: http://groonga.org/
20
+
21
+ == 作者
22
+
23
+ Kouhei Sutou:: <tt><kou@clear-code.com></tt>
24
+ Tasuku SUENAGA:: <tt><a@razil.jp></tt>
25
+ daijiro:: <tt><morita@razil.jp></tt>
26
+ Yuto HAYAMIZU:: <tt><y.hayamizu@gmail.com></tt>
27
+ SHIDARA Yoji:: <tt><dara@shidara.net></tt>
28
+
29
+ == ライセンス
30
+
31
+ LGPL 2.1です。詳しくはlicense/LGPLを見てください。
32
+
33
+ pkg-config.rbはrcairoに付属しているもので、これはRubyライセ
34
+ ンスです。詳しくはlicense/RUBYとlicense/GPLを見てください。
35
+
36
+ == 依存ソフトウェア
37
+
38
+ * Ruby >= 1.8 (1.9.1対応)
39
+ * groonga >= 0.1.4
40
+
41
+ == インストール
42
+
43
+ % sudo gem install groonga
44
+
45
+ == ドキュメント
46
+
47
+ http://groonga.rubyforge.org/groonga/
48
+
49
+ == メーリングリスト
50
+
51
+ 質問、要望、バグ報告などはgroongaのMLにお願いします。
52
+
53
+ http://lists.sourceforge.jp/mailman/listinfo/groonga-dev
54
+
55
+ == 感謝
56
+
57
+ * 森さん: 最新groonga対応パッチをくれました。
58
+ * グニャラくん: バグレポートしてくれました。
59
+ * にくさん: バグレポートしてくれました。
60
+ * daraさん:
61
+ * テストを書いてくれました。
62
+ * バグを直してくれました。
63
+ * id:mat_akiさん: チュートリアルのバグを教えてくれました。
64
+ * @yune_kotomi: バグレポートしてくれました。
65
+ * 咳さん: バグレポートしてくれました。
data/README.rdoc ADDED
@@ -0,0 +1,66 @@
1
+ = README
2
+
3
+ == Name
4
+
5
+ Ruby/groonga
6
+
7
+ == Description
8
+
9
+ Ruby bindings for groonga that provides full text search and
10
+ column store features.
11
+
12
+ Ruby/groonga is a extension library to use groonga's DB-API
13
+ layer. Ruby/groonga provides Rubyish readable and writable
14
+ API. You can use groonga's first and highly functional
15
+ features from Ruby.
16
+
17
+ See the following URL about groonga.
18
+
19
+ * groonga: http://groonga.org/
20
+
21
+ == Authors
22
+
23
+ Kouhei Sutou:: <tt><kou@clear-code.com></tt>
24
+ Tasuku SUENAGA:: <tt><a@razil.jp></tt>
25
+ daijiro:: <tt><morita@razil.jp></tt>
26
+ Yuto HAYAMIZU:: <tt><y.hayamizu@gmail.com></tt>
27
+ SHIDARA Yoji:: <tt><dara@shidara.net></tt>
28
+
29
+ == License
30
+
31
+ LGPL 2.1. See license/LGPL for details.
32
+
33
+ pkg-config.rb is a library that is bundled with rcairo. It's
34
+ distributed under Ruby license. See license/RUBY and
35
+ license/GPL for details.
36
+
37
+ == Dependencies
38
+
39
+ * Ruby >= 1.8 (including 1.9.1)
40
+ * groonga >= 0.1.4
41
+
42
+ == Install
43
+
44
+ % sudo gem install groonga
45
+
46
+ == Documents
47
+
48
+ Japanese only. Sorry.
49
+
50
+ http://groonga.rubyforge.org/groonga/
51
+
52
+ == Mailing list
53
+
54
+ http://rubyforge.org/mailman/listinfo/groonga-users-en
55
+
56
+ == Thanks
57
+
58
+ * mori: sent patches to support the latest groonga.
59
+ * Tasuku SUENAGA: sent bug reports.
60
+ * niku: sent bug reports.
61
+ * dara:
62
+ * wrote tests.
63
+ * fixed bugs.
64
+ * id:mat_aki: sent bug reports.
65
+ * @yune_kotomi: sent a bug report.
66
+ * m_seki: sent bug reports.
data/Rakefile ADDED
@@ -0,0 +1,217 @@
1
+ # -*- coding: utf-8; mode: ruby -*-
2
+ #
3
+ # Copyright (C) 2009-2010 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
+ require 'English'
19
+
20
+ require 'find'
21
+ require 'fileutils'
22
+ require 'pathname'
23
+ require 'erb'
24
+ require 'rubygems'
25
+ gem 'rdoc'
26
+ require 'hoe'
27
+
28
+ ENV["NODOT"] = "yes"
29
+
30
+ base_dir = File.join(File.dirname(__FILE__))
31
+ truncate_base_dir = Proc.new do |x|
32
+ x.gsub(/^#{Regexp.escape(base_dir + File::SEPARATOR)}/, '')
33
+ end
34
+
35
+ groonga_ext_dir = File.join(base_dir, 'ext')
36
+ groonga_lib_dir = File.join(base_dir, 'lib')
37
+ $LOAD_PATH.unshift(groonga_ext_dir)
38
+ $LOAD_PATH.unshift(groonga_lib_dir)
39
+ ENV["RUBYLIB"] = "#{groonga_lib_dir}:#{groonga_ext_dir}:#{ENV['RUBYLIB']}"
40
+
41
+ def guess_version
42
+ require 'groonga'
43
+ Groonga.bindings_version
44
+ end
45
+
46
+ manifest = File.join(base_dir, "Manifest.txt")
47
+ manifest_contents = []
48
+ base_dir_included_components = %w(AUTHORS Rakefile
49
+ README.rdoc README.ja.rdoc
50
+ NEWS.rdoc NEWS.ja.rdoc
51
+ extconf.rb pkg-config.rb)
52
+ excluded_components = %w(.cvsignore .gdb_history CVS depend Makefile doc pkg
53
+ .svn .git doc vendor data .test-result)
54
+ excluded_suffixes = %w(.png .ps .pdf .o .so .a .txt .~)
55
+ Find.find(base_dir) do |target|
56
+ target = truncate_base_dir[target]
57
+ components = target.split(File::SEPARATOR)
58
+ if components.size == 1 and !File.directory?(target)
59
+ next unless base_dir_included_components.include?(components[0])
60
+ end
61
+ Find.prune if (excluded_components - components) != excluded_components
62
+ next if excluded_suffixes.include?(File.extname(target))
63
+ manifest_contents << target if File.file?(target)
64
+ end
65
+
66
+ platform = ENV["FORCE_PLATFORM"]
67
+ groonga_win32_files = []
68
+ if /mswin32/ =~ platform.to_s
69
+ groonga_win32_files += ["ext/groonga.so", "ext/libruby-groonga.a"]
70
+
71
+ groonga_dir = File.join(base_dir, "vendor", "local")
72
+ Find.find(groonga_dir) do |file|
73
+ groonga_win32_files << truncate_base_dir[file]
74
+ end
75
+ end
76
+ manifest_contents += groonga_win32_files
77
+
78
+ File.open(manifest, "w") do |f|
79
+ f.puts manifest_contents.sort.join("\n")
80
+ end
81
+
82
+ # For Hoe's no user friendly default behavior. :<
83
+ File.open("README.txt", "w") {|file| file << "= Dummy README\n== XXX\n"}
84
+ FileUtils.cp("NEWS.rdoc", "History.txt")
85
+ at_exit do
86
+ FileUtils.rm_f("README.txt")
87
+ FileUtils.rm_f("History.txt")
88
+ FileUtils.rm_f(manifest)
89
+ end
90
+
91
+ def cleanup_white_space(entry)
92
+ entry.gsub(/(\A\n+|\n+\z)/, '') + "\n"
93
+ end
94
+
95
+ ENV["VERSION"] ||= guess_version
96
+ version = ENV["VERSION"]
97
+ project = nil
98
+ Hoe.spec('rroonga') do |_project|
99
+ Hoe::Test::SUPPORTED_TEST_FRAMEWORKS[:testunit2] = "test/run-test.rb"
100
+ project = _project
101
+ project.version = version
102
+ project.rubyforge_name = 'groonga'
103
+ authors = File.join(base_dir, "AUTHORS")
104
+ project.author = File.readlines(authors).collect do |line|
105
+ if /\s*<[^<>]*>$/ =~ line
106
+ $PREMATCH
107
+ else
108
+ nil
109
+ end
110
+ end.compact
111
+ project.email = ['groonga-users-en@rubyforge.org',
112
+ 'groonga-dev@lists.sourceforge.jp']
113
+ project.url = 'http://groonga.rubyforge.org/'
114
+ project.testlib = :testunit2
115
+ project.test_globs = ["test/run-test.rb"]
116
+ project.spec_extras = {
117
+ :extensions => ['extconf.rb'],
118
+ :require_paths => ["lib", "ext"],
119
+ :extra_rdoc_files => Dir.glob("**/*.rdoc"),
120
+ }
121
+ project.readme_file = "README.ja.rdoc"
122
+
123
+ news_of_current_release = File.read("NEWS.rdoc").split(/^==\s.*$/)[1]
124
+ project.changes = cleanup_white_space(news_of_current_release)
125
+
126
+ entries = File.read("README.rdoc").split(/^==\s(.*)$/)
127
+ description = cleanup_white_space(entries[entries.index("Description") + 1])
128
+ project.summary, project.description, = description.split(/\n\n+/, 3)
129
+
130
+ project.remote_rdoc_dir = "rroonga"
131
+ end
132
+
133
+ project.spec.dependencies.delete_if {|dependency| dependency.name == "hoe"}
134
+ project.spec.platform = platform || project.spec.platform
135
+
136
+ if /mswin32/ =~ project.spec.platform.to_s
137
+ project.spec.extensions = []
138
+ end
139
+
140
+ ObjectSpace.each_object(Rake::RDocTask) do |rdoc_task|
141
+ options = rdoc_task.options
142
+ t_option_index = options.index("--title") || options.index("-t")
143
+ rdoc_task.options[t_option_index, 2] = nil
144
+ rdoc_task.title = "rroonga - #{version}"
145
+
146
+ rdoc_task.rdoc_files = ["ext/rb-groonga.c"] + Dir.glob("ext/rb-grn-*.c")
147
+ rdoc_task.rdoc_files += Dir.glob("lib/**/*.rb")
148
+ rdoc_task.rdoc_files += Dir.glob("**/*.rdoc")
149
+ end
150
+
151
+ task :publish_docs => [:prepare_docs_for_publishing]
152
+
153
+
154
+ include ERB::Util
155
+
156
+ def apply_template(file, head, header, footer)
157
+ content = File.read(file)
158
+ content = content.sub(/lang="en"/, 'lang="ja"')
159
+
160
+ title = nil
161
+ content = content.sub(/<title>(.+?)<\/title>/) do
162
+ title = $1
163
+ head.result(binding)
164
+ end
165
+
166
+ content = content.sub(/<body(?:.*?)>/) do |body_start|
167
+ "#{body_start}\n#{header.result(binding)}\n"
168
+ end
169
+
170
+ content = content.sub(/<\/body/) do |body_end|
171
+ "\n#{footer.result(binding)}\n#{body_end}"
172
+ end
173
+
174
+ File.open(file, "w") do |file|
175
+ file.print(content)
176
+ end
177
+ end
178
+
179
+ def erb_template(name)
180
+ file = File.join("html", "#{name}.html.erb")
181
+ template = File.read(file)
182
+ erb = ERB.new(template, nil, "-")
183
+ erb.filename = file
184
+ erb
185
+ end
186
+
187
+ task :prepare_docs_for_publishing do
188
+ head = erb_template("head")
189
+ header = erb_template("header")
190
+ footer = erb_template("footer")
191
+ Find.find("doc") do |file|
192
+ if /\.html\z/ =~ file and /_(?:c|rb)\.html\z/ !~ file
193
+ apply_template(file, head, header, footer)
194
+ end
195
+ end
196
+ end
197
+
198
+ task :publish_html do
199
+ config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
200
+ host = "#{config["username"]}@rubyforge.org"
201
+
202
+ rsync_args = "-av --exclude '*.erb' --exclude '*.svg' --exclude .svn"
203
+ remote_dir = "/var/www/gforge-projects/#{project.rubyforge_name}/"
204
+ sh "rsync #{rsync_args} html/ #{host}:#{remote_dir}"
205
+ end
206
+
207
+ task :tag do
208
+ repository = "svn+ssh://rubyforge.org/var/svn/groonga/rroonga"
209
+ sh("svn cp -m 'release #{version}!!!' " +
210
+ "#{repository}/trunk #{repository}/tags/#{version}")
211
+ end
212
+
213
+ # fix Hoe's incorrect guess.
214
+ project.spec.executables.clear
215
+ # project.lib_files = project.spec.files.grep(%r|^src/lib/|)
216
+
217
+ task(:release).prerequisites.reject! {|name| name == "clean"}