rroonga 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/NEWS.ja.rdoc +29 -0
  2. data/NEWS.rdoc +29 -0
  3. data/Rakefile +5 -3
  4. data/ext/groonga/rb-grn-array.c +1 -1
  5. data/ext/groonga/rb-grn-context.c +15 -28
  6. data/ext/groonga/rb-grn-exception.c +46 -1
  7. data/ext/groonga/rb-grn-expression.c +22 -13
  8. data/ext/groonga/rb-grn-fix-size-column.c +2 -8
  9. data/ext/groonga/rb-grn-hash.c +8 -1
  10. data/ext/groonga/rb-grn-object.c +1 -1
  11. data/ext/groonga/rb-grn-patricia-trie.c +23 -1
  12. data/ext/groonga/rb-grn-table-key-support.c +22 -0
  13. data/ext/groonga/rb-grn-table.c +37 -5
  14. data/ext/groonga/rb-grn-utils.c +20 -2
  15. data/ext/groonga/rb-groonga.c +76 -38
  16. data/extconf.rb +17 -1
  17. data/html/developer.html +32 -7
  18. data/html/footer.html.erb +5 -0
  19. data/html/heading-mark.svg +393 -0
  20. data/html/index.html +33 -3
  21. data/lib/groonga.rb +3 -7
  22. data/lib/groonga/context.rb +2 -13
  23. data/lib/groonga/expression-builder.rb +273 -67
  24. data/lib/groonga/pagination.rb +143 -0
  25. data/lib/groonga/record.rb +2 -0
  26. data/lib/groonga/schema.rb +140 -29
  27. data/rroonga-build.rb +2 -2
  28. data/test-unit/Rakefile +40 -0
  29. data/test-unit/TODO +5 -0
  30. data/test-unit/bin/testrb +5 -0
  31. data/test-unit/html/classic.html +15 -0
  32. data/test-unit/html/index.html +25 -0
  33. data/test-unit/html/index.html.ja +27 -0
  34. data/test-unit/lib/test/unit.rb +323 -0
  35. data/test-unit/lib/test/unit/assertionfailederror.rb +25 -0
  36. data/test-unit/lib/test/unit/assertions.rb +1230 -0
  37. data/test-unit/lib/test/unit/attribute.rb +125 -0
  38. data/test-unit/lib/test/unit/autorunner.rb +360 -0
  39. data/test-unit/lib/test/unit/collector.rb +36 -0
  40. data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
  41. data/test-unit/lib/test/unit/collector/dir.rb +108 -0
  42. data/test-unit/lib/test/unit/collector/load.rb +144 -0
  43. data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
  44. data/test-unit/lib/test/unit/color-scheme.rb +102 -0
  45. data/test-unit/lib/test/unit/color.rb +96 -0
  46. data/test-unit/lib/test/unit/diff.rb +724 -0
  47. data/test-unit/lib/test/unit/error.rb +130 -0
  48. data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
  49. data/test-unit/lib/test/unit/failure.rb +136 -0
  50. data/test-unit/lib/test/unit/fixture.rb +176 -0
  51. data/test-unit/lib/test/unit/notification.rb +129 -0
  52. data/test-unit/lib/test/unit/omission.rb +191 -0
  53. data/test-unit/lib/test/unit/pending.rb +150 -0
  54. data/test-unit/lib/test/unit/priority.rb +180 -0
  55. data/test-unit/lib/test/unit/runner/console.rb +52 -0
  56. data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
  57. data/test-unit/lib/test/unit/runner/tap.rb +8 -0
  58. data/test-unit/lib/test/unit/testcase.rb +476 -0
  59. data/test-unit/lib/test/unit/testresult.rb +89 -0
  60. data/test-unit/lib/test/unit/testsuite.rb +110 -0
  61. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
  62. data/test-unit/lib/test/unit/ui/console/testrunner.rb +466 -0
  63. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +63 -0
  64. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +92 -0
  65. data/test-unit/lib/test/unit/ui/testrunner.rb +28 -0
  66. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
  67. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  68. data/test-unit/lib/test/unit/util/backtracefilter.rb +41 -0
  69. data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
  70. data/test-unit/lib/test/unit/util/observable.rb +90 -0
  71. data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
  72. data/test-unit/lib/test/unit/version.rb +7 -0
  73. data/test-unit/sample/adder.rb +13 -0
  74. data/test-unit/sample/subtracter.rb +12 -0
  75. data/test-unit/sample/test_adder.rb +20 -0
  76. data/test-unit/sample/test_subtracter.rb +20 -0
  77. data/test-unit/sample/test_user.rb +23 -0
  78. data/test-unit/test/collector/test-descendant.rb +133 -0
  79. data/test-unit/test/collector/test-load.rb +442 -0
  80. data/test-unit/test/collector/test_dir.rb +406 -0
  81. data/test-unit/test/collector/test_objectspace.rb +100 -0
  82. data/test-unit/test/run-test.rb +15 -0
  83. data/test-unit/test/test-attribute.rb +86 -0
  84. data/test-unit/test/test-color-scheme.rb +67 -0
  85. data/test-unit/test/test-color.rb +47 -0
  86. data/test-unit/test/test-diff.rb +518 -0
  87. data/test-unit/test/test-emacs-runner.rb +60 -0
  88. data/test-unit/test/test-fixture.rb +287 -0
  89. data/test-unit/test/test-notification.rb +33 -0
  90. data/test-unit/test/test-omission.rb +81 -0
  91. data/test-unit/test/test-pending.rb +70 -0
  92. data/test-unit/test/test-priority.rb +119 -0
  93. data/test-unit/test/test-testcase.rb +544 -0
  94. data/test-unit/test/test_assertions.rb +1151 -0
  95. data/test-unit/test/test_error.rb +26 -0
  96. data/test-unit/test/test_failure.rb +33 -0
  97. data/test-unit/test/test_testresult.rb +113 -0
  98. data/test-unit/test/test_testsuite.rb +129 -0
  99. data/test-unit/test/testunit-test-util.rb +14 -0
  100. data/test-unit/test/ui/test_testrunmediator.rb +20 -0
  101. data/test-unit/test/util/test-method-owner-finder.rb +38 -0
  102. data/test-unit/test/util/test_backtracefilter.rb +41 -0
  103. data/test-unit/test/util/test_observable.rb +102 -0
  104. data/test-unit/test/util/test_procwrapper.rb +36 -0
  105. data/test/groonga-test-utils.rb +3 -2
  106. data/test/run-test.rb +14 -2
  107. data/test/test-column.rb +7 -7
  108. data/test/test-context-select.rb +34 -11
  109. data/test/test-exception.rb +3 -0
  110. data/test/test-expression-builder.rb +11 -0
  111. data/test/test-expression.rb +3 -6
  112. data/test/test-gqtp.rb +3 -5
  113. data/test/test-pagination.rb +249 -0
  114. data/test/test-record.rb +36 -8
  115. data/test/test-remote.rb +11 -4
  116. data/test/test-schema-create-table.rb +251 -0
  117. data/test/test-schema.rb +4 -24
  118. data/test/test-table-offset-and-limit.rb +3 -5
  119. data/test/test-table-select-mecab.rb +80 -0
  120. data/test/test-table-select-weight.rb +104 -0
  121. data/test/test-table.rb +22 -4
  122. data/test/test-version.rb +1 -1
  123. data/text/TUTORIAL.ja.rdoc +2 -0
  124. data/text/expression.rdoc +1 -0
  125. metadata +96 -35
