groonga 0.0.7 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/NEWS.ja.rdoc +56 -0
  2. data/NEWS.rdoc +58 -0
  3. data/Rakefile +2 -3
  4. data/benchmark/read-write-many-small-items.rb +16 -32
  5. data/benchmark/write-many-small-items.rb +14 -28
  6. data/example/bookmark.rb +19 -17
  7. data/example/index-html.rb +11 -1
  8. data/example/search/config.ru +14 -9
  9. data/ext/rb-grn-array.c +6 -6
  10. data/ext/rb-grn-column.c +348 -18
  11. data/ext/rb-grn-context.c +8 -4
  12. data/ext/rb-grn-database.c +6 -7
  13. data/ext/rb-grn-exception.c +101 -5
  14. data/ext/rb-grn-expression.c +206 -23
  15. data/ext/rb-grn-fix-size-column.c +6 -39
  16. data/ext/rb-grn-hash.c +24 -24
  17. data/ext/rb-grn-index-column.c +74 -19
  18. data/ext/rb-grn-logger.c +48 -0
  19. data/ext/rb-grn-object.c +281 -67
  20. data/ext/rb-grn-operation.c +1 -1
  21. data/ext/rb-grn-patricia-trie-cursor.c +10 -1
  22. data/ext/rb-grn-patricia-trie.c +268 -7
  23. data/ext/rb-grn-query.c +52 -1
  24. data/ext/rb-grn-record.c +8 -2
  25. data/ext/rb-grn-snippet.c +63 -1
  26. data/ext/rb-grn-table-cursor-key-support.c +15 -1
  27. data/ext/rb-grn-table-cursor.c +57 -0
  28. data/ext/rb-grn-table-key-support.c +382 -46
  29. data/ext/rb-grn-table.c +729 -192
  30. data/ext/rb-grn-type.c +63 -12
  31. data/ext/rb-grn-utils.c +156 -158
  32. data/ext/rb-grn-variable.c +18 -0
  33. data/ext/rb-grn.h +85 -21
  34. data/ext/rb-groonga.c +13 -3
  35. data/extconf.rb +19 -4
  36. data/html/developer.html +1 -1
  37. data/html/header.html.erb +1 -1
  38. data/html/index.html +4 -4
  39. data/lib/groonga.rb +10 -0
  40. data/lib/groonga/expression-builder.rb +81 -42
  41. data/lib/groonga/patricia-trie.rb +13 -0
  42. data/lib/groonga/record.rb +158 -13
  43. data/lib/groonga/schema.rb +339 -33
  44. data/pkg-config.rb +6 -1
  45. data/test-unit/lib/test/unit.rb +23 -42
  46. data/test-unit/lib/test/unit/assertionfailederror.rb +11 -0
  47. data/test-unit/lib/test/unit/assertions.rb +87 -9
  48. data/test-unit/lib/test/unit/autorunner.rb +20 -11
  49. data/test-unit/lib/test/unit/collector.rb +1 -8
  50. data/test-unit/lib/test/unit/collector/load.rb +2 -3
  51. data/test-unit/lib/test/unit/color-scheme.rb +13 -1
  52. data/test-unit/lib/test/unit/diff.rb +223 -37
  53. data/test-unit/lib/test/unit/error.rb +4 -0
  54. data/test-unit/lib/test/unit/failure.rb +31 -5
  55. data/test-unit/lib/test/unit/notification.rb +8 -4
  56. data/test-unit/lib/test/unit/omission.rb +51 -3
  57. data/test-unit/lib/test/unit/pending.rb +4 -0
  58. data/test-unit/lib/test/unit/testcase.rb +55 -4
  59. data/test-unit/lib/test/unit/ui/console/testrunner.rb +190 -4
  60. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +14 -0
  61. data/test-unit/lib/test/unit/ui/testrunner.rb +8 -0
  62. data/test-unit/lib/test/unit/version.rb +1 -1
  63. data/test-unit/sample/{tc_adder.rb → test_adder.rb} +3 -1
  64. data/test-unit/sample/{tc_subtracter.rb → test_subtracter.rb} +3 -1
  65. data/test-unit/sample/test_user.rb +1 -0
  66. data/test-unit/test/collector/test-descendant.rb +2 -4
  67. data/test-unit/test/collector/test_objectspace.rb +7 -5
  68. data/test-unit/test/run-test.rb +2 -0
  69. data/test-unit/test/test-color-scheme.rb +7 -0
  70. data/test-unit/test/test-diff.rb +48 -7
  71. data/test-unit/test/test-omission.rb +1 -1
  72. data/test-unit/test/test-testcase.rb +47 -0
  73. data/test-unit/test/test_assertions.rb +79 -10
  74. data/test/groonga-test-utils.rb +6 -1
  75. data/test/test-array.rb +29 -14
  76. data/test/test-column.rb +107 -55
  77. data/test/test-context.rb +5 -0
  78. data/test/test-database.rb +2 -37
  79. data/test/test-exception.rb +9 -1
  80. data/test/test-expression-builder.rb +23 -5
  81. data/test/test-expression.rb +44 -8
  82. data/test/test-fix-size-column.rb +16 -5
  83. data/test/test-gqtp.rb +70 -0
  84. data/test/test-hash.rb +142 -43
  85. data/test/test-index-column.rb +9 -9
  86. data/test/test-patricia-trie.rb +79 -20
  87. data/test/test-procedure.rb +4 -2
  88. data/test/test-record.rb +32 -20
  89. data/test/test-remote.rb +3 -2
  90. data/test/test-schema.rb +226 -92
  91. data/test/test-table-cursor.rb +103 -1
  92. data/test/test-table-offset-and-limit.rb +102 -0
  93. data/test/test-table-select-normalize.rb +4 -4
  94. data/test/test-table-select.rb +52 -8
  95. data/test/test-table.rb +235 -116
  96. data/test/test-type.rb +2 -2
  97. data/test/test-variable-size-column.rb +21 -5
  98. data/test/test-vector-column.rb +76 -0
  99. data/{TUTORIAL.ja.rdoc → text/TUTORIAL.ja.rdoc} +52 -52
  100. data/text/expression.rdoc +284 -0
  101. metadata +11 -7
  102. data/test-unit/sample/ts_examples.rb +0 -7
