groonga 0.0.6 → 0.0.7

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.
Files changed (55) hide show
  1. data/AUTHORS +4 -0
  2. data/NEWS.ja.rdoc +10 -0
  3. data/NEWS.rdoc +10 -0
  4. data/README.ja.rdoc +9 -3
  5. data/README.rdoc +10 -4
  6. data/Rakefile +1 -1
  7. data/TUTORIAL.ja.rdoc +3 -6
  8. data/example/bookmark.rb +1 -1
  9. data/example/search/config.ru +52 -28
  10. data/ext/rb-grn-column.c +24 -18
  11. data/ext/rb-grn-context.c +165 -17
  12. data/ext/rb-grn-encoding.c +37 -0
  13. data/ext/rb-grn-expression.c +286 -51
  14. data/ext/rb-grn-object.c +27 -8
  15. data/ext/rb-grn-operation.c +128 -22
  16. data/ext/rb-grn-patricia-trie.c +62 -0
  17. data/ext/rb-grn-snippet.c +7 -17
  18. data/ext/rb-grn-table.c +101 -31
  19. data/ext/rb-grn-utils.c +87 -22
  20. data/ext/rb-grn-variable-size-column.c +1 -1
  21. data/ext/rb-grn.h +27 -4
  22. data/ext/rb-groonga.c +12 -2
  23. data/extconf.rb +2 -1
  24. data/html/index.html +2 -2
  25. data/lib/groonga.rb +1 -0
  26. data/lib/groonga/expression-builder.rb +47 -12
  27. data/lib/groonga/patricia-trie.rb +40 -0
  28. data/lib/groonga/record.rb +17 -13
  29. data/misc/grnop2ruby.rb +49 -0
  30. data/pkg-config.rb +1 -1
  31. data/test-unit/lib/test/unit/assertions.rb +5 -2
  32. data/test-unit/lib/test/unit/autorunner.rb +19 -4
  33. data/test-unit/lib/test/unit/collector/load.rb +3 -1
  34. data/test-unit/lib/test/unit/color-scheme.rb +5 -1
  35. data/test-unit/lib/test/unit/error.rb +7 -5
  36. data/test-unit/lib/test/unit/runner/tap.rb +8 -0
  37. data/test-unit/lib/test/unit/ui/console/testrunner.rb +63 -8
  38. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +92 -0
  39. data/test-unit/test/collector/test-load.rb +1 -5
  40. data/test-unit/test/test-color-scheme.rb +4 -0
  41. data/test/groonga-test-utils.rb +10 -0
  42. data/test/run-test.rb +5 -1
  43. data/test/test-column.rb +58 -0
  44. data/test/test-database.rb +8 -1
  45. data/test/test-expression.rb +48 -6
  46. data/test/test-hash.rb +7 -0
  47. data/test/test-patricia-trie.rb +39 -0
  48. data/test/test-record.rb +2 -2
  49. data/test/test-remote.rb +52 -0
  50. data/test/test-schema.rb +1 -1
  51. data/test/test-table-select-normalize.rb +48 -0
  52. data/test/test-table-select.rb +101 -0
  53. data/test/test-table.rb +0 -9
  54. data/test/test-variable-size-column.rb +28 -0
  55. metadata +16 -5
@@ -382,15 +382,6 @@ class TableTest < Test::Unit::TestCase
382
382
  results.collect {|record| record["id"]})
383
383
  end
384
384
 
385
- def test_select_without_block
386
- comments = Groonga::Array.create(:name => "comments")
387
- comment1 = comments.add
388
- comment2 = comments.add
389
- comment3 = comments.add
390
- assert_equal([comment1, comment2, comment3],
391
- comments.select.collect {|record| record.key})
392
- end
393
-
394
385
  def test_group
395
386
  bookmarks = Groonga::Hash.create(:name => "<bookmarks>")
396
387
  bookmarks.define_column("title", "<text>")
@@ -20,6 +20,7 @@ class VariableSizeColumnTest < Test::Unit::TestCase
20
20
  setup_database
21
21
 
22
22
  setup_users_table
23
+ setup_users
23
24
  end
24
25
 
25
26
  def setup_users_table
@@ -30,6 +31,17 @@ class VariableSizeColumnTest < Test::Unit::TestCase
30
31
  @users_name_column_path = @columns_dir + "name"
31
32
  @name = @users.define_column("name", "<shorttext>",
32
33
  :path => @users_name_column_path.to_s)
34
+
35
+ @users_friends_column_path = @columns_dir + "friends"
36
+ @friends = @users.define_column("friends", @users,
37
+ :type => :vector,
38
+ :path => @users_friends_column_path.to_s)
39
+ end
40
+
41
+ def setup_users
42
+ @morita = @users.add(:name => "mori daijiro")
43
+ @gunyara_kun = @users.add(:name => "Tasuku SUENAGA")
44
+ @yu = @users.add(:name => "Yutaro Shimamura")
33
45
  end
34
46
 
35
47
  def test_inspect
@@ -51,4 +63,20 @@ class VariableSizeColumnTest < Test::Unit::TestCase
51
63
  def test_table
52
64
  assert_equal(@users, @name.table)
53
65
  end
66
+
67
+ def test_vector_append
68
+ assert_equal([], @morita["friends"])
69
+ @morita.append("friends", @yu)
70
+ assert_equal([@yu], @morita["friends"])
71
+ @morita.append("friends", @gunyara_kun)
72
+ assert_equal([@yu, @gunyara_kun], @morita["friends"])
73
+ end
74
+
75
+ def test_vector_prepend
76
+ assert_equal([], @morita["friends"])
77
+ @morita.prepend("friends", @yu)
78
+ assert_equal([@yu], @morita["friends"])
79
+ @morita.prepend("friends", @gunyara_kun)
80
+ assert_equal([@gunyara_kun, @yu], @morita["friends"])
81
+ end
54
82
  end
metadata CHANGED
@@ -1,15 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
+ - Tasuku SUENAGA
9
+ - daijiro
10
+ - Yuto HAYAMIZU
11
+ - SHIDARA Yoji
8
12
  autorequire:
9
13
  bindir: bin
10
14
  cert_chain: []
11
15
 
12
- date: 2009-08-01 00:00:00 +09:00
16
+ date: 2009-10-02 00:00:00 +09:00
13
17
  default_executable:
14
18
  dependencies: []
15
19
 
@@ -27,10 +31,10 @@ extensions:
27
31
  - extconf.rb
28
32
  extra_rdoc_files:
29
33
  - README.ja.rdoc
34
+ - NEWS.ja.rdoc
30
35
  - README.rdoc
31
- - TUTORIAL.ja.rdoc
32
36
  - NEWS.rdoc
33
- - NEWS.ja.rdoc
37
+ - TUTORIAL.ja.rdoc
34
38
  files:
35
39
  - AUTHORS
36
40
  - NEWS.ja.rdoc
@@ -98,11 +102,13 @@ files:
98
102
  - html/tutorial.svg
99
103
  - lib/groonga.rb
100
104
  - lib/groonga/expression-builder.rb
105
+ - lib/groonga/patricia-trie.rb
101
106
  - lib/groonga/record.rb
102
107
  - lib/groonga/schema.rb
103
108
  - license/GPL
104
109
  - license/LGPL
105
110
  - license/RUBY
111
+ - misc/grnop2ruby.rb
106
112
  - pkg-config.rb
107
113
  - test-unit/Rakefile
108
114
  - test-unit/TODO
@@ -133,12 +139,14 @@ files:
133
139
  - test-unit/lib/test/unit/priority.rb
134
140
  - test-unit/lib/test/unit/runner/console.rb
135
141
  - test-unit/lib/test/unit/runner/emacs.rb
142
+ - test-unit/lib/test/unit/runner/tap.rb
136
143
  - test-unit/lib/test/unit/testcase.rb
137
144
  - test-unit/lib/test/unit/testresult.rb
138
145
  - test-unit/lib/test/unit/testsuite.rb
139
146
  - test-unit/lib/test/unit/ui/console/outputlevel.rb
140
147
  - test-unit/lib/test/unit/ui/console/testrunner.rb
141
148
  - test-unit/lib/test/unit/ui/emacs/testrunner.rb
149
+ - test-unit/lib/test/unit/ui/tap/testrunner.rb
142
150
  - test-unit/lib/test/unit/ui/testrunner.rb
143
151
  - test-unit/lib/test/unit/ui/testrunnermediator.rb
144
152
  - test-unit/lib/test/unit/ui/testrunnerutilities.rb
@@ -198,9 +206,12 @@ files:
198
206
  - test/test-procedure.rb
199
207
  - test/test-query.rb
200
208
  - test/test-record.rb
209
+ - test/test-remote.rb
201
210
  - test/test-schema.rb
202
211
  - test/test-snippet.rb
203
212
  - test/test-table-cursor.rb
213
+ - test/test-table-select-normalize.rb
214
+ - test/test-table-select.rb
204
215
  - test/test-table.rb
205
216
  - test/test-type.rb
206
217
  - test/test-variable-size-column.rb
@@ -232,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
243
  requirements: []
233
244
 
234
245
  rubyforge_project: groonga
235
- rubygems_version: 1.3.4
246
+ rubygems_version: 1.3.5
236
247
  signing_key:
237
248
  specification_version: 3
238
249
  summary: Ruby bindings for groonga that provides full text search and column store features.