rroonga 3.0.8 → 3.0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6825aba9ca793b057d14d820baaed5905ee6d3c
4
- data.tar.gz: 04afdec113a0f4ce8a913e163a835bbf7ef08e21
3
+ metadata.gz: 906eec26cd4e15e41fa821f5712aa677c379f100
4
+ data.tar.gz: 2bcd9e5ffbb3ea7b063d1f5b83f7ef211c7a1d87
5
5
  SHA512:
6
- metadata.gz: 9a08bb595de1e37b7ca01135d39df767e846a1932cc45a8906aad3694c05f7f4e1c01da6723d287a3ca5537ee9e2a8a8cf218e4c9dce431ccc7eb085b0cb8aa2
7
- data.tar.gz: d09efd27bf213100a22fcc71893eb8213e9b03aa1149645224ebf853b5c31a0ce215f1be7f7a7d2578f6f810b0f11c365f7fa7fb675c5f9100a94094e54c9174
6
+ metadata.gz: 8ab67483c99f8b0e5b29f60fdabe90966c57bb2b6a8c9302df32195c7fd25da4d1a12a1ab94f82f56e8cfdad2e1aa814fd3e03ecb70ff6fde6d6e3929441bb3d
7
+ data.tar.gz: e27e4a1c4e96f3c717959a6aa3935871e6a2824137538b833c9bfd74e831f90f11632f8027a5f8b4d4edc021571583d81b14343274856ab82fbf3694c902aa5f
@@ -1,5 +1,17 @@
1
1
  h1. NEWS
2
2
 