@@ -22,6 +22,12 @@
22
22
 
23
23
  VALUE rb_cGrnVariable;
24
24
 
25
+ /*
26
+ * Document-class: Groonga::Variable < Groonga::Object
27
+ *
28
+ * Groonga::Expressionで使われる変数。
29
+ */
30
+
25
31
  grn_obj *
26
32
  rb_grn_variable_from_ruby_object (VALUE variable, grn_ctx **context)
27
33
  {
@@ -52,6 +58,12 @@ rb_grn_variable_deconstruct (RbGrnVariable *rb_grn_variable,
52
58
  range_id, range);
53
59
  }
54
60
 
61
+ /*
62
+ * call-seq:
63
+ * variable.value -> Groonga::Object
64
+ *
65
+ * 変数の値を返す。
66
+ */
55
67
  static VALUE
56
68
  rb_grn_variable_get_value (VALUE self)
57
69
  {
@@ -65,6 +77,12 @@ rb_grn_variable_get_value (VALUE self)
65
77
  return GRNOBJ2RVAL(Qnil, context, variable, self);
66
78
  }
67
79
 
80
+ /*
81
+ * call-seq:
82
+ * variable.value=(value)
83
+ *
84
+ * 変数の値を_value_に設定する。
85
+ */
68
86
  static VALUE
69
87
  rb_grn_variable_set_value (VALUE self, VALUE value)