@@ -672,6 +672,25 @@ rb_grn_table_key_support_set_default_tokenizer (VALUE self, VALUE rb_tokenizer)
672
672
  return Qnil;
673
673
  }
674
674
 
675
+ /*
676
+ * call-seq:
677
+ * table.normalize_key? -> true/false
678
+ *
679
+ * キーを正規化する場合は+true+、正規化しない場合は+false+を返
680
+ * す。
681
+ */
682
+ static VALUE
683
+ rb_grn_table_key_support_normalize_key_p (VALUE self)
684
+ {
685
+ grn_obj *table;
686
+
687
+ rb_grn_table_key_support_deconstruct(SELF(self), &table, NULL,
688
+ NULL, NULL, NULL,
689
+ NULL, NULL, NULL,
690
+ NULL);
691
+ return CBOOL2RVAL(table->header.flags & GRN_OBJ_KEY_NORMALIZE);
692
+ }
693
+
675
694
  void
676
695
  rb_grn_init_table_key_support (VALUE mGrn)
677
696
  {
@@ -711,4 +730,7 @@ rb_grn_init_table_key_support (VALUE mGrn)
711
730
  rb_grn_table_key_support_get_default_tokenizer, 0);
712
731
  rb_define_method(rb_mGrnTableKeySupport, "default_tokenizer=",
713
732
  rb_grn_table_key_support_set_default_tokenizer, 1);
733
+
734
+ rb_define_method(rb_mGrnTableKeySupport, "normalize_key?",
735
+ rb_grn_table_key_support_normalize_key_p, 0);
714
736
  }
@@ -1100,7 +1100,7 @@ rb_grn_table_sort (int argc, VALUE *argv, VALUE self)
1100
1100
  /*
1101
1101
  * call-seq:
1102
1102
  * table.group(key, options={}) -> Groonga::Hash
1103
- * table.group([key1, key1, ...], options={}) -> [Groonga::Hash, ...]
1103
+ * table.group([key1, key2, ...], options={}) -> [Groonga::Hash, ...]
1104
1104
  *
1105
1105
  * _table_のレコードを_key1_, _key2_, _..._で指定したキーの
1106
1106
  * 値でグループ化する。多くの場合、キーにはカラムを指定する。
@@ -1126,7 +1126,7 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
1126
1126
 
1127
1127
  rb_scan_args(argc, argv, "11", &rb_keys, &rb_options);
1128
1128
 
1129
- if (TYPE(rb_keys) == rb_cArray) {
1129
+ if (TYPE(rb_keys) == T_ARRAY) {
1130
1130
  n_keys = RARRAY_LEN(rb_keys);
1131
1131
  rb_group_keys = RARRAY_PTR(rb_keys);
1132
1132
  } else {
@@ -1149,8 +1149,17 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
1149
1149
  rb_grn_scan_options(rb_sort_options,
1150
1150
  "key", &rb_key,
1151
1151
  NULL);
1152
- if (RVAL2CBOOL(rb_obj_is_kind_of(rb_key, rb_cString)))
1153
- rb_key = rb_grn_table_get_column(self, rb_key);
1152
+ if (RVAL2CBOOL(rb_obj_is_kind_of(rb_key, rb_cString))) {
1153
+ VALUE resolved_rb_key;
1154
+ resolved_rb_key = rb_grn_table_get_column(self, rb_key);
1155
+ if (NIL_P(resolved_rb_key)) {
1156
+ rb_raise(rb_eArgError,
1157
+ "unknown group key: <%s>: <%s>",
1158
+ rb_grn_inspect(rb_key),
1159
+ rb_grn_inspect(self));
1160
+ }
1161
+ rb_key = resolved_rb_key;
1162
+ }
1154
1163
  keys[i].key = RVAL2GRNOBJECT(rb_key, &context);
1155
1164
  keys[i].flags = 0;
1156
1165
  }
@@ -1790,7 +1799,7 @@ rb_grn_table_select (int argc, VALUE *argv, VALUE self)
1790
1799
  result = grn_table_create(context, NULL, 0, NULL,
1791
1800
  GRN_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC,
1792
1801
  table,
1793
- 0);
1802
+ NULL);
1794
1803
  rb_result = GRNTABLE2RVAL(context, result, RB_GRN_TRUE);
1795
1804
  } else {
1796
1805
  result = RVAL2GRNTABLE(rb_result, &context);
@@ -1902,6 +1911,26 @@ rb_grn_table_merge_bang (VALUE self, VALUE rb_other)
1902
1911
  return rb_grn_table_set_operation_bang(self, rb_other, GRN_OP_ADJUST);
1903
1912
  }
1904
1913
 
1914
+ /*
1915
+ * call-seq:
1916
+ * table.support_sub_records? -> true/false
1917
+ *
1918
+ * グループ化したとき、テーブルにグループに含まれるレコード
1919
+ * 数を格納できる場合は+true+、格納できない場合は+false+を返
1920
+ * す。
1921
+ */
1922
+ static VALUE
1923
+ rb_grn_table_support_sub_records_p (VALUE self)
1924
+ {
1925
+ grn_obj *table;
1926
+
1927
+ rb_grn_table_deconstruct(SELF(self), &table, NULL,
1928
+ NULL, NULL,
1929
+ NULL, NULL, NULL,
1930
+ NULL);
1931
+ return CBOOL2RVAL(table->header.flags & GRN_OBJ_WITH_SUBREC);
1932
+ }
1933
+
1905
1934
  void
1906
1935
  rb_grn_init_table (VALUE mGrn)
1907
1936
  {
@@ -1969,6 +1998,9 @@ rb_grn_init_table (VALUE mGrn)
1969
1998
  rb_define_method(rb_cGrnTable, "merge!",
1970
1999
  rb_grn_table_merge_bang, 1);
1971
2000
 
2001
+ rb_define_method(rb_cGrnTable, "support_sub_records?",
2002
+ rb_grn_table_support_sub_records_p, 0);
2003
+
1972
2004
  rb_grn_init_table_key_support(mGrn);
1973
2005
  rb_grn_init_array(mGrn);
1974
2006
  rb_grn_init_hash(mGrn);
@@ -329,9 +329,17 @@ rb_grn_bulk_from_ruby_object_with_type (VALUE object, grn_ctx *context,
329
329
  uint64_t uint64_value;
330
330
  int64_t time_value;
331
331
  double double_value;
332
- grn_id range;
332
+ grn_id record_id, range;
333
333
  VALUE rb_type_object;
334
334
  grn_obj_flags flags = 0;
335
+ rb_grn_boolean string_p, table_type_p;
336
+
337
+ string_p = rb_type(object) == T_STRING;
338
+ table_type_p = (GRN_TABLE_HASH_KEY <= type->header.type &&
339
+ type->header.type <= GRN_TABLE_VIEW);
340
+ if (string_p && !table_type_p) {
341
+ return RVAL2GRNBULK(object, context, bulk);
342
+ }
335
343
 
336
344
  switch (type_id) {
337
345
  case GRN_DB_INT32:
@@ -418,7 +426,17 @@ rb_grn_bulk_from_ruby_object_with_type (VALUE object, grn_ctx *context,
418
426
  rb_grn_inspect(rb_type_object));
419
427
  break;
420
428
  default:
421
- return RVAL2GRNBULK(object, context, bulk);
429
+ if (table_type_p &&
430
+ (NIL_P(object) || (string_p && RSTRING_LEN(object) == 0))) {
431
+ record_id = GRN_ID_NIL;
432
+ string = (const char *)&record_id;
433
+ size = sizeof(record_id);
434
+ if (bulk && bulk->header.domain != type_id) {
435
+ grn_obj_reinit(context, bulk, type_id, 0);
436
+ }
437
+ } else {
438
+ return RVAL2GRNBULK(object, context, bulk);
439
+ }
422
440
  break;
423
441
  }
424
442
 
@@ -20,67 +20,105 @@
20
20
 
21
21
  rb_grn_boolean rb_grn_exited = RB_GRN_FALSE;
22
22
 
23
- static VALUE
24
- finish_groonga (VALUE self, VALUE object_id)
23
+ static void
24
+ finish_groonga (VALUE data)
25
25
  {
26
26
  debug("finish\n");
27
27
  grn_fin();
28
28
  rb_grn_exited = RB_GRN_TRUE;
29
+ }
29
30
 
30
- return Qnil;
31
+ static void
32
+ rb_grn_init_runtime_version (VALUE mGrn)
33
+ {
34
+ const char *component_start, *component_end;
35
+ int component_length;
36
+ VALUE runtime_version;
37
+ VALUE major, minor, micro, tag;
38
+
39
+ runtime_version = rb_ary_new();
40
+
41
+ component_start = grn_get_version();
42
+ component_end = strstr(component_start, ".");
43
+ component_length = component_end - component_start;
44
+ major = rb_str_new(component_start, component_length);
45
+ rb_ary_push(runtime_version, rb_Integer(major));
46
+
47
+ component_start = component_end + 1;
48
+ component_end = strstr(component_start, ".");
49
+ component_length = component_end - component_start;
50
+ minor = rb_str_new(component_start, component_length);
51
+ rb_ary_push(runtime_version, rb_Integer(minor));
52
+
53
+ component_start = component_end + 1;
54
+ component_end = strstr(component_start, "-");
55
+ if (component_end) {
56
+ component_length = component_end - component_start;
57
+ } else {
58
+ component_length = strlen(component_start);
59
+ }
60
+ micro = rb_str_new(component_start, component_length);
61
+ rb_ary_push(runtime_version, rb_Integer(micro));
62
+
63
+ if (component_end) {
64
+ tag = rb_str_new2(component_end + 1);
65
+ } else {
66
+ tag = Qnil;
67
+ }
68
+ rb_ary_push(runtime_version, tag);
69
+
70
+ rb_obj_freeze(runtime_version);
71
+ /*
72
+ * 利用しているgroongaのバージョン。<tt>[メジャーバージョ
73
+ * ン, マイナーバージョン, マイクロバージョン, タグ]</tt>の
74
+ * 配列。
75
+ */
76
+ rb_define_const(mGrn, "VERSION", runtime_version);
31
77
  }
32
78
 
33
- void
34
- Init_groonga (void)
79
+ static void
80
+ rb_grn_init_version (VALUE mGrn)
35
81
  {
36
- VALUE mGrn;
37
- VALUE cGrnBuildVersion, cGrnBindingsVersion;
38
- VALUE groonga_finalizer, groonga_finalizer_keeper;
82
+ VALUE build_version, bindings_version;
39
83
 
40
- mGrn = rb_define_module("Groonga");
84
+ rb_grn_init_runtime_version(mGrn);
41
85
 
42
- groonga_finalizer = rb_funcall(rb_cObject, rb_intern("new"), 0);
43
- rb_define_singleton_method(groonga_finalizer, "call", finish_groonga, 1);
44
- groonga_finalizer_keeper = rb_funcall(rb_cObject, rb_intern("new"), 0);
45
- rb_funcall(rb_const_get(rb_cObject, rb_intern("ObjectSpace")),
46
- rb_intern("define_finalizer"),
47
- 2, groonga_finalizer_keeper, groonga_finalizer);
48
- rb_iv_set(mGrn, "finalizer", groonga_finalizer_keeper);
49
-
50
- cGrnBuildVersion = rb_ary_new3(3,
51
- INT2NUM(GRN_MAJOR_VERSION),
52
- INT2NUM(GRN_MINOR_VERSION),
53
- INT2NUM(GRN_MICRO_VERSION));
54
- rb_obj_freeze(cGrnBuildVersion);
86
+ build_version = rb_ary_new3(3,
87
+ INT2NUM(GRN_MAJOR_VERSION),
88
+ INT2NUM(GRN_MINOR_VERSION),
89
+ INT2NUM(GRN_MICRO_VERSION));
90
+ rb_obj_freeze(build_version);
55
91
  /*
56
92
  * ビルドしたgroongaのバージョン。<tt>[メジャーバージョン,
57
93
  * マイナーバージョン, マイクロバージョン]</tt>の配列。
58
94
  */
59
- rb_define_const(mGrn, "BUILD_VERSION", cGrnBuildVersion);
60
-
61
- /* FIXME: API to get runtime groonga version doesn't exist */
95
+ rb_define_const(mGrn, "BUILD_VERSION", build_version);
62
96
 
63
- /*
64
- * 利用しているgroongaのバージョン(にしたい。現在は
65
- * BUILD_VERSIONと同じ)。<tt>[メジャーバージョ
66
- * ン, マイナーバージョン, マイクロバージョン]</tt>の配列。
67
- */
68
- rb_define_const(mGrn, "VERSION", cGrnBuildVersion);
69
-
70
- cGrnBindingsVersion = rb_ary_new3(3,
71
- INT2NUM(RB_GRN_MAJOR_VERSION),
72
- INT2NUM(RB_GRN_MINOR_VERSION),
73
- INT2NUM(RB_GRN_MICRO_VERSION));
74
- rb_obj_freeze(cGrnBindingsVersion);
97
+ bindings_version = rb_ary_new3(3,
98
+ INT2NUM(RB_GRN_MAJOR_VERSION),
99
+ INT2NUM(RB_GRN_MINOR_VERSION),
100
+ INT2NUM(RB_GRN_MICRO_VERSION));
101
+ rb_obj_freeze(bindings_version);
75
102
  /*
76
103
  * Ruby/groongaのバージョン。<tt>[メジャーバージョン, マ
77
104
  * イナーバージョン, マイクロバージョン]</tt>の配列。
78
105
  */
79
- rb_define_const(mGrn, "BINDINGS_VERSION", cGrnBindingsVersion);
106
+ rb_define_const(mGrn, "BINDINGS_VERSION", bindings_version);
107
+ }
108
+
109
+ void
110
+ Init_groonga (void)
111
+ {
112
+ VALUE mGrn;
113
+
114
+ mGrn = rb_define_module("Groonga");
80
115
 
81
116
  rb_grn_init_exception(mGrn);
82
117
 
83
118
  rb_grn_rc_check(grn_init(), Qnil);
119
+ rb_set_end_proc(finish_groonga, Qnil);
120
+
121
+ rb_grn_init_version(mGrn);
84
122
 
85
123
  rb_grn_init_utils(mGrn);
86
124
  rb_grn_init_encoding(mGrn);
data/extconf.rb CHANGED
@@ -108,6 +108,7 @@ FileUtils.mkdir_p(source_ext_dir.to_s)
108
108
 
109
109
  require 'rbconfig'
110
110
  ext_dir = base_dir + "ext" + "groonga"
111
+ definitions = ""
111
112
  Dir.chdir(source_ext_dir.to_s) do
112
113
  config = Proc.new do |key|
113
114
  RbConfig::CONFIG[key]
@@ -116,15 +117,30 @@ Dir.chdir(source_ext_dir.to_s) do
116
117
  message("checking in #{ext_dir}...\n")
117
118
  system("#{ruby} #{ext_dir + 'extconf.rb'}") or exit 1
118
119
  message("checking in #{ext_dir}: done.\n")
120
+ File.open("Makefile") do |file|
121
+ file.each_line do |line|
122
+ case line
123
+ when /\A\w+\s*=/
124
+ definitions << line
125
+ end
126
+ end
127
+ end
119
128
  end
120
129
 
121
130
  message("creating top-level Makefile\n")
122
131
  File.open("Makefile", "w") do |makefile|
132
+ makefile.puts(definitions)
133
+ makefile.puts
123
134
  targets = ["all", "clean", "install"]
124
135
  targets.each do |target|
136
+ # overriding RUBYARCHDIR and RUBYLIBDIR for RubyGems.
125
137
  makefile.puts <<-EOM
126
138
  #{target}:
127
- cd #{source_ext_dir}; $(MAKE) $(MAKE_ARGS) #{target}
139
+ cd #{source_ext_dir}; \\
140
+ $(MAKE) $(MAKE_ARGS) \\
141
+ RUBYARCHDIR=$(RUBYARCHDIR) \\
142
+ RUBYLIBDIR=$(RUBYLIBDIR) \\
143
+ #{target}
128
144
  EOM
129
145
  end
130
146
  end
data/html/developer.html CHANGED
@@ -35,9 +35,9 @@
35
35
  ここでは、開発に必要となる情報を提供します。
36
36
  </p>
37
37
 
38
- <h2>リポジトリ</h2>
38
+ <h2 id="repository">リポジトリ</h2>
39
39
  <p>
40
- rroongaActiveGroongaのリポジトリはGitHub上にあります。
40
+ rroongaActiveGroonga、rackngaのリポジトリはGitHub上にあります。
41
41
  gitを利用しており、それぞれ以下のようにチェックアウトできます。
42
42
  </p>
43
43
  <dl>
@@ -45,10 +45,12 @@
45
45
  <dd><pre class="command">% git clone git://github.com/ranguba/rroonga.git</pre></dd>
46
46
  <dt><a href="http://github.com/ranguba/activegroonga/">ActiveGroonga</a></dt>
47
47
  <dd><pre class="command">% git clone git://github.com/ranguba/activegroonga.git</pre></dd>
48
+ <dt><a href="http://github.com/ranguba/racknga/">racknga</a></dt>
49
+ <dd><pre class="command">% git clone git://github.com/ranguba/racknga.git</pre></dd>
48
50
  </dl>
49
51
 
50
52
  <p>
51
- rroongaおよびActiveGroongaを利用したサンプルプログラムもリポジトリにあります。
53
+ rroongaActiveGroonga、rackngaを利用したサンプルプログラムもリポジトリにあります。
52
54
  サンプルプログラムは以下のようにチェックアウトできます。
53
55
  </p>
54
56
  <dl>
@@ -56,27 +58,45 @@
56
58
  <dd><pre class="command">% git clone git://github.com/ranguba/examples.git</pre></dd>
57
59
  </dl>
58
60
 
59
- <h2>バグ報告・メーリングリスト</h2>
61
+ <h2 id="how-to-build">ビルド方法</h2>
62
+ <p>
63
+ rroongaをビルドするためにはextconf.rbとMakefileを使います。Rakefileは使いません。
64
+ </p>
65
+ <p>
66
+ ビルドしたいrubyでextconf.rbを実行してから、makeを実行します。
67
+ </p>
68
+ <pre class="command">% ruby extconf.rb
69
+ % make</pre>
70
+ <p>
71
+ うまくいくとext/groonga/groonga.soができます。インストールせずにそのまま使う場合は以下のように$LOAD_PATHを設定してからrequireしてください。
72
+ </p>
73
+ <pre class="command">% irb -I lib -I ext/groonga -r groonga</pre>
74
+
75
+ <h2 id="contact">バグ報告・メーリングリスト</h2>
60
76
  <p>
61
77
  バグ報告は<a href="http://lists.sourceforge.jp/mailman/listinfo/groonga-dev">groongaのメーリングリスト</a>または<a href="http://redmine.groonga.org/projects/rroonga/issues/new">Redmine</a>にお願いします。
62
78
  また、疑問点・意見・パッチなどもgroongaのメーリングリストにお願いします。
63
79
  </p>
64
80
 
65
- <h2>コミットメール</h2>
81
+ <h2 id="commit-mail">コミットメール</h2>
66
82
  <p>
67
83
  リポジトリにコミットがあるとそのコミットの差分が<a href="http://rubyforge.org/mailman/listinfo/groonga-commit">groonga-commitメーリングリスト</a>に流れます。
68
84
  開発に興味がある場合はgroonga-commitメーリングリストを購読してください。
69
85
  </p>
70
86
 
71
- <h2>ドキュメント</h2>
87
+ <h2 id="document">ドキュメント</h2>
72
88
  <p>
73
89
  ドキュメントはソースコード中にRDocで記述しています。
74
- 生成されたドキュメントはHTMLに変換され、<a href="rroonga/">リファレンスマニュアル</a>で公開されます。
90
+ 生成されたドキュメントはHTMLに変換され、<a href="rroonga/">リファレンスマニュアル</a>として公開されます。
75
91
  </p>
76
92
  <p>
77
93
  いつかは英語と日本語を用意できればよいとは思いますが、とりあえず、現在は日本語のみ用意しています。
78
94
  日本語ドキュメントは直接ソースコード中に記述しています。RDocで多言語に対応したリファレンスマニュアルを作成する仕組みや、英語のドキュメント作成を手伝ってくれる人を募集しています。
79
95
  </p>
96
+ <p>
97
+ また、<a href="http://redmine.groonga.org/projects/show/rroonga">Redmine</a>上の<a href="http://redmine.groonga.org/wiki/rroonga">Wiki</a>にもドキュメントがあります。
98
+ Wikiにはリファレンスマニュアルで扱わないような内容を中心に記述します。Tipsや関連情報など、必要そうな情報があったら<a href="#contact">メーリングリスト</a>で報告したり、Redmineに登録して直接編集してください。
99
+ </p>
80
100
  </div>
81
101
 
82
102
  <div class="sidebar">
@@ -96,6 +116,11 @@
96
116
  <img src="rubyforge.png" width="120" height="24" border="0" alt="ラングバプロジェクトはRubyForge.orgにホスティングしてもらっています。" />
97
117
  </a>
98
118
  </p>
119
+ <p id="sponsor-github">
120
+ <a href="http://github.com/ranguba/">
121
+ ラングバプロジェクトはGitHubにホスティングしてもらっています。
122
+ </a>
123
+ </p>
99
124
  <p id="sponsor-tango">
100
125
  <a href="http://tango.freedesktop.org/">
101
126
  <img width="120" height="53" border="0" alt="Tango Desktop Projectのアイコンを利用しています。" src="tango-logo.png" />
data/html/footer.html.erb CHANGED
@@ -6,6 +6,11 @@
6
6
  <img src="/rubyforge.png" width="120" height="24" border="0" alt="Ruby/groongaプロジェクトはRubyForge.orgにホスティングしてもらっています。" />
7
7
  </a>
8
8
  </p>
9
+ <p id="sponsor-github">
10
+ <a href="http://github.com/ranguba/">
11
+ ラングバプロジェクトはGitHubにホスティングしてもらっています。
12
+ </a>
13
+ </p>
9
14
  <p id="sponsor-tango">
10
15
  <a href="http://tango.freedesktop.org/">
11
16
  <img width="120" height="53" border="0" alt="Tango Desktop Projectのアイコンを利用しています。" src="/tango-logo.png" />
@@ -0,0 +1,393 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+ <svg
4
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
5
+ xmlns:cc="http://creativecommons.org/ns#"
6
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7
+ xmlns:svg="http://www.w3.org/2000/svg"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ xmlns:xlink="http://www.w3.org/1999/xlink"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="38"
13
+ height="38"
14
+ id="svg7854"
15
+ sodipodi:version="0.32"
16
+ inkscape:version="0.46"
17
+ version="1.0"
18
+ sodipodi:docname="heading-mark.svg"
19
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
20
+ inkscape:export-filename="/home/kou/work/c/milter-manager/html/heading-mark.png"
21
+ inkscape:export-xdpi="72"
22
+ inkscape:export-ydpi="72">
23
+ <defs
24
+ id="defs7856">
25
+ <inkscape:perspective
26
+ sodipodi:type="inkscape:persp3d"
27
+ inkscape:vp_x="0 : 24 : 1"
28
+ inkscape:vp_y="0 : 1000 : 0"
29
+ inkscape:vp_z="48 : 24 : 1"
30
+ inkscape:persp3d-origin="24 : 16 : 1"
31
+ id="perspective26" />
32
+ <linearGradient
33
+ inkscape:collect="always"
34
+ id="linearGradient5202">
35
+ <stop
36
+ style="stop-color:#ffffff;stop-opacity:1;"
37
+ offset="0"
38
+ id="stop5204" />
39
+ <stop
40
+ style="stop-color:#ffffff;stop-opacity:0;"
41
+ offset="1"
42
+ id="stop5206" />
43
+ </linearGradient>
44
+ <linearGradient
45
+ inkscape:collect="always"
46
+ id="linearGradient5190">
47
+ <stop
48
+ style="stop-color:#f57900;stop-opacity:1;"
49
+ offset="0"
50
+ id="stop5192" />
51
+ <stop
52
+ style="stop-color:#fcaf3e;stop-opacity:1"
53
+ offset="1"
54
+ id="stop5194" />
55
+ </linearGradient>
56
+ <linearGradient
57
+ inkscape:collect="always"
58
+ id="linearGradient5130">
59
+ <stop
60
+ style="stop-color:#000000;stop-opacity:1;"
61
+ offset="0"
62
+ id="stop5132" />
63
+ <stop
64
+ style="stop-color:#000000;stop-opacity:0;"
65
+ offset="1"
66
+ id="stop5134" />
67
+ </linearGradient>
68
+ <radialGradient
69
+ inkscape:collect="always"
70
+ xlink:href="#linearGradient5130"
71
+ id="radialGradient5136"
72
+ cx="22"
73
+ cy="38.5"
74
+ fx="22"
75
+ fy="38.5"
76
+ r="13"
77
+ gradientTransform="matrix(1,0,0,0.5,0,19.25)"
78
+ gradientUnits="userSpaceOnUse" />
79
+ <filter
80
+ inkscape:collect="always"
81
+ x="-0.17349398"
82
+ width="1.346988"
83
+ y="-0.34698796"
84
+ height="1.6939759"
85
+ id="filter5186">
86
+ <feGaussianBlur
87
+ inkscape:collect="always"
88
+ stdDeviation="1.8795181"
89
+ id="feGaussianBlur5188" />
90
+ </filter>
91
+ <radialGradient
92
+ inkscape:collect="always"
93
+ xlink:href="#linearGradient5190"
94
+ id="radialGradient5200"
95
+ gradientUnits="userSpaceOnUse"
96
+ gradientTransform="matrix(0,-1.2519025,47.292244,0,-1418.0196,57.3867)"
97
+ cx="21.525126"
98
+ cy="30.439341"
99
+ fx="21.525126"
100
+ fy="30.439341"
101
+ r="18.888176" />
102
+ <linearGradient
103
+ inkscape:collect="always"
104
+ xlink:href="#linearGradient5202"
105
+ id="linearGradient5208"
106
+ x1="22.109375"
107
+ y1="11.34375"
108
+ x2="22.109375"
109
+ y2="49.612667"
110
+ gradientUnits="userSpaceOnUse" />
111
+ <radialGradient
112
+ inkscape:collect="always"
113
+ xlink:href="#linearGradient5130"
114
+ id="radialGradient2920"
115
+ gradientUnits="userSpaceOnUse"
116
+ gradientTransform="matrix(1,0,0,0.5,0,19.25)"
117
+ cx="22"
118
+ cy="38.5"
119
+ fx="22"
120
+ fy="38.5"
121
+ r="13" />
122
+ <radialGradient
123
+ inkscape:collect="always"
124
+ xlink:href="#linearGradient5190"
125
+ id="radialGradient2922"
126
+ gradientUnits="userSpaceOnUse"
127
+ gradientTransform="matrix(0,-1.2519025,47.292244,0,-1418.0196,57.3867)"
128
+ cx="21.525126"
129
+ cy="30.439341"
130
+ fx="21.525126"
131
+ fy="30.439341"
132
+ r="18.888176" />
133
+ <linearGradient
134
+ inkscape:collect="always"
135
+ xlink:href="#linearGradient5202"
136
+ id="linearGradient2924"
137
+ gradientUnits="userSpaceOnUse"
138
+ x1="22.109375"
139
+ y1="11.34375"
140
+ x2="22.109375"
141
+ y2="49.612667" />
142
+ <linearGradient
143
+ inkscape:collect="always"
144
+ xlink:href="#linearGradient5202"
145
+ id="linearGradient2928"
146
+ gradientUnits="userSpaceOnUse"
147
+ x1="22.109375"
148
+ y1="11.34375"
149
+ x2="22.109375"
150
+ y2="49.612667" />
151
+ <radialGradient
152
+ inkscape:collect="always"
153
+ xlink:href="#linearGradient5130"
154
+ id="radialGradient2406"
155
+ gradientUnits="userSpaceOnUse"
156
+ gradientTransform="matrix(1,0,0,0.5,0,19.25)"
157
+ cx="22"
158
+ cy="38.5"
159
+ fx="22"
160
+ fy="38.5"
161
+ r="13" />
162
+ <radialGradient
163
+ inkscape:collect="always"
164
+ xlink:href="#linearGradient5190"
165
+ id="radialGradient2408"
166
+ gradientUnits="userSpaceOnUse"
167
+ gradientTransform="matrix(0,-1.2519025,47.292244,0,-1418.0196,57.3867)"
168
+ cx="21.525126"
169
+ cy="30.439341"
170
+ fx="21.525126"
171
+ fy="30.439341"
172
+ r="18.888176" />
173
+ <linearGradient
174
+ inkscape:collect="always"
175
+ xlink:href="#linearGradient5202"
176
+ id="linearGradient2410"
177
+ gradientUnits="userSpaceOnUse"
178
+ x1="22.109375"
179
+ y1="11.34375"
180
+ x2="22.109375"
181
+ y2="49.612667" />
182
+ <linearGradient
183
+ inkscape:collect="always"
184
+ xlink:href="#linearGradient5202"
185
+ id="linearGradient2414"
186
+ gradientUnits="userSpaceOnUse"
187
+ x1="22.109375"
188
+ y1="11.34375"
189
+ x2="22.109375"
190
+ y2="49.612667" />
191
+ <radialGradient
192
+ inkscape:collect="always"
193
+ xlink:href="#linearGradient5130"
194
+ id="radialGradient2410"
195
+ gradientUnits="userSpaceOnUse"
196
+ gradientTransform="matrix(1,0,0,0.5,0,19.25)"
197
+ cx="22"
198
+ cy="38.5"
199
+ fx="22"
200
+ fy="38.5"
201
+ r="13" />
202
+ <radialGradient
203
+ inkscape:collect="always"
204
+ xlink:href="#linearGradient5190"
205
+ id="radialGradient2412"
206
+ gradientUnits="userSpaceOnUse"
207
+ gradientTransform="matrix(0,-1.2519025,47.292244,0,-1418.0196,57.3867)"
208
+ cx="21.525126"
209
+ cy="30.439341"
210
+ fx="21.525126"
211
+ fy="30.439341"
212
+ r="18.888176" />
213
+ <linearGradient
214
+ inkscape:collect="always"
215
+ xlink:href="#linearGradient5202"
216
+ id="linearGradient2415"
217
+ gradientUnits="userSpaceOnUse"
218
+ x1="22.109375"
219
+ y1="11.34375"
220
+ x2="22.109375"
221
+ y2="49.612667" />
222
+ <linearGradient
223
+ inkscape:collect="always"
224
+ xlink:href="#linearGradient5202"
225
+ id="linearGradient2419"
226
+ gradientUnits="userSpaceOnUse"
227
+ x1="22.109375"
228
+ y1="11.34375"
229
+ x2="22.109375"
230
+ y2="49.612667" />
231
+ <radialGradient
232
+ inkscape:collect="always"
233
+ xlink:href="#linearGradient5130"
234
+ id="radialGradient2414"
235
+ gradientUnits="userSpaceOnUse"
236
+ gradientTransform="matrix(1,0,0,0.5,0,19.25)"
237
+ cx="22"
238
+ cy="38.5"
239
+ fx="22"
240
+ fy="38.5"
241
+ r="13" />
242
+ <radialGradient
243
+ inkscape:collect="always"
244
+ xlink:href="#linearGradient5190"
245
+ id="radialGradient2416"
246
+ gradientUnits="userSpaceOnUse"
247
+ gradientTransform="matrix(0,-1.2519025,47.292244,0,-1418.0196,57.3867)"
248
+ cx="21.525126"
249
+ cy="30.439341"
250
+ fx="21.525126"
251
+ fy="30.439341"
252
+ r="18.888176" />
253
+ <linearGradient
254
+ inkscape:collect="always"
255
+ xlink:href="#linearGradient5202"
256
+ id="linearGradient2418"
257
+ gradientUnits="userSpaceOnUse"
258
+ x1="22.109375"
259
+ y1="11.34375"
260
+ x2="22.109375"
261
+ y2="49.612667" />
262
+ <linearGradient
263
+ inkscape:collect="always"
264
+ xlink:href="#linearGradient5202"
265
+ id="linearGradient2416"
266
+ gradientUnits="userSpaceOnUse"
267
+ x1="22.109375"
268
+ y1="11.34375"
269
+ x2="22.109375"
270
+ y2="49.612667" />
271
+ <radialGradient
272
+ inkscape:collect="always"
273
+ xlink:href="#linearGradient5130"
274
+ id="radialGradient2419"
275
+ gradientUnits="userSpaceOnUse"
276
+ gradientTransform="matrix(1,0,0,0.5,0,19.25)"
277
+ cx="22"
278
+ cy="38.5"
279
+ fx="22"
280
+ fy="38.5"
281
+ r="13" />
282
+ <radialGradient
283
+ inkscape:collect="always"
284
+ xlink:href="#linearGradient5190"
285
+ id="radialGradient2421"
286
+ gradientUnits="userSpaceOnUse"
287
+ gradientTransform="matrix(0,-1.2519025,47.292244,0,-1418.0196,57.3867)"
288
+ cx="21.525126"
289
+ cy="30.439341"
290
+ fx="21.525126"
291
+ fy="30.439341"
292
+ r="18.888176" />
293
+ </defs>
294
+ <sodipodi:namedview
295
+ id="base"
296
+ pagecolor="#ffffff"
297
+ bordercolor="#e0e0e0"
298
+ borderopacity="1"
299
+ gridtolerance="10000"
300
+ guidetolerance="10"
301
+ objecttolerance="10"
302
+ inkscape:pageopacity="0.0"
303
+ inkscape:pageshadow="2"
304
+ inkscape:zoom="8"
305
+ inkscape:cx="36.699227"
306
+ inkscape:cy="11.928865"
307
+ inkscape:document-units="px"
308
+ inkscape:current-layer="layer1"
309
+ width="38px"
310
+ height="48px"
311
+ inkscape:showpageshadow="false"
312
+ inkscape:window-width="1187"
313
+ inkscape:window-height="818"
314
+ inkscape:window-x="81"
315
+ inkscape:window-y="30"
316
+ showgrid="false"
317
+ showguides="false">
318
+ <inkscape:grid
319
+ type="xygrid"
320
+ id="grid4614"
321
+ visible="true"
322
+ enabled="true" />
323
+ </sodipodi:namedview>
324
+ <metadata
325
+ id="metadata7859">
326
+ <rdf:RDF>
327
+ <cc:Work
328
+ rdf:about="">
329
+ <dc:format>image/svg+xml</dc:format>
330
+ <dc:type
331
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
332
+ <dc:creator>
333
+ <cc:Agent>
334
+ <dc:title>Jakub Steiner</dc:title>
335
+ </cc:Agent>
336
+ </dc:creator>
337
+ <dc:source>http://jimmac.musichall.cz</dc:source>
338
+ <cc:license
339
+ rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
340
+ </cc:Work>
341
+ <cc:License
342
+ rdf:about="http://creativecommons.org/licenses/publicdomain/">
343
+ <cc:permits
344
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
345
+ <cc:permits
346
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
347
+ <cc:permits
348
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
349
+ </cc:License>
350
+ </rdf:RDF>
351
+ </metadata>
352
+ <g
353
+ inkscape:label="Layer 1"
354
+ inkscape:groupmode="layer"
355
+ id="layer1">
356
+ <path
357
+ sodipodi:type="arc"
358
+ style="opacity:0.43373497;fill:url(#radialGradient2419);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter5186);enable-background:accumulate"
359
+ id="path4551"
360
+ sodipodi:cx="22"
361
+ sodipodi:cy="38.5"
362
+ sodipodi:rx="13"
363
+ sodipodi:ry="6.5"
364
+ d="M 35,38.5 A 13,6.5 0 1 1 9,38.5 A 13,6.5 0 1 1 35,38.5 z"
365
+ transform="matrix(0.9938742,0,0,0.9790959,-2.1298769,-8.8129667)" />
366
+ <path
367
+ sodipodi:type="star"
368
+ style="fill:url(#radialGradient2421);fill-opacity:1;fill-rule:nonzero;stroke:#ce5c00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
369
+ id="path4547"
370
+ sodipodi:sides="8"
371
+ sodipodi:cx="22.097088"
372
+ sodipodi:cy="22.720934"
373
+ sodipodi:r1="18.388176"
374
+ sodipodi:r2="12.035836"
375
+ sodipodi:arg1="0.78539816"
376
+ sodipodi:arg2="1.1780972"
377
+ inkscape:flatsided="false"
378
+ inkscape:rounded="0"
379
+ inkscape:randomized="0"
380
+ d="M 35.099492,35.723338 L 26.703003,33.840596 L 22.097088,41.10911 L 17.491173,33.840597 L 9.094684,35.723338 L 10.977425,27.32685 L 3.7089119,22.720934 L 10.977425,18.115019 L 9.0946839,9.71853 L 17.491172,11.601271 L 22.097088,4.3327579 L 26.703002,11.601271 L 35.099492,9.71853 L 33.21675,18.115018 L 40.485264,22.720934 L 33.216751,27.326849 L 35.099492,35.723338 z"
381
+ transform="matrix(0.8403489,0,0,0.8278536,0.4912589,-0.2493893)" />
382
+ <path
383
+ sodipodi:type="inkscape:offset"
384
+ inkscape:radius="-0.97009587"
385
+ inkscape:original="M 22.09375 4.34375 L 17.5 11.59375 L 9.09375 9.71875 L 10.96875 18.125 L 3.71875 22.71875 L 10.96875 27.3125 L 9.09375 35.71875 L 17.5 33.84375 L 22.09375 41.09375 L 26.6875 33.84375 L 35.09375 35.71875 L 33.21875 27.3125 L 40.5 22.71875 L 33.21875 18.125 L 35.09375 9.71875 L 26.6875 11.59375 L 22.09375 4.34375 z "
386
+ xlink:href="#path4547"
387
+ style="opacity:0.33734945;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2416);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
388
+ id="path5198"
389
+ inkscape:href="#path4547"
390
+ d="M 22.09375,6.15625 L 18.3125,12.125 C 18.087547,12.462771 17.676134,12.624843 17.28125,12.53125 L 10.375,11 L 11.90625,17.90625 C 11.999843,18.301134 11.837771,18.712547 11.5,18.9375 L 5.53125,22.71875 L 11.5,26.5 C 11.837771,26.724953 11.999843,27.136366 11.90625,27.53125 L 10.375,34.4375 L 17.28125,32.90625 C 17.676134,32.812657 18.087547,32.974729 18.3125,33.3125 L 22.09375,39.28125 L 25.875,33.3125 C 26.099953,32.974729 26.511366,32.812657 26.90625,32.90625 L 33.8125,34.4375 L 32.28125,27.53125 C 32.187657,27.136366 32.349729,26.724953 32.6875,26.5 L 38.6875,22.71875 L 32.6875,18.9375 C 32.349729,18.712547 32.187657,18.301134 32.28125,17.90625 L 33.8125,11 L 26.90625,12.53125 C 26.511366,12.624843 26.099953,12.462771 25.875,12.125 L 22.09375,6.15625 z"
391
+ transform="matrix(0.8444266,0,0,0.8444266,0.2191795,-0.5748125)" />
392
+ </g>
393
+ </svg>