3
+ h2(#3-0-9). 3.0.9: 2013-10-29
4
+
5
+ h3. Improvements
6
+
7
+ * Supported Groonga 3.0.9.
8
+ * Supported showing error message on error in {Groonga::Object#remove}.
9
+
10
+ h3. Fixes
11
+
12
+ * Fixed a crash bug that is caused by assigning @nil@ as source of
13
+ index column.
14
+
3
15
  h2(#3-0-8). 3.0.8: 2013-09-29
4
16
 
5
17
  h3. Improvements
@@ -12,7 +24,7 @@ h2(#3-0-7). 3.0.7: 2013-09-19
12
24
 
13
25
  h3. Improvements
14
26
 
15
- * Added {Groonga::TableKeySupport#tokenize}. It requires groonga
27
+ * Added {Groonga::Table::KeySupport#tokenize}. It requires groonga
16
28
  3.0.8. Groonga 3.0.8 is not released yet.
17
29
  * Changed return object of {Groonga::Context#select} to groonga-client gem's
18
30
  return object. It is a backward imcompatible change. Some APIs are changed.
@@ -657,6 +657,10 @@ resolve_source_id (grn_ctx *context, grn_obj *column, grn_id range_id,
657
657
  source = RVAL2GRNOBJECT(rb_source, &context);
658
658
  }
659
659
  rb_grn_context_check(context, rb_source);
660
+ if (!source) {
661
+ rb_raise(rb_eArgError, "couldn't find source: <%s>",
662
+ rb_grn_inspect(rb_source));
663
+ }
660
664
  if (source->header.type == GRN_ACCESSOR) {
661
665
  char name[256];
662
666
  int length;
@@ -1436,15 +1436,14 @@ rb_grn_object_remove (VALUE self)
1436
1436
  {
1437
1437
  RbGrnObject *rb_grn_object;
1438
1438
  grn_ctx *context;
1439
- grn_rc rc;
1440
1439
 
1441
1440
  rb_grn_object = SELF(self);
1442
1441
  if (!rb_grn_object->object)
1443
1442
  return Qnil;
1444
1443
 
1445
1444
  context = rb_grn_object->context;
1446
- rc = grn_obj_remove(context, rb_grn_object->object);
1447
- rb_grn_rc_check(rc, self);
1445
+ grn_obj_remove(context, rb_grn_object->object);
1446
+ rb_grn_context_check(context, self);
1448
1447
 
1449
1448
  rb_iv_set(self, "@context", Qnil);
1450
1449
 
data/ext/groonga/rb-grn.h CHANGED
@@ -84,7 +84,7 @@ RB_GRN_BEGIN_DECLS
84
84
 
85
85
  #define RB_GRN_MAJOR_VERSION 3
86
86
  #define RB_GRN_MINOR_VERSION 0
87
- #define RB_GRN_MICRO_VERSION 8
87
+ #define RB_GRN_MICRO_VERSION 9
88
88
 
89
89
  #define RB_GRN_QUERY_DEFAULT_MAX_EXPRESSIONS 32
90
90
 
@@ -638,7 +638,7 @@ module Groonga
638
638
  def restore(dumped_text, options={})
639
639
  define(options) do |schema|
640
640
  schema.restore(dumped_text)
641
- end
641
+ end
642
642
  end
643
643
 
644
644
  # @private
data/rroonga-build.rb CHANGED
@@ -27,7 +27,7 @@ module RroongaBuild
27
27
  module LatestGroongaVersion
28
28
  MAJOR = 3
29
29
  MINOR = 0
30
- MICRO = 8
30
+ MICRO = 9
31
31
  VERSION = [MAJOR, MINOR, MICRO]
32
32
  end
33
33
 
data/rroonga.gemspec CHANGED
@@ -70,7 +70,7 @@ Gem::Specification.new do |s|
70
70
  s.extra_rdoc_files = ["README.textile"]
71
71
  s.test_files = Dir.glob("test/**/*.rb")
72
72
  Dir.chdir("bin") do
73
- s.executables = Dir.glob("*") - ["groonga-index-validate"]
73
+ s.executables = Dir.glob("*")
74
74
  end
75
75
  end
76
76
 
@@ -171,4 +171,78 @@ class DatabaseTest < Test::Unit::TestCase
171
171
  assert_equal(["HashTable", "PatriciaTrie", "DoubleArrayTrie"].sort,
172
172
  @database.tables.collect(&:name).sort)
173
173
  end
174
+
175
+ class TestRemove < self
176
+ setup :setup_database
177
+
178
+ def test_referenced_table
179
+ Groonga::Schema.define do |schema|
180
+ schema.create_table("Names",
181
+ :type => :hash,
182
+ :key_type => :short_text) do |table|
183
+ end
184
+
185
+ schema.create_table("Shops",
186
+ :type => :hash,
187
+ :key_type => "Names") do |table|
188
+ end
189
+ end
190
+
191
+ path = @database.path
192
+ @database.remove
193
+ assert_false(File.exist?(path))
194
+ end
195
+
196
+ def test_referenced_column
197
+ Groonga::Schema.define do |schema|
198
+ schema.create_table("Categories",
199
+ :type => :hash,
200
+ :key_type => :short_text) do |table|
201
+ end
202
+
203
+ schema.create_table("Contents") do |table|
204
+ table.reference("category", "Categories")
205
+ end
206
+ end
207
+
208
+ path = @database.path
209
+ @database.remove
210
+ assert_false(File.exist?(path))
211
+ end
212
+
213
+ def test_indexed_table
214
+ Groonga::Schema.define do |schema|
215
+ schema.create_table("Categories",
216
+ :type => :hash,
217
+ :key_type => :short_text) do |table|
218
+ end
219
+
220
+ schema.create_table("Terms") do |table|
221
+ table.index("Categories._key")
222
+ end
223
+ end
224
+
225
+ path = @database.path
226
+ @database.remove
227
+ assert_false(File.exist?(path))
228
+ end
229
+
230
+ def test_indexed_column
231
+ Groonga::Schema.define do |schema|
232
+ schema.create_table("Categories",
233
+ :type => :hash,
234
+ :key_type => :short_text) do |table|
235
+ table.text("content")
236
+ end
237
+
238
+ schema.create_table("Terms") do |table|
239
+ table.index("Categories.content")
240
+ end
241
+ end
242
+
243
+ path = @database.path
244
+ @database.remove
245
+ assert_false(File.exist?(path))
246
+ end
247
+ end
174
248
  end
@@ -320,4 +320,26 @@ class IndexColumnTest < Test::Unit::TestCase
320
320
  ])
321
321
  end
322
322
  end
323
+
324
+ class SourceTest < self
325
+ def test_nil
326
+ Groonga::Schema.define do |schema|
327
+ schema.create_table("Contents",
328
+ :type => :patricia_trie,
329
+ :key_type => "ShortText") do |table|
330
+ end
331
+
332
+ schema.create_table("Terms",
333
+ :type => :patricia_trie,
334
+ :key_type => "ShortText",
335
+ :default_tokenizer => "TokenBigram") do |table|
336
+ end
337
+ end
338
+
339
+ index = Groonga["Terms"].define_index_column("index", "Contents")
340
+ assert_raise(ArgumentError.new("couldn't find source: <nil>")) do
341
+ index.source = nil
342
+ end
343
+ end
344
+ end
323
345
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rroonga
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-09-29 00:00:00.000000000 Z
15
+ date: 2013-10-29 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: pkg-config
@@ -194,8 +194,8 @@ email:
194
194
  - y.hayamizu@gmail.com
195
195
  - dara@shidara.net
196
196
  executables:
197
- - grntest-log-analyze
198
197
  - groonga-index-dump
198
+ - grntest-log-analyze
199
199
  - grndump
200
200
  extensions:
201
201
  - ext/groonga/extconf.rb
@@ -206,135 +206,135 @@ files:
206
206
  - AUTHORS
207
207
  - Rakefile
208
208
  - Gemfile
209
- - doc/text/tutorial.textile
210
209
  - doc/text/news.textile
210
+ - doc/text/tutorial.textile
211
211
  - rroonga.gemspec
212
212
  - rroonga-build.rb
213
213
  - extconf.rb
214
- - lib/groonga.rb
214
+ - lib/groonga/schema.rb
215
+ - lib/groonga/database.rb
215
216
  - lib/groonga/geo-point.rb
216
- - lib/groonga/logger.rb
217
- - lib/groonga/record.rb
218
- - lib/groonga/index-column.rb
217
+ - lib/groonga/expression-builder-19.rb
219
218
  - lib/groonga/sub-records.rb
220
- - lib/groonga/view-record.rb
221
- - lib/groonga/memory-pool.rb
222
- - lib/groonga/context.rb
223
- - lib/groonga/grntest-log.rb
224
219
  - lib/groonga/pagination.rb
225
- - lib/groonga/database.rb
226
- - lib/groonga/schema.rb
227
- - lib/groonga/posting.rb
220
+ - lib/groonga/index-column.rb
221
+ - lib/groonga/view-record.rb
228
222
  - lib/groonga/patricia-trie.rb
229
- - lib/groonga/expression-builder.rb
230
223
  - lib/groonga/context/command-executor.rb
224
+ - lib/groonga/grntest-log.rb
231
225
  - lib/groonga/dumper.rb
226
+ - lib/groonga/posting.rb
227
+ - lib/groonga/memory-pool.rb
232
228
  - lib/groonga/query-logger.rb
233
- - lib/groonga/expression-builder-19.rb
234
- - benchmark/create-wikipedia-database.rb
229
+ - lib/groonga/context.rb
230
+ - lib/groonga/record.rb
231
+ - lib/groonga/expression-builder.rb
232
+ - lib/groonga/logger.rb
233
+ - lib/groonga.rb
235
234
  - benchmark/common.rb
236
- - benchmark/write-many-small-items.rb
235
+ - benchmark/repeat-load.rb
237
236
  - benchmark/read-write-many-small-items.rb
237
+ - benchmark/create-wikipedia-database.rb
238
+ - benchmark/write-many-small-items.rb
238
239
  - benchmark/select.rb
239
- - benchmark/repeat-load.rb
240
240
  - misc/grnop2ruby.rb
241
241
  - example/index-html.rb
242
242
  - example/bookmark.rb
243
- - ext/groonga/rb-grn-exception.c
244
- - ext/groonga/rb-grn-hash-cursor.c
245
- - ext/groonga/rb-grn-record.c
243
+ - ext/groonga/rb-grn-procedure.c
244
+ - ext/groonga/rb-grn-column.c
245
+ - ext/groonga/rb-grn-index-column.c
246
+ - ext/groonga/rb-grn-encoding-support.c
246
247
  - ext/groonga/rb-grn-variable.c
248
+ - ext/groonga/rb-grn-table.c
249
+ - ext/groonga/rb-grn-hash-cursor.c
247
250
  - ext/groonga/rb-grn-table-cursor-key-support.c
251
+ - ext/groonga/rb-grn-object.c
252
+ - ext/groonga/rb-grn-double-array-trie.c
253
+ - ext/groonga/rb-grn-table-key-support.c
254
+ - ext/groonga/rb-grn-array.c
255
+ - ext/groonga/rb-grn-patricia-trie.c
256
+ - ext/groonga/rb-grn-double-array-trie-cursor.c
257
+ - ext/groonga/rb-grn-utils.c
258
+ - ext/groonga/rb-grn-record.c
248
259
  - ext/groonga/rb-grn-normalizer.c
249
- - ext/groonga/rb-grn-fix-size-column.c
250
- - ext/groonga/rb-grn-context.c
251
- - ext/groonga/rb-grn-plugin.c
252
- - ext/groonga/rb-grn-hash.c
260
+ - ext/groonga/rb-groonga.c
261
+ - ext/groonga/rb-grn-exception.c
253
262
  - ext/groonga/rb-grn-variable-size-column.c
254
- - ext/groonga/rb-grn-index-column.c
263
+ - ext/groonga/rb-grn-encoding.c
264
+ - ext/groonga/rb-grn-geo-point.c
265
+ - ext/groonga/rb-grn-expression-builder.c
255
266
  - ext/groonga/rb-grn-operator.c
256
- - ext/groonga/rb-grn-table-key-support.c
257
- - ext/groonga/rb-grn-patricia-trie.c
258
- - ext/groonga/rb-grn-table-cursor.c
259
- - ext/groonga/rb-grn-object.c
260
- - ext/groonga/rb-grn-table.c
261
- - ext/groonga/rb-grn-procedure.c
262
267
  - ext/groonga/rb-grn-snippet.c
263
- - ext/groonga/rb-grn-encoding-support.c
264
- - ext/groonga/rb-grn-patricia-trie-cursor.c
265
- - ext/groonga/rb-grn-array.c
268
+ - ext/groonga/rb-grn-array-cursor.c
269
+ - ext/groonga/rb-grn-type.c
270
+ - ext/groonga/rb-grn-table-cursor.c
271
+ - ext/groonga/rb-grn-fix-size-column.c
272
+ - ext/groonga/rb-grn-logger.c
273
+ - ext/groonga/rb-grn-plugin.c
266
274
  - ext/groonga/rb-grn-database.c
267
- - ext/groonga/rb-grn-query-logger.c
268
- - ext/groonga/rb-grn-column.c
275
+ - ext/groonga/rb-grn-patricia-trie-cursor.c
269
276
  - ext/groonga/rb-grn-index-cursor.c
270
- - ext/groonga/rb-grn-type.c
271
277
  - ext/groonga/rb-grn-accessor.c
272
- - ext/groonga/rb-grn-double-array-trie-cursor.c
278
+ - ext/groonga/rb-grn-context.c
279
+ - ext/groonga/rb-grn-query-logger.c
273
280
  - ext/groonga/rb-grn-posting.c
274
- - ext/groonga/rb-groonga.c
275
- - ext/groonga/rb-grn-geo-point.c
276
- - ext/groonga/rb-grn-array-cursor.c
277
- - ext/groonga/rb-grn-utils.c
278
- - ext/groonga/rb-grn-logger.c
279
281
  - ext/groonga/rb-grn-expression.c
280
- - ext/groonga/rb-grn-encoding.c
281
- - ext/groonga/rb-grn-expression-builder.c
282
- - ext/groonga/rb-grn-double-array-trie.c
282
+ - ext/groonga/rb-grn-hash.c
283
283
  - ext/groonga/rb-grn.h
284
284
  - ext/groonga/extconf.rb
285
285
  - ext/groonga/groonga.def
286
+ - test/test-normalizer.rb
287
+ - test/test-schema.rb
288
+ - test/test-vector-column.rb
289
+ - test/test-schema-dumper.rb
290
+ - test/run-test.rb
291
+ - test/test-procedure.rb
292
+ - test/test-hash.rb
293
+ - test/test-expression.rb
294
+ - test/test-version.rb
286
295
  - test/test-remote.rb
287
- - test/test-accessor.rb
288
- - test/test-database-dumper.rb
289
- - test/test-index-column.rb
290
- - test/groonga-test-utils.rb
291
- - test/test-pagination.rb
296
+ - test/test-table-offset-and-limit.rb
297
+ - test/test-expression-builder.rb
298
+ - test/test-sub-records.rb
299
+ - test/test-encoding.rb
300
+ - test/test-snippet.rb
301
+ - test/test-index-cursor.rb
302
+ - test/test-type.rb
303
+ - test/test-table-dumper.rb
304
+ - test/test-table-traverse.rb
305
+ - test/test-convert.rb
292
306
  - test/test-table.rb
307
+ - test/test-pagination.rb
308
+ - test/groonga-test-utils.rb
309
+ - test/test-logger.rb
310
+ - test/test-context.rb
293
311
  - test/test-memory-pool.rb
294
- - test/test-variable-size-column.rb
312
+ - test/test-table-select-weight.rb
313
+ - test/test-exception.rb
314
+ - test/test-table-select-normalize.rb
315
+ - test/test-command-select.rb
316
+ - test/test-gqtp.rb
317
+ - test/test-database-dumper.rb
318
+ - test/test-index-column.rb
319
+ - test/test-geo-point.rb
295
320
  - test/test-plugin.rb
296
- - test/test-hash.rb
297
- - test/test-table-traverse.rb
298
- - test/test-encoding.rb
321
+ - test/test-variable-size-column.rb
299
322
  - test/test-schema-create-table.rb
300
- - test/test-type.rb
323
+ - test/test-array.rb
324
+ - test/test-fix-size-column.rb
301
325
  - test/test-table-key-support.rb
302
- - test/test-database.rb
303
- - test/test-variable.rb
326
+ - test/test-schema-type.rb
304
327
  - test/test-table-select.rb
305
- - test/test-patricia-trie.rb
306
- - test/test-geo-point.rb
307
- - test/test-expression-builder.rb
308
- - test/test-logger.rb
309
- - test/test-array.rb
310
- - test/test-record.rb
328
+ - test/test-variable.rb
311
329
  - test/test-column.rb
312
- - test/test-fix-size-column.rb
313
- - test/run-test.rb
314
- - test/test-procedure.rb
315
- - test/test-table-dumper.rb
316
- - test/test-schema.rb
330
+ - test/test-patricia-trie.rb
317
331
  - test/test-table-select-mecab.rb
318
- - test/test-command-select.rb
319
- - test/test-table-select-normalize.rb
320
- - test/test-expression.rb
321
- - test/test-normalizer.rb
322
- - test/test-vector-column.rb
323
- - test/test-version.rb
324
- - test/test-index-cursor.rb
332
+ - test/test-accessor.rb
333
+ - test/test-database.rb
325
334
  - test/test-double-array-trie.rb
326
- - test/test-exception.rb
327
- - test/test-schema-dumper.rb
328
- - test/test-schema-type.rb
329
- - test/test-table-select-weight.rb
330
- - test/test-convert.rb
331
- - test/test-gqtp.rb
332
- - test/test-context.rb
333
- - test/test-snippet.rb
334
- - test/test-table-offset-and-limit.rb
335
- - test/test-sub-records.rb
336
- - bin/grntest-log-analyze
335
+ - test/test-record.rb
337
336
  - bin/groonga-index-dump
337
+ - bin/grntest-log-analyze
338
338
  - bin/grndump
339
339
  homepage: http://groonga.rubyforge.org/#about-rroonga
340
340
  licenses:
@@ -363,54 +363,54 @@ specification_version: 4
363
363
  summary: Ruby bindings for groonga that provide full text search and column store
364
364
  features.
365
365
  test_files:
366
+ - test/test-normalizer.rb
367
+ - test/test-schema.rb
368
+ - test/test-vector-column.rb
369
+ - test/test-schema-dumper.rb
370
+ - test/run-test.rb
371
+ - test/test-procedure.rb
372
+ - test/test-hash.rb
373
+ - test/test-expression.rb
374
+ - test/test-version.rb
366
375
  - test/test-remote.rb
367
- - test/test-accessor.rb
368
- - test/test-database-dumper.rb
369
- - test/test-index-column.rb
370
- - test/groonga-test-utils.rb
371
- - test/test-pagination.rb
376
+ - test/test-table-offset-and-limit.rb
377
+ - test/test-expression-builder.rb
378
+ - test/test-sub-records.rb
379
+ - test/test-encoding.rb
380
+ - test/test-snippet.rb
381
+ - test/test-index-cursor.rb
382
+ - test/test-type.rb
383
+ - test/test-table-dumper.rb
384
+ - test/test-table-traverse.rb
385
+ - test/test-convert.rb
372
386
  - test/test-table.rb
387
+ - test/test-pagination.rb
388
+ - test/groonga-test-utils.rb
389
+ - test/test-logger.rb
390
+ - test/test-context.rb
373
391
  - test/test-memory-pool.rb
374
- - test/test-variable-size-column.rb
392
+ - test/test-table-select-weight.rb
393
+ - test/test-exception.rb
394
+ - test/test-table-select-normalize.rb
395
+ - test/test-command-select.rb
396
+ - test/test-gqtp.rb
397
+ - test/test-database-dumper.rb
398
+ - test/test-index-column.rb
399
+ - test/test-geo-point.rb
375
400
  - test/test-plugin.rb
376
- - test/test-hash.rb
377
- - test/test-table-traverse.rb
378
- - test/test-encoding.rb
401
+ - test/test-variable-size-column.rb
379
402
  - test/test-schema-create-table.rb
380
- - test/test-type.rb
403
+ - test/test-array.rb
404
+ - test/test-fix-size-column.rb
381
405
  - test/test-table-key-support.rb
382
- - test/test-database.rb
383
- - test/test-variable.rb
406
+ - test/test-schema-type.rb
384
407
  - test/test-table-select.rb
385
- - test/test-patricia-trie.rb
386
- - test/test-geo-point.rb
387
- - test/test-expression-builder.rb
388
- - test/test-logger.rb
389
- - test/test-array.rb
390
- - test/test-record.rb
408
+ - test/test-variable.rb
391
409
  - test/test-column.rb
392
- - test/test-fix-size-column.rb
393
- - test/run-test.rb
394
- - test/test-procedure.rb
395
- - test/test-table-dumper.rb
396
- - test/test-schema.rb
410
+ - test/test-patricia-trie.rb
397
411
  - test/test-table-select-mecab.rb
398
- - test/test-command-select.rb
399
- - test/test-table-select-normalize.rb
400
- - test/test-expression.rb
401
- - test/test-normalizer.rb
402
- - test/test-vector-column.rb
403
- - test/test-version.rb
404
- - test/test-index-cursor.rb
412
+ - test/test-accessor.rb
413
+ - test/test-database.rb
405
414
  - test/test-double-array-trie.rb
406
- - test/test-exception.rb
407
- - test/test-schema-dumper.rb
408
- - test/test-schema-type.rb
409
- - test/test-table-select-weight.rb
410
- - test/test-convert.rb
411
- - test/test-gqtp.rb
412
- - test/test-context.rb
413
- - test/test-snippet.rb
414
- - test/test-table-offset-and-limit.rb
415
- - test/test-sub-records.rb
415
+ - test/test-record.rb
416
416
  has_rdoc: