rroonga 6.0.7 → 6.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 266ed1c5524c3ecf7a34caae961511c166f83fdc
4
- data.tar.gz: a9bc9f5db05f31e635d521e265a8ea170371ac67
3
+ metadata.gz: 27152bea7491ed0ab3718bffaf842ba2b67d4d4a
4
+ data.tar.gz: e4dd8295421d9d2dac4e3d5e55a00a5e8ba6eb3a
5
5
  SHA512:
6
- metadata.gz: ba0d58609159717163d7cdc66bce45dda47d80a8e4ef27a670569edf8073c12ac5d7da3bcd1efea7ac8ac85fed33e047188728650b34c50a2260e960a0dbe209
7
- data.tar.gz: d43410abb91b18bae1fc4da6f39e0dd160b8d02394dc64e6e0d95c54b90c42708dfc6f2482ad054eae5a85b36cb98f2f9b82ceef84e7e8b70faba3c3852e1372
6
+ metadata.gz: bff37ac4de03009e14cd3807ede281f537dd732ee49462e025834fc1ffd50543b9f53a4da2ef11ba872849add51ff398326f45bad53453a2062fc8ab99b34c55
7
+ data.tar.gz: 5d73e5004237396c788a3765393999f19739a8453d4e1e2b21edcaa2fcd3c818595ab036ae9e26cd306a86bfff4c6f34b2f5a6357840dccaf47cfc6f3c014d14
@@ -1,14 +1,30 @@
1
- How to Cross compile Rroonga
2
- ===
1
+ # How to Cross compile Rroonga
3
2
 
4
- # For Debian GNU/Linux like Linux distribution Users
3
+ ## For rake-compiler-dock
5
4
 
6
- ## apt
5
+ `rake-compiler-dock` depends `docker` and some platform requires docker client such as `docker-machine`.
6
+ Please install `docker` and docker client before cross compiling with `rake-compiler-dock`.
7
+
8
+ ### cross compiling with rake-compiler-dock
9
+
10
+ execute following rake task:
11
+
12
+ ```bash
13
+ $ bundle exec rake build:windows
14
+ ```
15
+
16
+ Then, `pkg` directory is created. And cross compiled gems move into `pkg` directory.
17
+
18
+ ## Manual procedure for Debian GNU/Linux like Linux distribution Users
19
+
20
+ This is the manual procedure without rake-compiler-dock.
21
+
22
+ ### apt
7
23
 
8
24
  * mingw-w64
9
25
  * build-essential
10
26
 
11
- ## prepare ruby and rubygems
27
+ ### prepare ruby and rubygems
12
28
 
13
29
  ```bash
14
30
  $ rbenv install 1.9.3-p547
@@ -21,7 +37,7 @@ $ rbenv install 2.1.3
21
37
  $ gem install bundler
22
38
  ```
23
39
 
24
- ## bundle install
40
+ ### bundle install
25
41
 
26
42
  ```bash
27
43
  $ rbenv local 1.9.3-p547
@@ -32,7 +48,7 @@ $ rbenv local 2.1.3
32
48
  $ bundle install [--path vendor/bundle]
33
49
  ```
34
50
 
35
- ## rake-compiler
51
+ ### rake-compiler
36
52
 
37
53
  ```bash
38
54
  $ rbenv local 1.9.3-p547
@@ -46,7 +62,7 @@ $ bundle exec rake-compiler cross-ruby HOST=i686-w64-mingw32 VERSION=2.1.3 [EXTS
46
62
  $ bundle exec rake-compiler cross-ruby HOST=x86_64-w64-mingw32 VERSION=2.1.3 [EXTS=--without-extensions]
47
63
  ```
48
64
 
49
- ## cross compile
65
+ ### cross compile
50
66
 
51
67
  ```bash
52
68
  $ rbenv local 1.9.3-p547
@@ -55,18 +71,3 @@ $ bundle exec rake RUBY_CC_VERSION=1.9.3:2.0.0:2.1.3 cross clean native gem
55
71
  $ bundle exec rake clean:groonga
56
72
  $ bundle exec rake RUBY_CC_VERSION=1.9.3:2.0.0:2.1.3 cross RROONGA_USE_GROONGA_X64=true clean native gem
57
73
  ```
58
-
59
- # For rake-compiler-dock
60
-
61
- `rake-compiler-dock` depends `docker` and some platform requires docker client such as `docker-machine`.
62
- Please install `docker` and docker client before cross compiling with `rake-compiler-dock`.
63
-
64
- ## cross compiling with rake-compiler-dock
65
-
66
- execute following rake task:
67
-
68
- ```bash
69
- $ bundle exec rake build:windows
70
- ```
71
-
72
- Then, `pkg` directory is created. And cross compiled gems move into `pkg` directory.
data/doc/text/news.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # NEWS
2
2
 
3
+ ## 6.0.9: 2016-10-07 {#version-6-0-9}
4
+
5
+ ### Improvements
6
+
7
+ * Supported Groonga 6.0.9. Groonga 6.0.8 or older aren't supported.
8
+ * {Groonga::Database#remove_force}: Added a new method that removes
9
+ broken object.
10
+ * {Groonga::ID.builtin_type?}: Added a new predicate method that checks
11
+ whether the given ID is ID for builtin_type object or not.
12
+
3
13
  ## 6.0.7: 2016-08-13 {#version-6-0-7}
4
14
 
5
15
  ### Improvements
@@ -705,6 +705,38 @@ rb_grn_database_reindex (VALUE self)
705
705
  return Qnil;
706
706
  }
707
707
 
708
+ /*
709
+ * Removes a broken object.
710
+ *
711
+ * You should use {Groonga::Object#remove} normally.
712
+ *
713
+ * @overload remove_force(name)
714
+ *
715
+ * @param [String] name The target object name.
716
+ *
717
+ * @since 6.0.9
718
+ */
719
+ static VALUE
720
+ rb_grn_database_remove_force (VALUE self, VALUE rb_name)
721
+ {
722
+ grn_rc rc;
723
+ grn_ctx *context;
724
+ char *name;
725
+ int name_size;
726
+
727
+ rb_grn_database_deconstruct(SELF(self), NULL, &context,
728
+ NULL, NULL, NULL, NULL);
729
+
730
+ name = StringValueCStr(rb_name);
731
+ name_size = RSTRING_LEN(rb_name);
732
+
733
+ rc = grn_obj_remove_force(context, name, name_size);
734
+ rb_grn_context_check(context, self);
735
+ rb_grn_rc_check(rc, self);
736
+
737
+ return Qnil;
738
+ }
739
+
708
740
  void
709
741
  rb_grn_init_database (VALUE mGrn)
710
742
  {
@@ -740,4 +772,5 @@ rb_grn_init_database (VALUE mGrn)
740
772
  rb_define_method(rb_cGrnDatabase, "recover", rb_grn_database_recover, 0);
741
773
  rb_define_method(rb_cGrnDatabase, "unmap", rb_grn_database_unmap, 0);
742
774
  rb_define_method(rb_cGrnDatabase, "reindex", rb_grn_database_reindex, 0);
775
+ rb_define_method(rb_cGrnDatabase, "remove_force", rb_grn_database_remove_force, 1);
743
776
  }
@@ -42,6 +42,24 @@ rb_grn_id_s_builtin_p (VALUE self, VALUE rb_id)
42
42
  return CBOOL2RVAL(grn_id_is_builtin(ctx, id));
43
43
  }
44
44
 
45
+ /*
46
+ * @overload builtin_type?(id)
47
+ * @param [Integer] id The ID to be confirmed.
48
+ * @return [Boolean] `true` if the `id` is builtin_type, `false` otherwise.
49
+ *
50
+ * @since 6.0.9
51
+ */
52
+ static VALUE
53
+ rb_grn_id_s_builtin_type_p (VALUE self, VALUE rb_id)
54
+ {
55
+ grn_ctx *ctx = NULL;
56
+ grn_id id;
57
+
58
+ id = NUM2INT(rb_id);
59
+
60
+ return CBOOL2RVAL(grn_id_is_builtin_type(ctx, id));
61
+ }
62
+
45
63
  void
46
64
  rb_grn_init_id (VALUE mGrn)
47
65
  {
@@ -53,4 +71,5 @@ rb_grn_init_id (VALUE mGrn)
53
71
  rb_define_const(mGrnID, "MAX", INT2NUM(GRN_ID_MAX));
54
72
 
55
73
  rb_define_singleton_method(mGrnID, "builtin?", rb_grn_id_s_builtin_p, 1);
74
+ rb_define_singleton_method(mGrnID, "builtin_type?", rb_grn_id_s_builtin_type_p, 1);
56
75
  }
@@ -583,6 +583,7 @@ rb_grn_table_get_columns (int argc, VALUE *argv, VALUE self)
583
583
  grn_ctx *context = NULL;
584
584
  grn_obj *table;
585
585
  grn_obj *columns;
586
+ grn_obj *key_type;
586
587
  grn_rc rc;
587
588
  int n;
588
589
  grn_table_cursor *cursor;
@@ -603,8 +604,9 @@ rb_grn_table_get_columns (int argc, VALUE *argv, VALUE self)
603
604
  name_size = RSTRING_LEN(rb_name);
604
605
  }
605
606
 
607
+ key_type = grn_ctx_at(context, GRN_DB_SHORT_TEXT);
606
608
  columns = grn_table_create(context, NULL, 0, NULL, GRN_TABLE_HASH_KEY,
607
- NULL, 0);
609
+ key_type, 0);
608
610
  rb_grn_context_check(context, self);
609
611
  n = grn_table_columns(context, table, name, name_size, columns);
610
612
  rb_grn_context_check(context, self);
data/ext/groonga/rb-grn.h CHANGED
@@ -99,7 +99,7 @@ RB_GRN_BEGIN_DECLS
99
99
 
100
100
  #define RB_GRN_MAJOR_VERSION 6
101
101
  #define RB_GRN_MINOR_VERSION 0
102
- #define RB_GRN_MICRO_VERSION 7
102
+ #define RB_GRN_MICRO_VERSION 9
103
103
 
104
104
  #define RB_GRN_OBJECT(object) ((RbGrnObject *)(object))
105
105
  #define RB_GRN_NAMED_OBJECT(object) ((RbGrnNamedObject *)(object))
data/rroonga-build.rb CHANGED
@@ -18,15 +18,15 @@ module RroongaBuild
18
18
  module RequiredGroongaVersion
19
19
  MAJOR = 6
20
20
  MINOR = 0
21
- MICRO = 7
21
+ MICRO = 9
22
22
  VERSION = [MAJOR, MINOR, MICRO]
23
- RELEASED_DATE = Time.utc(2016, 7, 29)
23
+ RELEASED_DATE = Time.utc(2016, 9, 29)
24
24
  end
25
25
 
26
26
  module LatestGroongaVersion
27
27
  MAJOR = 6
28
28
  MINOR = 0
29
- MICRO = 7
29
+ MICRO = 9
30
30
  VERSION = [MAJOR, MINOR, MICRO]
31
31
  end
32
32
 
@@ -276,6 +276,27 @@ class DatabaseTest < Test::Unit::TestCase
276
276
  terms.collect(&:_key).sort)
277
277
  end
278
278
 
279
+ def test_remove_force
280
+ setup_database
281
+ table_name = "Bookmarks"
282
+ table = Groonga::Array.create(:name => table_name)
283
+ table_path = Pathname.new(table.path)
284
+ @database.unmap
285
+ table_path.open("w") do |file|
286
+ file.print("BROKEN")
287
+ end
288
+ assert_raise(Groonga::IncompatibleFileFormat) do
289
+ context[table_name]
290
+ end
291
+ assert do
292
+ table_path.exist?
293
+ end
294
+ @database.remove_force(table_name)
295
+ assert do
296
+ not table_path.exist?
297
+ end
298
+ end
299
+
279
300
  class RemoveTest < self
280
301
  setup :setup_database
281
302
 
@@ -377,7 +398,6 @@ class DatabaseTest < Test::Unit::TestCase
377
398
  end
378
399
 
379
400
  def test_dirty?
380
- omit("TODO: Enable this after Groonga 6.0.6 is released.")
381
401
  assert do
382
402
  not @database.dirty?
383
403
  end
data/test/test-id.rb CHANGED
@@ -44,4 +44,20 @@ class IDTest < Test::Unit::TestCase
44
44
  end
45
45
  end
46
46
  end
47
+
48
+ sub_test_case(".builtin_type?") do
49
+ test "true" do
50
+ assert do
51
+ Groonga::ID.builtin_type?(Groonga::Type::INT32)
52
+ end
53
+ end
54
+
55
+ test "false" do
56
+ token_bigram_id = Groonga["TokenBigram"].id
57
+
58
+ assert do
59
+ not Groonga::ID.builtin_type?(token_bigram_id)
60
+ end
61
+ end
62
+ end
47
63
  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: 6.0.7
4
+ version: 6.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: 2016-08-13 00:00:00.000000000 Z
15
+ date: 2016-10-07 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: pkg-config
@@ -194,10 +194,10 @@ email:
194
194
  - y.hayamizu@gmail.com
195
195
  - dara@shidara.net
196
196
  executables:
197
- - grntest-log-analyze
197
+ - groonga-index-dump
198
198
  - groonga-database-inspect
199
199
  - grndump
200
- - groonga-index-dump
200
+ - grntest-log-analyze
201
201
  extensions:
202
202
  - ext/groonga/extconf.rb
203
203
  extra_rdoc_files:
@@ -417,72 +417,72 @@ specification_version: 4
417
417
  summary: Ruby bindings for Groonga that provide full text search and column store
418
418
  features.
419
419
  test_files:
420
- - test/test-context.rb
421
- - test/test-normalizer.rb
422
- - test/test-double-array-trie.rb
423
- - test/test-token-regexp.rb
424
- - test/test-remote.rb
425
- - test/test-expression.rb
426
- - test/test-schema-dumper.rb
427
- - test/test-patricia-trie.rb
428
- - test/test-table-group.rb
429
- - test/test-table-select.rb
430
- - test/test-encoding.rb
431
- - test/test-windows-event-logger.rb
432
420
  - test/test-plugin.rb
433
- - test/test-table-select-normalize.rb
434
- - test/test-hash.rb
435
- - test/test-gqtp.rb
436
- - test/test-table-dumper.rb
437
- - test/test-data-column.rb
438
- - test/test-pagination.rb
439
- - test/test-column.rb
440
- - test/test-table-traverse.rb
441
- - test/test-type.rb
442
- - test/test-package-label.rb
443
- - test/groonga-test-utils.rb
444
- - test/test-thread.rb
445
- - test/test-procedure.rb
446
421
  - test/test-query-logger.rb
447
- - test/test-index-column.rb
448
- - test/test-vector-column.rb
449
- - test/test-fix-size-column.rb
450
- - test/test-error-message.rb
451
- - test/test-operator.rb
452
- - test/test-database-dumper.rb
453
- - test/run-test.rb
422
+ - test/test-table-select.rb
423
+ - test/test-table-offset-and-limit.rb
424
+ - test/test-token-regexp.rb
425
+ - test/test-sub-records.rb
454
426
  - test/test-index-cursor.rb
455
- - test/test-schema-type.rb
456
- - test/test-database.rb
457
- - test/test-id.rb
427
+ - test/test-convert.rb
458
428
  - test/test-request-canceler.rb
459
- - test/test-logger.rb
460
- - test/test-table.rb
461
- - test/test-record.rb
462
429
  - test/test-version.rb
463
- - test/test-table-select-mecab.rb
464
- - test/test-lock-timeout.rb
465
- - test/test-table-select-weight.rb
466
- - test/test-geo-point.rb
467
- - test/test-array.rb
468
430
  - test/test-request-timer.rb
469
- - test/test-sub-records.rb
431
+ - test/test-table.rb
432
+ - test/test-lock-timeout.rb
470
433
  - test/test-schema-create-table.rb
434
+ - test/test-index-column.rb
435
+ - test/test-fix-size-column.rb
436
+ - test/test-table-dumper.rb
437
+ - test/test-array.rb
438
+ - test/test-record.rb
439
+ - test/test-schema-dumper.rb
440
+ - test/test-variable-size-column.rb
441
+ - test/test-type.rb
442
+ - test/test-pagination.rb
443
+ - test/test-database-dumper.rb
444
+ - test/test-table-group.rb
445
+ - test/test-accessor.rb
471
446
  - test/test-name.rb
472
- - test/test-schema.rb
473
- - test/test-command-select.rb
447
+ - test/test-database.rb
448
+ - test/test-database-inspector.rb
449
+ - test/test-operator.rb
450
+ - test/test-procedure.rb
474
451
  - test/test-expression-builder.rb
475
- - test/test-convert.rb
476
- - test/test-memory-pool.rb
477
- - test/test-flushable.rb
478
- - test/test-table-offset-and-limit.rb
479
- - test/test-exception.rb
480
- - test/test-variable-size-column.rb
452
+ - test/test-command-select.rb
453
+ - test/test-double-array-trie.rb
481
454
  - test/test-config.rb
455
+ - test/test-vector-column.rb
456
+ - test/test-encoding.rb
482
457
  - test/test-table-key-support.rb
483
- - test/test-database-inspector.rb
484
- - test/test-variable.rb
458
+ - test/test-gqtp.rb
459
+ - test/run-test.rb
460
+ - test/test-patricia-trie.rb
461
+ - test/test-remote.rb
462
+ - test/test-table-select-weight.rb
463
+ - test/test-windows-event-logger.rb
485
464
  - test/test-statistic-measurer.rb
465
+ - test/test-logger.rb
466
+ - test/test-package-label.rb
467
+ - test/test-hash.rb
468
+ - test/test-schema-type.rb
469
+ - test/test-error-message.rb
470
+ - test/test-normalizer.rb
471
+ - test/test-flushable.rb
486
472
  - test/test-snippet.rb
487
- - test/test-accessor.rb
473
+ - test/test-thread.rb
474
+ - test/test-variable.rb
475
+ - test/test-memory-pool.rb
476
+ - test/test-id.rb
477
+ - test/test-data-column.rb
478
+ - test/test-exception.rb
479
+ - test/test-table-select-mecab.rb
480
+ - test/test-table-select-normalize.rb
481
+ - test/test-schema.rb
482
+ - test/test-geo-point.rb
483
+ - test/test-table-traverse.rb
484
+ - test/groonga-test-utils.rb
485
+ - test/test-column.rb
486
+ - test/test-context.rb
487
+ - test/test-expression.rb
488
488
  has_rdoc: