rroonga 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/AUTHORS +5 -0
  2. data/Gemfile +20 -0
  3. data/Rakefile +187 -0
  4. data/doc/text/news.textile +10 -2
  5. data/doc/text/tutorial.textile +0 -2
  6. data/ext/groonga/extconf.rb +7 -1
  7. data/ext/groonga/rb-grn-accessor.c +11 -11
  8. data/ext/groonga/rb-grn-array.c +25 -25
  9. data/ext/groonga/rb-grn-column.c +106 -106
  10. data/ext/groonga/rb-grn-context.c +121 -121
  11. data/ext/groonga/rb-grn-database.c +78 -78
  12. data/ext/groonga/rb-grn-double-array-trie.c +92 -92
  13. data/ext/groonga/rb-grn-encoding-support.c +1 -1
  14. data/ext/groonga/rb-grn-encoding.c +28 -28
  15. data/ext/groonga/rb-grn-exception.c +9 -9
  16. data/ext/groonga/rb-grn-expression-builder.c +6 -6
  17. data/ext/groonga/rb-grn-expression.c +87 -87
  18. data/ext/groonga/rb-grn-fix-size-column.c +12 -12
  19. data/ext/groonga/rb-grn-geo-point.c +2 -2
  20. data/ext/groonga/rb-grn-hash.c +38 -38
  21. data/ext/groonga/rb-grn-index-column.c +191 -191
  22. data/ext/groonga/rb-grn-index-cursor.c +29 -29
  23. data/ext/groonga/rb-grn-logger.c +36 -36
  24. data/ext/groonga/rb-grn-normalizer.c +10 -10
  25. data/ext/groonga/rb-grn-patricia-trie.c +196 -196
  26. data/ext/groonga/rb-grn-plugin.c +5 -5
  27. data/ext/groonga/rb-grn-posting.c +2 -2
  28. data/ext/groonga/rb-grn-procedure.c +2 -2
  29. data/ext/groonga/rb-grn-query-logger.c +1 -1
  30. data/ext/groonga/rb-grn-record.c +1 -1
  31. data/ext/groonga/rb-grn-snippet.c +14 -14
  32. data/ext/groonga/rb-grn-table-cursor-key-support.c +4 -4
  33. data/ext/groonga/rb-grn-table-cursor.c +52 -52
  34. data/ext/groonga/rb-grn-table-key-support.c +209 -209
  35. data/ext/groonga/rb-grn-type.c +18 -18
  36. data/ext/groonga/rb-grn-utils.c +332 -314
  37. data/ext/groonga/rb-grn-variable-size-column.c +34 -34
  38. data/ext/groonga/rb-grn-variable.c +2 -2
  39. data/ext/groonga/rb-grn.h +240 -232
  40. data/ext/groonga/rb-groonga.c +10 -10
  41. data/rroonga-build.rb +7 -0
  42. data/rroonga.gemspec +1 -1
  43. data/test/test-hash.rb +4 -4
  44. data/test/test-index-column.rb +271 -257
  45. data/test/test-table-key-support.rb +78 -0
  46. data/test/test-table.rb +78 -51
  47. metadata +195 -164
  48. checksums.yaml +0 -7
@@ -35,7 +35,7 @@ grn_obj *
35
35
  rb_grn_type_from_ruby_object (VALUE object)
36
36
  {
37
37
  if (!RVAL2CBOOL(rb_obj_is_kind_of(object, rb_cGrnType))) {
38
- rb_raise(rb_eTypeError, "not a groonga type");
38
+ rb_raise(rb_eTypeError, "not a groonga type");
39
39
  }
40
40
 
41
41
  return RVAL2GRNOBJECT(object, NULL);
@@ -43,7 +43,7 @@ rb_grn_type_from_ruby_object (VALUE object)
43
43
 
44
44
  VALUE
45
45
  rb_grn_type_to_ruby_object (grn_ctx *context, grn_obj *type,
46
- grn_bool owner)
46
+ grn_bool owner)
47
47
  {
48
48
  return GRNOBJECT2RVAL(rb_cGrnType, context, type, owner);
49
49
  }
@@ -82,10 +82,10 @@ rb_grn_type_initialize (int argc, VALUE *argv, VALUE self)
82
82
  rb_scan_args(argc, argv, "11", &rb_name, &options);
83
83
 
84
84
  rb_grn_scan_options(options,
85
- "context", &rb_context,
86
- "type", &rb_type,
87
- "size", &rb_size,
88
- NULL);
85
+ "context", &rb_context,
86
+ "type", &rb_type,
87
+ "size", &rb_size,
88
+ NULL);
89
89
 
90
90
  name = StringValuePtr(rb_name);
91
91
  name_size = RSTRING_LEN(rb_name);
@@ -93,25 +93,25 @@ rb_grn_type_initialize (int argc, VALUE *argv, VALUE self)
93
93
  context = rb_grn_context_ensure(&rb_context);
94
94
 
95
95
  if (NIL_P(rb_type) ||
96
- rb_grn_equal_option(rb_type, "variable")) {
96
+ rb_grn_equal_option(rb_type, "variable")) {
97
97
  flags = GRN_OBJ_KEY_VAR_SIZE;
98
98
  } else if (rb_grn_equal_option(rb_type, "integer") ||
99
99
  rb_grn_equal_option(rb_type, "int")) {
100
- flags = GRN_OBJ_KEY_INT;
100
+ flags = GRN_OBJ_KEY_INT;
101
101
  size = sizeof(int);
102
102
  } else if (rb_grn_equal_option(rb_type, "unsigned_integer") ||
103
- rb_grn_equal_option(rb_type, "uint")) {
104
- flags = GRN_OBJ_KEY_UINT;
103
+ rb_grn_equal_option(rb_type, "uint")) {
104
+ flags = GRN_OBJ_KEY_UINT;
105
105
  size = sizeof(unsigned int);
106
106
  } else if (rb_grn_equal_option(rb_type, "float")) {
107
- flags = GRN_OBJ_KEY_FLOAT;
107
+ flags = GRN_OBJ_KEY_FLOAT;
108
108
  size = sizeof(double);
109
109
  } else {
110
- rb_raise(rb_eArgError,
111
- ":type should be one of "
112
- "[:integer, :int, :unsigned_integer, :uint, "
113
- ":float, :variable]: %s",
114
- rb_grn_inspect(options));
110
+ rb_raise(rb_eArgError,
111
+ ":type should be one of "
112
+ "[:integer, :int, :unsigned_integer, :uint, "
113
+ ":float, :variable]: %s",
114
+ rb_grn_inspect(options));
115
115
  }
116
116
 
117
117
  if (NIL_P(rb_size)) {
@@ -227,10 +227,10 @@ rb_grn_init_type (VALUE mGrn)
227
227
  rb_define_method(rb_cGrnType, "flags", rb_grn_type_flags, 0);
228
228
  rb_define_method(rb_cGrnType, "fixed_size?", rb_grn_type_fixed_size_p, 0);
229
229
  rb_define_method(rb_cGrnType, "variable_size?",
230
- rb_grn_type_variable_size_p, 0);
230
+ rb_grn_type_variable_size_p, 0);
231
231
 
232
232
  rb_define_method(rb_cGrnType, "unsigned_integer?",
233
- rb_grn_type_unsigned_integer_p, 0);
233
+ rb_grn_type_unsigned_integer_p, 0);
234
234
  rb_define_alias(rb_cGrnType, "uint?", "unsigned_integer?");
235
235
 
236
236
  rb_define_method(rb_cGrnType, "integer?", rb_grn_type_integer_p, 0);