rroonga 2.0.8 → 2.1.0
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.
- data/README.textile +2 -2
- data/bin/groonga-index-dump +47 -0
- data/doc/text/news.textile +733 -0
- data/doc/text/tutorial.textile +535 -0
- data/example/bookmark.rb +1 -1
- data/ext/groonga/rb-grn-database.c +21 -24
- data/ext/groonga/rb-grn-double-array-trie.c +50 -58
- data/ext/groonga/rb-grn-exception.c +18 -1
- data/ext/groonga/rb-grn-hash.c +18 -3
- data/ext/groonga/rb-grn-index-column.c +50 -2
- data/ext/groonga/rb-grn-normalizer.c +83 -0
- data/ext/groonga/rb-grn-object.c +18 -14
- data/ext/groonga/rb-grn-patricia-trie.c +17 -2
- data/ext/groonga/rb-grn-query-logger.c +263 -0
- data/ext/groonga/rb-grn-snippet.c +6 -0
- data/ext/groonga/rb-grn-table-key-support.c +204 -13
- data/ext/groonga/rb-grn-table.c +124 -46
- data/ext/groonga/rb-grn.h +14 -3
- data/ext/groonga/rb-groonga.c +2 -0
- data/lib/groonga/database.rb +7 -0
- data/lib/groonga/dumper.rb +21 -2
- data/lib/groonga/index-column.rb +170 -0
- data/lib/groonga/query-logger.rb +129 -0
- data/lib/groonga/record.rb +32 -8
- data/lib/groonga/schema.rb +231 -288
- data/lib/groonga.rb +2 -1
- data/rroonga-build.rb +2 -2
- data/rroonga.gemspec +11 -7
- data/test/groonga-test-utils.rb +18 -6
- data/test/test-hash.rb +49 -20
- data/test/test-index-cursor.rb +4 -4
- data/{Gemfile → test/test-normalizer.rb} +9 -5
- data/test/test-pagination.rb +1 -1
- data/test/test-patricia-trie.rb +8 -0
- data/test/test-schema.rb +16 -13
- data/test/test-snippet.rb +5 -0
- data/test/test-table.rb +24 -12
- data/test/test-view.rb +0 -1
- metadata +154 -136
- data/AUTHORS +0 -5
- data/Rakefile +0 -203
- data/bin/groonga-query-log-extract +0 -117
metadata
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rroonga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- Kouhei Sutou
|
9
|
+
- Tasuku SUENAGA
|
10
|
+
- daijiro
|
11
|
+
- Yuto HAYAMIZU
|
12
|
+
- SHIDARA Yoji
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
16
|
+
date: 2012-12-28 00:00:00.000000000 Z
|
13
17
|
dependencies:
|
14
18
|
- !ruby/object:Gem::Dependency
|
15
19
|
name: pkg-config
|
@@ -160,17 +164,17 @@ dependencies:
|
|
160
164
|
requirement: !ruby/object:Gem::Requirement
|
161
165
|
none: false
|
162
166
|
requirements:
|
163
|
-
- - '
|
167
|
+
- - ! '>='
|
164
168
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0
|
169
|
+
version: '0'
|
166
170
|
type: :development
|
167
171
|
prerelease: false
|
168
172
|
version_requirements: !ruby/object:Gem::Requirement
|
169
173
|
none: false
|
170
174
|
requirements:
|
171
|
-
- - '
|
175
|
+
- - ! '>='
|
172
176
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0
|
177
|
+
version: '0'
|
174
178
|
- !ruby/object:Gem::Dependency
|
175
179
|
name: RedCloth
|
176
180
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,142 +199,149 @@ description: ! 'rroonga is an extension library to use groonga''s DB-API
|
|
195
199
|
|
196
200
|
functional features from Ruby with Rubyish form.'
|
197
201
|
email:
|
198
|
-
-
|
202
|
+
- kou@clear-code.com
|
199
203
|
- a@razil.jp
|
204
|
+
- morita@razil.jp
|
205
|
+
- y.hayamizu@gmail.com
|
206
|
+
- dara@shidara.net
|
200
207
|
executables:
|
201
208
|
- grntest-log-analyze
|
202
|
-
- groonga-
|
209
|
+
- groonga-index-dump
|
203
210
|
- grndump
|
204
211
|
extensions:
|
205
212
|
- ext/groonga/extconf.rb
|
206
213
|
extra_rdoc_files:
|
207
214
|
- README.textile
|
208
215
|
files:
|
209
|
-
-
|
210
|
-
-
|
211
|
-
- Rakefile
|
212
|
-
- Gemfile
|
216
|
+
- doc/text/tutorial.textile
|
217
|
+
- doc/text/news.textile
|
213
218
|
- rroonga.gemspec
|
214
219
|
- rroonga-build.rb
|
215
220
|
- extconf.rb
|
216
|
-
- lib/groonga.rb
|
217
|
-
- lib/groonga/geo-point.rb
|
218
|
-
- lib/groonga/record.rb
|
221
|
+
- lib/groonga/posting.rb
|
219
222
|
- lib/groonga/view-record.rb
|
223
|
+
- lib/groonga/index-column.rb
|
224
|
+
- lib/groonga/expression-builder.rb
|
225
|
+
- lib/groonga/record.rb
|
226
|
+
- lib/groonga/dumper.rb
|
227
|
+
- lib/groonga/database.rb
|
228
|
+
- lib/groonga/expression-builder-19.rb
|
229
|
+
- lib/groonga/query-logger.rb
|
230
|
+
- lib/groonga/patricia-trie.rb
|
220
231
|
- lib/groonga/context.rb
|
221
232
|
- lib/groonga/grntest-log.rb
|
233
|
+
- lib/groonga/geo-point.rb
|
222
234
|
- lib/groonga/pagination.rb
|
223
|
-
- lib/groonga/database.rb
|
224
|
-
- lib/groonga/schema.rb
|
225
235
|
- lib/groonga/command.rb
|
226
|
-
- lib/groonga/
|
227
|
-
- lib/groonga
|
228
|
-
- lib/groonga/expression-builder.rb
|
229
|
-
- lib/groonga/dumper.rb
|
230
|
-
- lib/groonga/expression-builder-19.rb
|
231
|
-
- benchmark/create-wikipedia-database.rb
|
232
|
-
- benchmark/common.rb
|
233
|
-
- benchmark/write-many-small-items.rb
|
236
|
+
- lib/groonga/schema.rb
|
237
|
+
- lib/groonga.rb
|
234
238
|
- benchmark/read-write-many-small-items.rb
|
235
|
-
- benchmark/
|
239
|
+
- benchmark/write-many-small-items.rb
|
240
|
+
- benchmark/common.rb
|
241
|
+
- benchmark/create-wikipedia-database.rb
|
236
242
|
- benchmark/repeat-load.rb
|
243
|
+
- benchmark/select.rb
|
237
244
|
- misc/grnop2ruby.rb
|
238
|
-
- example/index-html.rb
|
239
245
|
- example/bookmark.rb
|
240
|
-
-
|
241
|
-
- ext/groonga/rb-grn-
|
242
|
-
- ext/groonga/rb-grn-
|
243
|
-
- ext/groonga/rb-grn-
|
244
|
-
- ext/groonga/rb-grn-variable.c
|
246
|
+
- example/index-html.rb
|
247
|
+
- ext/groonga/rb-grn-encoding-support.c
|
248
|
+
- ext/groonga/rb-grn-patricia-trie.c
|
249
|
+
- ext/groonga/rb-grn-geo-point.c
|
245
250
|
- ext/groonga/rb-grn-view.c
|
246
|
-
- ext/groonga/rb-grn-
|
251
|
+
- ext/groonga/rb-grn-snippet.c
|
252
|
+
- ext/groonga/rb-grn-double-array-trie-cursor.c
|
247
253
|
- ext/groonga/rb-grn-fix-size-column.c
|
248
|
-
- ext/groonga/rb-grn-
|
254
|
+
- ext/groonga/rb-grn-view-accessor.c
|
255
|
+
- ext/groonga/rb-grn-accessor.c
|
249
256
|
- ext/groonga/rb-grn-plugin.c
|
250
|
-
- ext/groonga/rb-grn-hash.c
|
251
|
-
- ext/groonga/rb-grn-variable-size-column.c
|
252
|
-
- ext/groonga/rb-grn-index-column.c
|
253
|
-
- ext/groonga/rb-grn-operator.c
|
254
|
-
- ext/groonga/rb-grn-table-key-support.c
|
255
|
-
- ext/groonga/rb-grn-patricia-trie.c
|
256
|
-
- ext/groonga/rb-grn-table-cursor.c
|
257
|
-
- ext/groonga/rb-grn-object.c
|
258
257
|
- ext/groonga/rb-grn-table.c
|
259
|
-
- ext/groonga/rb-grn-
|
260
|
-
- ext/groonga/rb-grn-
|
261
|
-
- ext/groonga/rb-grn-
|
258
|
+
- ext/groonga/rb-grn-operator.c
|
259
|
+
- ext/groonga/rb-grn-database.c
|
260
|
+
- ext/groonga/rb-grn-variable-size-column.c
|
262
261
|
- ext/groonga/rb-grn-view-record.c
|
262
|
+
- ext/groonga/rb-grn-query-logger.c
|
263
|
+
- ext/groonga/rb-grn-record.c
|
264
|
+
- ext/groonga/rb-grn-context.c
|
265
|
+
- ext/groonga/rb-grn-exception.c
|
266
|
+
- ext/groonga/rb-grn-table-key-support.c
|
267
|
+
- ext/groonga/rb-grn-posting.c
|
268
|
+
- ext/groonga/rb-grn-hash-cursor.c
|
269
|
+
- ext/groonga/rb-grn-expression-builder.c
|
270
|
+
- ext/groonga/rb-grn-expression.c
|
271
|
+
- ext/groonga/rb-grn-view-cursor.c
|
272
|
+
- ext/groonga/rb-grn-array-cursor.c
|
273
|
+
- ext/groonga/rb-grn-encoding.c
|
274
|
+
- ext/groonga/rb-grn-utils.c
|
275
|
+
- ext/groonga/rb-groonga.c
|
263
276
|
- ext/groonga/rb-grn-patricia-trie-cursor.c
|
264
277
|
- ext/groonga/rb-grn-array.c
|
265
|
-
- ext/groonga/rb-grn-
|
266
|
-
- ext/groonga/rb-grn-
|
278
|
+
- ext/groonga/rb-grn-normalizer.c
|
279
|
+
- ext/groonga/rb-grn-object.c
|
280
|
+
- ext/groonga/rb-grn-type.c
|
267
281
|
- ext/groonga/rb-grn-column.c
|
268
282
|
- ext/groonga/rb-grn-index-cursor.c
|
269
|
-
- ext/groonga/rb-grn-
|
270
|
-
- ext/groonga/rb-grn-accessor.c
|
271
|
-
- ext/groonga/rb-grn-double-array-trie-cursor.c
|
272
|
-
- ext/groonga/rb-grn-posting.c
|
273
|
-
- ext/groonga/rb-groonga.c
|
274
|
-
- ext/groonga/rb-grn-geo-point.c
|
275
|
-
- ext/groonga/rb-grn-array-cursor.c
|
276
|
-
- ext/groonga/rb-grn-utils.c
|
283
|
+
- ext/groonga/rb-grn-hash.c
|
277
284
|
- ext/groonga/rb-grn-logger.c
|
278
|
-
- ext/groonga/rb-grn-
|
279
|
-
- ext/groonga/rb-grn-
|
280
|
-
- ext/groonga/rb-grn-
|
285
|
+
- ext/groonga/rb-grn-variable.c
|
286
|
+
- ext/groonga/rb-grn-index-column.c
|
287
|
+
- ext/groonga/rb-grn-table-cursor-key-support.c
|
281
288
|
- ext/groonga/rb-grn-double-array-trie.c
|
289
|
+
- ext/groonga/rb-grn-procedure.c
|
290
|
+
- ext/groonga/rb-grn-table-cursor.c
|
282
291
|
- ext/groonga/rb-grn.h
|
283
292
|
- ext/groonga/extconf.rb
|
284
293
|
- ext/groonga/groonga.def
|
285
|
-
-
|
286
|
-
- test/test-
|
287
|
-
- test/test-database-dumper.rb
|
288
|
-
- test/test-index-column.rb
|
289
|
-
- test/groonga-test-utils.rb
|
290
|
-
- test/test-pagination.rb
|
291
|
-
- test/test-table.rb
|
292
|
-
- test/test-variable-size-column.rb
|
293
|
-
- test/test-plugin.rb
|
294
|
-
- test/test-hash.rb
|
295
|
-
- test/test-table-traverse.rb
|
296
|
-
- test/test-encoding.rb
|
297
|
-
- test/test-schema-create-table.rb
|
294
|
+
- README.textile
|
295
|
+
- test/test-expression.rb
|
298
296
|
- test/test-type.rb
|
299
|
-
- test/test
|
300
|
-
- test/test-
|
301
|
-
- test/test-
|
302
|
-
- test/test-
|
297
|
+
- test/run-test.rb
|
298
|
+
- test/test-schema-dumper.rb
|
299
|
+
- test/test-command-select.rb
|
300
|
+
- test/test-record.rb
|
301
|
+
- test/test-schema-create-table.rb
|
303
302
|
- test/test-geo-point.rb
|
304
|
-
- test/test-
|
303
|
+
- test/test-procedure.rb
|
305
304
|
- test/test-logger.rb
|
306
|
-
- test/test-
|
307
|
-
- test/test-record.rb
|
305
|
+
- test/test-expression-builder.rb
|
308
306
|
- test/test-column.rb
|
309
|
-
- test/test-
|
310
|
-
- test/
|
311
|
-
- test/test-
|
312
|
-
- test/test-
|
313
|
-
- test/test-
|
314
|
-
- test/test-
|
315
|
-
- test/test-
|
316
|
-
- test/test-
|
317
|
-
- test/test-
|
318
|
-
- test/test-expression.rb
|
319
|
-
- test/test-vector-column.rb
|
320
|
-
- test/test-version.rb
|
321
|
-
- test/test-schema-view.rb
|
307
|
+
- test/test-database-dumper.rb
|
308
|
+
- test/test-accessor.rb
|
309
|
+
- test/test-table-select.rb
|
310
|
+
- test/test-array.rb
|
311
|
+
- test/test-gqtp.rb
|
312
|
+
- test/test-table-offset-and-limit.rb
|
313
|
+
- test/test-pagination.rb
|
314
|
+
- test/test-table-select-weight.rb
|
315
|
+
- test/test-variable.rb
|
322
316
|
- test/test-index-cursor.rb
|
317
|
+
- test/test-hash.rb
|
323
318
|
- test/test-double-array-trie.rb
|
324
|
-
- test/test-
|
325
|
-
- test/test-
|
319
|
+
- test/test-plugin.rb
|
320
|
+
- test/test-variable-size-column.rb
|
321
|
+
- test/groonga-test-utils.rb
|
322
|
+
- test/test-table-dumper.rb
|
323
|
+
- test/test-normalizer.rb
|
326
324
|
- test/test-schema-type.rb
|
327
|
-
- test/test-
|
328
|
-
- test/test-
|
325
|
+
- test/test-patricia-trie.rb
|
326
|
+
- test/test-version.rb
|
327
|
+
- test/test-table-traverse.rb
|
329
328
|
- test/test-context.rb
|
329
|
+
- test/test-table-select-mecab.rb
|
330
|
+
- test/test-database.rb
|
331
|
+
- test/test-table-select-normalize.rb
|
332
|
+
- test/test-table.rb
|
333
|
+
- test/test-remote.rb
|
334
|
+
- test/test-schema-view.rb
|
330
335
|
- test/test-snippet.rb
|
331
|
-
- test/test-
|
336
|
+
- test/test-vector-column.rb
|
337
|
+
- test/test-fix-size-column.rb
|
338
|
+
- test/test-exception.rb
|
339
|
+
- test/test-encoding.rb
|
340
|
+
- test/test-view.rb
|
341
|
+
- test/test-schema.rb
|
342
|
+
- test/test-index-column.rb
|
332
343
|
- bin/grntest-log-analyze
|
333
|
-
- bin/groonga-
|
344
|
+
- bin/groonga-index-dump
|
334
345
|
- bin/grndump
|
335
346
|
homepage: http://groonga.rubyforge.org/#about-rroonga
|
336
347
|
licenses:
|
@@ -345,12 +356,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
345
356
|
- - ! '>='
|
346
357
|
- !ruby/object:Gem::Version
|
347
358
|
version: '0'
|
359
|
+
segments:
|
360
|
+
- 0
|
361
|
+
hash: 4131516403956613978
|
348
362
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
349
363
|
none: false
|
350
364
|
requirements:
|
351
365
|
- - ! '>='
|
352
366
|
- !ruby/object:Gem::Version
|
353
367
|
version: '0'
|
368
|
+
segments:
|
369
|
+
- 0
|
370
|
+
hash: 4131516403956613978
|
354
371
|
requirements: []
|
355
372
|
rubyforge_project: groonga
|
356
373
|
rubygems_version: 1.8.23
|
@@ -359,51 +376,52 @@ specification_version: 3
|
|
359
376
|
summary: Ruby bindings for groonga that provide full text search and column store
|
360
377
|
features.
|
361
378
|
test_files:
|
362
|
-
- test/test-
|
363
|
-
- test/test-accessor.rb
|
364
|
-
- test/test-database-dumper.rb
|
365
|
-
- test/test-index-column.rb
|
366
|
-
- test/groonga-test-utils.rb
|
367
|
-
- test/test-pagination.rb
|
368
|
-
- test/test-table.rb
|
369
|
-
- test/test-variable-size-column.rb
|
370
|
-
- test/test-plugin.rb
|
371
|
-
- test/test-hash.rb
|
372
|
-
- test/test-table-traverse.rb
|
373
|
-
- test/test-encoding.rb
|
374
|
-
- test/test-schema-create-table.rb
|
379
|
+
- test/test-expression.rb
|
375
380
|
- test/test-type.rb
|
376
|
-
- test/test
|
377
|
-
- test/test-
|
378
|
-
- test/test-
|
379
|
-
- test/test-
|
381
|
+
- test/run-test.rb
|
382
|
+
- test/test-schema-dumper.rb
|
383
|
+
- test/test-command-select.rb
|
384
|
+
- test/test-record.rb
|
385
|
+
- test/test-schema-create-table.rb
|
380
386
|
- test/test-geo-point.rb
|
381
|
-
- test/test-
|
387
|
+
- test/test-procedure.rb
|
382
388
|
- test/test-logger.rb
|
383
|
-
- test/test-
|
384
|
-
- test/test-record.rb
|
389
|
+
- test/test-expression-builder.rb
|
385
390
|
- test/test-column.rb
|
386
|
-
- test/test-
|
387
|
-
- test/
|
388
|
-
- test/test-
|
389
|
-
- test/test-
|
390
|
-
- test/test-
|
391
|
-
- test/test-
|
392
|
-
- test/test-
|
393
|
-
- test/test-
|
394
|
-
- test/test-
|
395
|
-
- test/test-expression.rb
|
396
|
-
- test/test-vector-column.rb
|
397
|
-
- test/test-version.rb
|
398
|
-
- test/test-schema-view.rb
|
391
|
+
- test/test-database-dumper.rb
|
392
|
+
- test/test-accessor.rb
|
393
|
+
- test/test-table-select.rb
|
394
|
+
- test/test-array.rb
|
395
|
+
- test/test-gqtp.rb
|
396
|
+
- test/test-table-offset-and-limit.rb
|
397
|
+
- test/test-pagination.rb
|
398
|
+
- test/test-table-select-weight.rb
|
399
|
+
- test/test-variable.rb
|
399
400
|
- test/test-index-cursor.rb
|
401
|
+
- test/test-hash.rb
|
400
402
|
- test/test-double-array-trie.rb
|
401
|
-
- test/test-
|
402
|
-
- test/test-
|
403
|
+
- test/test-plugin.rb
|
404
|
+
- test/test-variable-size-column.rb
|
405
|
+
- test/groonga-test-utils.rb
|
406
|
+
- test/test-table-dumper.rb
|
407
|
+
- test/test-normalizer.rb
|
403
408
|
- test/test-schema-type.rb
|
404
|
-
- test/test-
|
405
|
-
- test/test-
|
409
|
+
- test/test-patricia-trie.rb
|
410
|
+
- test/test-version.rb
|
411
|
+
- test/test-table-traverse.rb
|
406
412
|
- test/test-context.rb
|
413
|
+
- test/test-table-select-mecab.rb
|
414
|
+
- test/test-database.rb
|
415
|
+
- test/test-table-select-normalize.rb
|
416
|
+
- test/test-table.rb
|
417
|
+
- test/test-remote.rb
|
418
|
+
- test/test-schema-view.rb
|
407
419
|
- test/test-snippet.rb
|
408
|
-
- test/test-
|
420
|
+
- test/test-vector-column.rb
|
421
|
+
- test/test-fix-size-column.rb
|
422
|
+
- test/test-exception.rb
|
423
|
+
- test/test-encoding.rb
|
424
|
+
- test/test-view.rb
|
425
|
+
- test/test-schema.rb
|
426
|
+
- test/test-index-column.rb
|
409
427
|
has_rdoc:
|
data/AUTHORS
DELETED
data/Rakefile
DELETED
@@ -1,203 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8; mode: ruby -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2009-2012 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
|
-
require 'rubygems/package_task'
|
26
|
-
require 'yard'
|
27
|
-
require 'bundler/gem_helper'
|
28
|
-
require 'rake/extensiontask'
|
29
|
-
require 'packnga'
|
30
|
-
|
31
|
-
if YAML.const_defined?(:ENGINE)
|
32
|
-
begin
|
33
|
-
YAML::ENGINE.yamler = "psych"
|
34
|
-
rescue LoadError
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
base_dir = File.join(File.dirname(__FILE__))
|
39
|
-
|
40
|
-
groonga_ext_dir = File.join(base_dir, "ext", "groonga")
|
41
|
-
groonga_lib_dir = File.join(base_dir, 'lib')
|
42
|
-
$LOAD_PATH.unshift(groonga_ext_dir)
|
43
|
-
$LOAD_PATH.unshift(groonga_lib_dir)
|
44
|
-
ENV["RUBYLIB"] = "#{groonga_lib_dir}:#{groonga_ext_dir}:#{ENV['RUBYLIB']}"
|
45
|
-
|
46
|
-
helper = Bundler::GemHelper.new(base_dir)
|
47
|
-
def helper.version_tag
|
48
|
-
version
|
49
|
-
end
|
50
|
-
|
51
|
-
helper.install
|
52
|
-
spec = helper.gemspec
|
53
|
-
|
54
|
-
Gem::PackageTask.new(spec) do |pkg|
|
55
|
-
pkg.need_tar_gz = true
|
56
|
-
end
|
57
|
-
|
58
|
-
document_task = Packnga::DocumentTask.new(spec) do |t|
|
59
|
-
end
|
60
|
-
|
61
|
-
namespace :reference do
|
62
|
-
namespace :publication do
|
63
|
-
task :keep_compatible do
|
64
|
-
File.open(document_task.htaccess, "a") do |file|
|
65
|
-
file.puts("Redirect permanent /#{spec.name}/text/TUTORIAL_ja_rdoc.html " +
|
66
|
-
"#{spec.homepage}#{spec.name}/ja/file.tutorial.html")
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
task :generate => :keep_compatible
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
Packnga::ReleaseTask.new(spec) do |task|
|
75
|
-
end
|
76
|
-
|
77
|
-
module YARD
|
78
|
-
module CodeObjects
|
79
|
-
class Proxy
|
80
|
-
alias_method :initialize_original, :initialize
|
81
|
-
def initialize(namespace, name, type=nil)
|
82
|
-
name = name.to_s.gsub(/\AGrn(.*)\z/) do
|
83
|
-
suffix = $1
|
84
|
-
case suffix
|
85
|
-
when ""
|
86
|
-
"Groonga"
|
87
|
-
when "TableKeySupport"
|
88
|
-
"Groonga::Table::KeySupport"
|
89
|
-
else
|
90
|
-
"Groonga::#{suffix}"
|
91
|
-
end
|
92
|
-
end
|
93
|
-
initialize_original(namespace, name, type)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
def windows?(platform=nil)
|
100
|
-
platform ||= RUBY_PLATFORM
|
101
|
-
platform =~ /mswin(?!ce)|mingw|cygwin|bccwin/
|
102
|
-
end
|
103
|
-
|
104
|
-
def collect_binary_files(binary_dir)
|
105
|
-
binary_files = []
|
106
|
-
Find.find(binary_dir) do |name|
|
107
|
-
next unless File.file?(name)
|
108
|
-
next if /\.zip\z/i =~ name
|
109
|
-
binary_files << name
|
110
|
-
end
|
111
|
-
binary_files
|
112
|
-
end
|
113
|
-
|
114
|
-
relative_vendor_dir = "vendor"
|
115
|
-
relative_binary_dir = File.join("vendor", "local")
|
116
|
-
vendor_dir = File.join(base_dir, relative_vendor_dir)
|
117
|
-
binary_dir = File.join(base_dir, relative_binary_dir)
|
118
|
-
|
119
|
-
groonga_win32_i386_p = ENV["GROONGA64"] != "yes"
|
120
|
-
|
121
|
-
namespace :win32 do
|
122
|
-
namespace :groonga do
|
123
|
-
task :download do
|
124
|
-
require "open-uri"
|
125
|
-
require "rroonga-build"
|
126
|
-
groonga_version = RroongaBuild::RequiredGroongaVersion::VERSION.join(".")
|
127
|
-
base_name = "groonga-#{groonga_version}-"
|
128
|
-
if groonga_win32_i386_p
|
129
|
-
base_name << "x86"
|
130
|
-
else
|
131
|
-
base_name << "x64"
|
132
|
-
end
|
133
|
-
base_name << ".zip"
|
134
|
-
base_url = "http://packages.groonga.org/windows/groonga/"
|
135
|
-
Dir.chdir(base_dir) do
|
136
|
-
unless File.exist?(base_name)
|
137
|
-
open("#{base_url}#{base_name}", "rb") do |zip|
|
138
|
-
File.open(base_name, "wb") do |output|
|
139
|
-
output.print(zip.read)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
sh("unzip", base_name)
|
144
|
-
rm_rf(relative_binary_dir)
|
145
|
-
mkdir_p(File.dirname(relative_binary_dir))
|
146
|
-
mv(File.basename(base_name, ".*"), relative_binary_dir)
|
147
|
-
end
|
148
|
-
end
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
Rake::ExtensionTask.new("groonga", spec) do |ext|
|
153
|
-
if groonga_win32_i386_p
|
154
|
-
ext.cross_platform = ["x86-mingw32"]
|
155
|
-
else
|
156
|
-
ext.cross_platform = ["x64-mingw32"]
|
157
|
-
end
|
158
|
-
if windows?
|
159
|
-
ext.gem_spec.files += collect_binary_files(relative_binary_dir)
|
160
|
-
else
|
161
|
-
ext.cross_compile = true
|
162
|
-
ext.cross_compiling do |_spec|
|
163
|
-
if windows?(_spec.platform.to_s)
|
164
|
-
_spec.files += collect_binary_files(relative_binary_dir)
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
file "Makefile" => ["extconf.rb", "ext/groonga/extconf.rb"] do
|
171
|
-
extconf_args = []
|
172
|
-
if ENV["TRAVIS"]
|
173
|
-
extconf_args << "--enable-debug-build"
|
174
|
-
end
|
175
|
-
ruby("extconf.rb", *extconf_args)
|
176
|
-
end
|
177
|
-
|
178
|
-
desc "Configure"
|
179
|
-
task :configure => "Makefile"
|
180
|
-
|
181
|
-
desc "Build"
|
182
|
-
task :build => :configure do
|
183
|
-
sh("make")
|
184
|
-
end
|
185
|
-
|
186
|
-
desc "Run test"
|
187
|
-
task :test => :configure do
|
188
|
-
ruby("-rubygems", "test/run-test.rb")
|
189
|
-
end
|
190
|
-
|
191
|
-
namespace :test do
|
192
|
-
task :install do
|
193
|
-
gemspec_helper = Rake.application.jeweler.gemspec_helper
|
194
|
-
ruby("-S gem install --user-install #{gemspec_helper.gem_path}")
|
195
|
-
|
196
|
-
gem_spec = Gem.source_index.find_name("rroonga").last
|
197
|
-
installed_path = gem_spec.full_gem_path
|
198
|
-
ENV["NO_MAKE"] = "yes"
|
199
|
-
ruby("-rubygems", "#{installed_path}/test/run-test.rb")
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
task :default => :test
|