70
88
  {
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby" -*- */
2
2
  /*
3
- Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
3
+ Copyright (C) 2009-2010 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
@@ -62,14 +62,14 @@ RB_GRN_BEGIN_DECLS
62
62
  #endif
63
63
 
64
64
  #ifdef RB_GRN_DEBUG
65
- # define debug(...) printf(__VA_ARGS__)
65
+ # define debug(...) fprintf(stderr, __VA_ARGS__)
66
66
  #else
67
67
  # define debug(...)
68
68
  #endif
69
69
 
70
70
  #define RB_GRN_MAJOR_VERSION 0
71
- #define RB_GRN_MINOR_VERSION 0
72
- #define RB_GRN_MICRO_VERSION 7
71
+ #define RB_GRN_MINOR_VERSION 9
72
+ #define RB_GRN_MICRO_VERSION 0
73
73
 
74
74
  typedef int rb_grn_boolean;
75
75
  #define RB_GRN_FALSE (0)
@@ -80,11 +80,13 @@ typedef int rb_grn_boolean;
80
80
  #include <stdint.h>
81
81
 
82
82
  #define RB_GRN_OBJECT(object) ((RbGrnObject *)(object))
83
+ #define RB_GRN_NAMED_OBJECT(object) ((RbGrnNamedObject *)(object))
83
84
  #define RB_GRN_TABLE(object) ((RbGrnTable *)(object))
84
85
  #define RB_GRN_TABLE_KEY_SUPPORT(object) ((RbGrnTableKeySupport *)(object))
85
86
  #define RB_GRN_TABLE_CURSOR(object) ((RbGrnTableCursort *)(object))
86
87
  #define RB_GRN_COLUMN(object) ((RbGrnColumn *)(object))
87
88
  #define RB_GRN_INDEX_COLUMN(object) ((RbGrnIndexColumn *)(object))
89
+ #define RB_GRN_ACCESSOR(object) ((RbGrnAccessor *)(object))
88
90
  #define RB_GRN_EXPRESSION(object) ((RbGrnExpression *)(object))
89
91
  #define RB_GRN_UNBIND_FUNCTION(function) ((RbGrnUnbindFunction)(function))
90
92
 
@@ -94,6 +96,7 @@ typedef struct _RbGrnContext RbGrnContext;
94
96
  struct _RbGrnContext
95
97
  {
96
98
  grn_ctx *context;
99
+ VALUE self;
97
100
  };
98
101
 
99
102
  typedef struct _RbGrnObject RbGrnObject;
@@ -109,11 +112,20 @@ struct _RbGrnObject
109
112
  rb_grn_boolean need_close;
110
113
  };
111
114
 
115
+ typedef struct _RbGrnNamedObject RbGrnNamedObject;
116
+ struct _RbGrnNamedObject
117
+ {
118
+ RbGrnObject parent;
119
+ char *name;
120
+ unsigned name_size;
121
+ };
122
+
112
123
  typedef struct _RbGrnTable RbGrnTable;
113
124
  struct _RbGrnTable
114
125
  {
115
126
  RbGrnObject parent;
116
127
  grn_obj *value;
128
+ VALUE columns;
117
129
  };
118
130
 
119
131
  typedef struct _RbGrnTableKeySupport RbGrnTableKeySupport;
@@ -126,7 +138,7 @@ struct _RbGrnTableKeySupport
126
138
  typedef struct _RbGrnColumn RbGrnColumn;
127
139
  struct _RbGrnColumn
128
140
  {
129
- RbGrnObject parent;
141
+ RbGrnNamedObject parent;
130
142
  grn_obj *value;
131
143
  };
132
144
 
@@ -139,6 +151,12 @@ struct _RbGrnIndexColumn
139
151
  grn_obj *string_query;
140
152
  };
141
153
 
154
+ typedef struct _RbGrnAccessor RbGrnAccessor;
155
+ struct _RbGrnAccessor
156
+ {
157
+ RbGrnNamedObject parent;
158
+ };
159
+
142
160
  typedef struct _RbGrnTableCursor RbGrnTableCursor;
143
161
  struct _RbGrnTableCursor
144
162
  {
@@ -161,6 +179,8 @@ struct _RbGrnExpression
161
179
  RB_GRN_VAR rb_grn_boolean rb_grn_exited;
162
180
 
163
181
  RB_GRN_VAR VALUE rb_eGrnError;
182
+ RB_GRN_VAR VALUE rb_eGrnObjectClosed;
183
+ RB_GRN_VAR VALUE rb_eGrnNoSuchColumn;
164
184
  RB_GRN_VAR VALUE rb_cGrnObject;
165
185
  RB_GRN_VAR VALUE rb_mGrnEncodingSupport;
166
186
  RB_GRN_VAR VALUE rb_cGrnDatabase;
@@ -267,8 +287,14 @@ void rb_grn_object_deconstruct (RbGrnObject *rb_grn_object,
267
287
  grn_id *range_id,
268
288
  grn_obj **range);
269
289
 
290
+ VALUE rb_grn_object_get_id (VALUE object);
270
291
  VALUE rb_grn_object_array_reference (VALUE object,
271
292
  VALUE rb_id);
293
+ VALUE rb_grn_object_set_raw (RbGrnObject *rb_grn_object,
294
+ grn_id id,
295
+ VALUE rb_value,
296
+ int flags,
297
+ VALUE related_object);
272
298
  VALUE rb_grn_object_close (VALUE object);
273
299
  VALUE rb_grn_object_closed_p (VALUE object);
274
300
  VALUE rb_grn_object_inspect_object (VALUE inspected,
@@ -284,17 +310,22 @@ VALUE rb_grn_object_inspect_content (VALUE object,
284
310
  VALUE rb_grn_object_inspect_footer (VALUE object,
285
311
  VALUE inspected);
286
312
 
313
+ void rb_grn_named_object_bind (RbGrnNamedObject *rb_grn_named_object,
314
+ grn_ctx *context,
315
+ grn_obj *object);
316
+ void rb_grn_named_object_finalizer (grn_ctx *context,
317
+ grn_obj *column,
318
+ RbGrnNamedObject *rb_grn_named_object);
319
+ void rb_grn_named_object_set_name (RbGrnNamedObject *rb_grn_named_object,
320
+ const char *name,
321
+ unsigned name_size);
322
+
287
323
  void rb_grn_table_bind (RbGrnTable *rb_grn_table,
288
324
  grn_ctx *context,
289
325
  grn_obj *table_key_support);
290
326
  void rb_grn_table_finalizer (grn_ctx *context,
291
327
  grn_obj *grn_object,
292
328
  RbGrnTable *rb_grn_table);
293
- void rb_grn_table_assign (VALUE self,
294
- VALUE rb_context,
295
- grn_ctx *context,
296
- grn_obj *table,
297
- rb_grn_boolean owner);
298
329
  void rb_grn_table_deconstruct (RbGrnTable *rb_grn_table,
299
330
  grn_obj **table,
300
331
  grn_ctx **context,
@@ -302,16 +333,13 @@ void rb_grn_table_deconstruct (RbGrnTable *rb_grn_table,
302
333
  grn_obj **domain,
303
334
  grn_obj **value,
304
335
  grn_id *range_id,
305
- grn_obj **range);
336
+ grn_obj **range,
337
+ VALUE *columns);
306
338
 
307
339
  grn_obj *rb_grn_table_open_raw (int argc,
308
340
  VALUE *argv,
309
341
  grn_ctx **context,
310
342
  VALUE *rb_context);
311
- VALUE rb_grn_table_s_create (int argc,
312
- VALUE *argv,
313
- VALUE klass,
314
- grn_obj_flags key_store);
315
343
 
316
344
  VALUE rb_grn_table_delete (VALUE self,
317
345
  VALUE rb_id);
@@ -320,6 +348,29 @@ VALUE rb_grn_table_array_reference (VALUE self,
320
348
  VALUE rb_grn_table_array_set (VALUE self,
321
349
  VALUE rb_id,
322
350
  VALUE rb_value);
351
+ VALUE rb_grn_table_get_value (VALUE self,
352
+ VALUE rb_id);
353
+ VALUE rb_grn_table_set_value (VALUE self,
354
+ VALUE rb_id,
355
+ VALUE rb_value);
356
+ VALUE rb_grn_table_get_column (VALUE self,
357
+ VALUE rb_name);
358
+ VALUE rb_grn_table_get_column_surely (VALUE self,
359
+ VALUE rb_name);
360
+ VALUE rb_grn_table_get_column_value_raw (VALUE self,
361
+ grn_id id,
362
+ VALUE rb_name);
363
+ VALUE rb_grn_table_get_column_value (VALUE self,
364
+ VALUE rb_id,
365
+ VALUE rb_name);
366
+ VALUE rb_grn_table_set_column_value_raw (VALUE self,
367
+ grn_id id,
368
+ VALUE rb_name,
369
+ VALUE rb_value);
370
+ VALUE rb_grn_table_set_column_value (VALUE self,
371
+ VALUE rb_id,
372
+ VALUE rb_name,
373
+ VALUE rb_value);
323
374
 
324
375
  grn_ctx *rb_grn_table_cursor_ensure_context (VALUE cursor,
325
376
  VALUE *rb_context);
@@ -338,7 +389,8 @@ void rb_grn_table_key_support_deconstruct (RbGrnTableKeySupport *rb_gr
338
389
  grn_obj **domain,
339
390
  grn_obj **value,
340
391
  grn_id *range_id,
341
- grn_obj **range);
392
+ grn_obj **range,
393
+ VALUE *columns);
342
394
  grn_id rb_grn_table_key_support_get (VALUE self,
343
395
  VALUE rb_key);
344
396
 
@@ -375,6 +427,13 @@ void rb_grn_index_column_deconstruct (RbGrnIndexColumn *rb_grn_in
375
427
  grn_obj **id_query,
376
428
  grn_obj **string_query);
377
429
 
430
+ void rb_grn_accessor_bind (RbGrnAccessor *rb_grn_accessor,
431
+ grn_ctx *context,
432
+ grn_obj *accessor);
433
+ void rb_grn_accessor_finalizer (grn_ctx *context,
434
+ grn_obj *accessor,
435
+ RbGrnAccessor *rb_grn_accessor);
436
+
378
437
  void rb_grn_expression_bind (RbGrnExpression *rb_grn_expression,
379
438
  grn_ctx *context,
380
439
  grn_obj *expression);
@@ -385,6 +444,9 @@ void rb_grn_expression_finalizer (grn_ctx *context,
385
444
  VALUE rb_grn_record_new (VALUE table,
386
445
  grn_id id,
387
446
  VALUE values);
447
+ VALUE rb_grn_record_new_raw (VALUE table,
448
+ VALUE id,
449
+ VALUE values);
388
450
 
389
451
  VALUE rb_grn_record_expression_builder_new (VALUE table,
390
452
  VALUE name);
@@ -450,16 +512,16 @@ VALUE rb_grn_column_expression_builder_build
450
512
  (rb_grn_bulk_from_ruby_object(object, context, bulk))
451
513
  #define RVAL2GRNBULK_WITH_TYPE(object, context, bulk, type_id, type) \
452
514
  (rb_grn_bulk_from_ruby_object_with_type(object, context, bulk, type_id, type))
453
- #define GRNBULK2RVAL(context, bulk, related_object) \
454
- (rb_grn_bulk_to_ruby_object(context, bulk, related_object))
515
+ #define GRNBULK2RVAL(context, bulk, range, related_object) \
516
+ (rb_grn_bulk_to_ruby_object(context, bulk, range, related_object))
455
517
 
456
518
  #define RVAL2GRNVECTOR(object, context, vector) \
457
519
  (rb_grn_vector_from_ruby_object(object, context, vector))
458
520
  #define GRNVECTOR2RVAL(context, vector) \
459
521
  (rb_grn_vector_to_ruby_object(context, vector))
460
522
 
461
- #define RVAL2GRNUVECTOR(object, context, uvector) \
462
- (rb_grn_uvector_from_ruby_object(object, context, uvector))
523
+ #define RVAL2GRNUVECTOR(object, context, uvector, related_object) \
524
+ (rb_grn_uvector_from_ruby_object(object, context, uvector, related_object))
463
525
  #define GRNUVECTOR2RVAL(context, uvector) \
464
526
  (rb_grn_uvector_to_ruby_object(context, uvector))
465
527
 
@@ -563,6 +625,7 @@ grn_obj *rb_grn_bulk_from_ruby_object_with_type
563
625
  grn_obj *type);
564
626
  VALUE rb_grn_bulk_to_ruby_object (grn_ctx *context,
565
627
  grn_obj *bulk,
628
+ grn_obj *range,
566
629
  VALUE related_object);
567
630
  grn_obj *rb_grn_vector_from_ruby_object (VALUE object,
568
631
  grn_ctx *context,
@@ -571,7 +634,8 @@ VALUE rb_grn_vector_to_ruby_object (grn_ctx *context,
571
634
  grn_obj *vector);
572
635
  grn_obj *rb_grn_uvector_from_ruby_object (VALUE object,
573
636
  grn_ctx *context,
574
- grn_obj *uvector);
637
+ grn_obj *uvector,
638
+ VALUE related_object);
575
639
  VALUE rb_grn_uvector_to_ruby_object (grn_ctx *context,
576
640
  grn_obj *uvector);
577
641
 
@@ -21,8 +21,8 @@
21
21
  rb_grn_boolean rb_grn_exited = RB_GRN_FALSE;
22
22
  extern grn_ctx grn_gctx;
23
23
 
24
- static void
25
- finish_groonga (VALUE data)
24
+ static VALUE
25
+ finish_groonga (VALUE self, VALUE object_id)
26
26
  {
27
27
  grn_ctx *context = grn_gctx.next;
28
28
 
@@ -34,6 +34,8 @@ finish_groonga (VALUE data)
34
34
  grn_fin();
35
35
  debug("finish: done\n");
36
36
  rb_grn_exited = RB_GRN_TRUE;
37
+
38
+ return Qnil;
37
39
  }
38
40
 
39
41
  void
@@ -41,9 +43,18 @@ Init_groonga (void)
41
43
  {
42
44
  VALUE mGrn;
43
45
  VALUE cGrnBuildVersion, cGrnBindingsVersion;
46
+ VALUE groonga_finalizer, groonga_finalizer_keeper;
44
47
 
45
48
  mGrn = rb_define_module("Groonga");
46
49
 
50
+ groonga_finalizer = rb_funcall(rb_cObject, rb_intern("new"), 0);
51
+ rb_define_singleton_method(groonga_finalizer, "call", finish_groonga, 1);
52
+ groonga_finalizer_keeper = rb_funcall(rb_cObject, rb_intern("new"), 0);
53
+ rb_funcall(rb_const_get(rb_cObject, rb_intern("ObjectSpace")),
54
+ rb_intern("define_finalizer"),
55
+ 2, groonga_finalizer_keeper, groonga_finalizer);
56
+ rb_iv_set(mGrn, "finalizer", groonga_finalizer_keeper);
57
+
47
58
  cGrnBuildVersion = rb_ary_new3(3,
48
59
  INT2NUM(GRN_MAJOR_VERSION),
49
60
  INT2NUM(GRN_MINOR_VERSION),
@@ -78,7 +89,6 @@ Init_groonga (void)
78
89
  rb_grn_init_exception(mGrn);
79
90
 
80
91
  rb_grn_rc_check(grn_init(), Qnil);
81
- rb_set_end_proc(finish_groonga, Qnil);
82
92
 
83
93
  rb_grn_init_utils(mGrn);
84
94
  rb_grn_init_encoding(mGrn);
data/extconf.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2009-2010 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
@@ -36,7 +36,7 @@ package_name = "groonga"
36
36
  module_name = "groonga"
37
37
  ext_dir_name = "ext"
38
38
  src_dir = File.join(File.expand_path(File.dirname(__FILE__)), ext_dir_name)
39
- major, minor, micro = 0, 1, 4
39
+ major, minor, micro = 0, 1, 5
40
40
 
41
41
  def local_groonga_base_dir
42
42
  File.join(File.dirname(__FILE__), "vendor")
@@ -98,7 +98,8 @@ def install_groonga_locally(major, minor, micro)
98
98
  groonga_source_dir = "groonga-#{major}.#{minor}.#{micro}"
99
99
  Dir.chdir(groonga_source_dir) do
100
100
  message("configuring...")
101
- if xsystem("./configure CFLAGS='-g -O0' --prefix=#{Shellwords.escape(install_dir)}")
101
+ prefix = Shellwords.escape(install_dir)
102
+ if xsystem("./configure CFLAGS='-g -O0' --prefix=#{prefix}")
102
103
  message(" done\n")
103
104
  else
104
105
  message(" failed\n")
@@ -114,7 +115,12 @@ def install_groonga_locally(major, minor, micro)
114
115
  end
115
116
 
116
117
  message("installing...")
117
- if xsystem("make install")
118
+ if [major, minor, micro] == [0, 1, 5]
119
+ make_install_args = " MKDIR_P='mkdir -p --'"
120
+ else
121
+ make_install_args = ""
122
+ end
123
+ if xsystem("make install#{make_install_args}")
118
124
  message(" done\n")
119
125
  else
120
126
  message(" failed\n")
@@ -139,6 +145,15 @@ $defs << "-DGRN_MAJOR_VERSION=#{real_major}"
139
145
  $defs << "-DGRN_MINOR_VERSION=#{real_minor}"
140
146
  $defs << "-DGRN_MICRO_VERSION=#{real_micro}"
141
147
 
148
+ checking_for(checking_message("debug flag")) do
149
+ debug = with_config("debug")
150
+ if debug
151
+ debug_flag = "-DRB_GRN_DEBUG"
152
+ $defs << debug_flag unless $defs.include?(debug_flag)
153
+ end
154
+ debug
155
+ end
156
+
142
157
  have_header("ruby/st.h") unless have_macro("HAVE_RUBY_ST_H", "ruby.h")
143
158
  have_func("rb_errinfo", "ruby.h")
144
159
  have_type("enum ruby_value_type", "ruby.h")
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  <ul class="menu">
23
23
  <li id="menu-reference"><a href="groonga/">リファレンスマニュアル</a></li>
24
- <li id="menu-tutorial"><a href="groonga/TUTORIAL_ja_rdoc.html">チュートリアル</a></li>
24
+ <li id="menu-tutorial"><a href="groonga/text/TUTORIAL_ja_rdoc.html">チュートリアル</a></li>
25
25
  <li id="menu-install"><a href="./#install-ruby-groonga">インストール</a></li>
26
26
  <li id="menu-developer"><a href="developer.html">開発者向け情報</a></li>
27
27
  </ul>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <ul class="menu">
10
10
  <li id="menu-reference"><a href="/groonga/">リファレンスマニュアル</a></li>
11
- <li id="menu-tutorial"><a href="/groonga/TUTORIAL_ja_rdoc.html">チュートリアル</a></li>
11
+ <li id="menu-tutorial"><a href="/groonga/text/TUTORIAL_ja_rdoc.html">チュートリアル</a></li>
12
12
  <li id="menu-install"><a href="/#install-ruby-groonga">インストール</a></li>
13
13
  <li id="menu-developer"><a href="/developer.html">開発者向け情報</a></li>
14
14
  </ul>
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  <ul class="menu">
23
23
  <li id="menu-reference"><a href="groonga/">リファレンスマニュアル</a></li>
24
- <li id="menu-tutorial"><a href="groonga/TUTORIAL_ja_rdoc.html">チュートリアル</a></li>
24
+ <li id="menu-tutorial"><a href="groonga/text/TUTORIAL_ja_rdoc.html">チュートリアル</a></li>
25
25
  <li id="menu-install"><a href="./#install-ruby-groonga">インストール</a></li>
26
26
  <li id="menu-developer"><a href="developer.html">開発者向け情報</a></li>
27
27
  </ul>
@@ -42,7 +42,7 @@
42
42
 
43
43
  <h3>Ruby/groongaの最新リリース</h3>
44
44
  <p>
45
- 2009-10-02にリリースされた0.0.7が最新です。
45
+ 2010-02-29にリリースされた0.9.0が最新です。
46
46
  </p>
47
47
 
48
48
  <h3 id="install-ruby-groonga">Ruby/groongaのインストール</h3>
@@ -58,7 +58,7 @@
58
58
  </p>
59
59
  <ul>
60
60
  <li><a href="groonga/">Ruby/groongaのリファレンスマニュアル</a></li>
61
- <li><a href="groonga/TUTORIAL_ja_rdoc.html">Ruby/groongaのチュートリアル</a></li>
61
+ <li><a href="groonga/text/TUTORIAL_ja_rdoc.html">Ruby/groongaのチュートリアル</a></li>
62
62
  </ul>
63
63
 
64
64
  <h2 id="about-active-groonga">ActiveGroonga</h2>
@@ -79,7 +79,7 @@
79
79
 
80
80
  <h3>ActiveGroongaの最新リリース</h3>
81
81
  <p>
82
- 2009-10-02にリリースされた0.0.7が最新です。
82
+ 2010-02-09にリリースされた0.9.0が最新です。
83
83
  </p>
84
84
 
85
85
  <h3 id="install-active-groonga">ActiveGroongaのインストール</h3>