activegroonga 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. data/AUTHORS +1 -0
  2. data/NEWS.ja.rdoc +5 -0
  3. data/NEWS.rdoc +5 -0
  4. data/README.ja.rdoc +49 -0
  5. data/README.rdoc +49 -0
  6. data/Rakefile +175 -0
  7. data/lib/active_groonga.rb +75 -0
  8. data/lib/active_groonga/aggregations.rb +30 -0
  9. data/lib/active_groonga/associations.rb +93 -0
  10. data/lib/active_groonga/associations/belongs_to_association.rb +25 -0
  11. data/lib/active_groonga/attribute_methods.rb +36 -0
  12. data/lib/active_groonga/base.rb +1579 -0
  13. data/lib/active_groonga/column.rb +107 -0
  14. data/lib/active_groonga/dirty.rb +30 -0
  15. data/lib/active_groonga/fixtures.rb +92 -0
  16. data/lib/active_groonga/migration.rb +150 -0
  17. data/lib/active_groonga/rails_support.rb +31 -0
  18. data/lib/active_groonga/reflection.rb +30 -0
  19. data/lib/active_groonga/schema.rb +314 -0
  20. data/lib/active_groonga/schema_dumper.rb +147 -0
  21. data/lib/active_groonga/tasks.rb +16 -0
  22. data/lib/active_groonga/tasks/groonga.rake +162 -0
  23. data/lib/active_groonga/test_case.rb +21 -0
  24. data/lib/active_groonga/test_help.rb +21 -0
  25. data/lib/active_groonga/timestamp.rb +30 -0
  26. data/lib/active_groonga/validations.rb +26 -0
  27. data/lib/active_groonga/version.rb +24 -0
  28. data/license/LGPL +504 -0
  29. data/rails/README +28 -0
  30. data/rails/init.rb +70 -0
  31. data/rails_generators/model_groonga/USAGE +28 -0
  32. data/rails_generators/model_groonga/model_groonga_generator.rb +45 -0
  33. data/rails_generators/model_groonga/templates/fixtures.yml +17 -0
  34. data/rails_generators/model_groonga/templates/migration.rb +16 -0
  35. data/rails_generators/model_groonga/templates/model.rb +2 -0
  36. data/rails_generators/model_groonga/templates/unit_test.rb +8 -0
  37. data/test-unit/Rakefile +35 -0
  38. data/test-unit/TODO +5 -0
  39. data/test-unit/bin/testrb +5 -0
  40. data/test-unit/html/classic.html +15 -0
  41. data/test-unit/html/index.html +25 -0
  42. data/test-unit/html/index.html.ja +27 -0
  43. data/test-unit/lib/test/unit.rb +342 -0
  44. data/test-unit/lib/test/unit/assertionfailederror.rb +14 -0
  45. data/test-unit/lib/test/unit/assertions.rb +1149 -0
  46. data/test-unit/lib/test/unit/attribute.rb +125 -0
  47. data/test-unit/lib/test/unit/autorunner.rb +306 -0
  48. data/test-unit/lib/test/unit/collector.rb +43 -0
  49. data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
  50. data/test-unit/lib/test/unit/collector/dir.rb +108 -0
  51. data/test-unit/lib/test/unit/collector/load.rb +135 -0
  52. data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
  53. data/test-unit/lib/test/unit/color-scheme.rb +86 -0
  54. data/test-unit/lib/test/unit/color.rb +96 -0
  55. data/test-unit/lib/test/unit/diff.rb +538 -0
  56. data/test-unit/lib/test/unit/error.rb +124 -0
  57. data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
  58. data/test-unit/lib/test/unit/failure.rb +110 -0
  59. data/test-unit/lib/test/unit/fixture.rb +176 -0
  60. data/test-unit/lib/test/unit/notification.rb +125 -0
  61. data/test-unit/lib/test/unit/omission.rb +143 -0
  62. data/test-unit/lib/test/unit/pending.rb +146 -0
  63. data/test-unit/lib/test/unit/priority.rb +161 -0
  64. data/test-unit/lib/test/unit/runner/console.rb +52 -0
  65. data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
  66. data/test-unit/lib/test/unit/testcase.rb +360 -0
  67. data/test-unit/lib/test/unit/testresult.rb +89 -0
  68. data/test-unit/lib/test/unit/testsuite.rb +110 -0
  69. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
  70. data/test-unit/lib/test/unit/ui/console/testrunner.rb +220 -0
  71. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  72. data/test-unit/lib/test/unit/ui/testrunner.rb +20 -0
  73. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
  74. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  75. data/test-unit/lib/test/unit/util/backtracefilter.rb +41 -0
  76. data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
  77. data/test-unit/lib/test/unit/util/observable.rb +90 -0
  78. data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
  79. data/test-unit/lib/test/unit/version.rb +7 -0
  80. data/test-unit/sample/adder.rb +13 -0
  81. data/test-unit/sample/subtracter.rb +12 -0
  82. data/test-unit/sample/tc_adder.rb +18 -0
  83. data/test-unit/sample/tc_subtracter.rb +18 -0
  84. data/test-unit/sample/test_user.rb +22 -0
  85. data/test-unit/sample/ts_examples.rb +7 -0
  86. data/test-unit/test/collector/test-descendant.rb +135 -0
  87. data/test-unit/test/collector/test-load.rb +333 -0
  88. data/test-unit/test/collector/test_dir.rb +406 -0
  89. data/test-unit/test/collector/test_objectspace.rb +98 -0
  90. data/test-unit/test/run-test.rb +13 -0
  91. data/test-unit/test/test-attribute.rb +86 -0
  92. data/test-unit/test/test-color-scheme.rb +56 -0
  93. data/test-unit/test/test-color.rb +47 -0
  94. data/test-unit/test/test-diff.rb +477 -0
  95. data/test-unit/test/test-emacs-runner.rb +60 -0
  96. data/test-unit/test/test-fixture.rb +287 -0
  97. data/test-unit/test/test-notification.rb +33 -0
  98. data/test-unit/test/test-omission.rb +81 -0
  99. data/test-unit/test/test-pending.rb +70 -0
  100. data/test-unit/test/test-priority.rb +119 -0
  101. data/test-unit/test/test_assertions.rb +1082 -0
  102. data/test-unit/test/test_error.rb +26 -0
  103. data/test-unit/test/test_failure.rb +33 -0
  104. data/test-unit/test/test_testcase.rb +478 -0
  105. data/test-unit/test/test_testresult.rb +113 -0
  106. data/test-unit/test/test_testsuite.rb +129 -0
  107. data/test-unit/test/testunit-test-util.rb +14 -0
  108. data/test-unit/test/ui/test_testrunmediator.rb +20 -0
  109. data/test-unit/test/util/test-method-owner-finder.rb +38 -0
  110. data/test-unit/test/util/test_backtracefilter.rb +41 -0
  111. data/test-unit/test/util/test_observable.rb +102 -0
  112. data/test-unit/test/util/test_procwrapper.rb +36 -0
  113. data/test/active-groonga-test-utils.rb +234 -0
  114. data/test/fixtures/bookmark.rb +2 -0
  115. data/test/fixtures/task.rb +2 -0
  116. data/test/fixtures/user.rb +2 -0
  117. data/test/run-test.rb +51 -0
  118. data/test/test-associations.rb +24 -0
  119. data/test/test-base.rb +194 -0
  120. data/test/test-schema.rb +49 -0
  121. metadata +192 -0
@@ -0,0 +1,49 @@
1
+ # Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+
17
+ class SchemaTest < Test::Unit::TestCase
18
+ include ActiveGroongaTestUtils
19
+
20
+ def test_create_table
21
+ table_file = @tables_dir + "posts.groonga"
22
+ assert_not_predicate(table_file, :exist?)
23
+ ActiveGroonga::Schema.create_table(:posts) do |table|
24
+ end
25
+ assert_predicate(table_file, :exist?)
26
+ end
27
+
28
+ def test_string_column
29
+ column_file = @tables_dir + "posts" + "columns" + "title.groonga"
30
+ assert_not_predicate(column_file, :exist?)
31
+ ActiveGroonga::Schema.create_table(:posts) do |table|
32
+ table.string :title
33
+ end
34
+ assert_predicate(column_file, :exist?)
35
+ end
36
+
37
+ def test_add_index
38
+ base_dir = @metadata_dir + "index" + "posts"
39
+ index_file = base_dir + "content.groonga"
40
+ assert_not_predicate(index_file, :exist?)
41
+
42
+ ActiveGroonga::Schema.create_table(:posts) do |table|
43
+ table.string :content
44
+ table.index :content
45
+ end
46
+
47
+ assert_predicate(index_file, :exist?)
48
+ end
49
+ end
metadata ADDED
@@ -0,0 +1,192 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activegroonga
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kouhei Sutou
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-04-30 00:00:00 +09:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - "="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.3.2
24
+ version:
25
+ description: |-
26
+ groonga provides both of full text search and column store
27
+ features. ActiveGroonga + groonga can be used as an
28
+ alternative of ActiveRecord + RDB.
29
+ email:
30
+ - groonga-users-en@rubyforge.org
31
+ - groonga-dev@lists.sourceforge.jp
32
+ executables: []
33
+
34
+ extensions: []
35
+
36
+ extra_rdoc_files:
37
+ - NEWS.ja.rdoc
38
+ - NEWS.rdoc
39
+ - README.rdoc
40
+ - README.ja.rdoc
41
+ files:
42
+ - AUTHORS
43
+ - NEWS.ja.rdoc
44
+ - NEWS.rdoc
45
+ - README.ja.rdoc
46
+ - README.rdoc
47
+ - Rakefile
48
+ - lib/active_groonga.rb
49
+ - lib/active_groonga/aggregations.rb
50
+ - lib/active_groonga/associations.rb
51
+ - lib/active_groonga/associations/belongs_to_association.rb
52
+ - lib/active_groonga/attribute_methods.rb
53
+ - lib/active_groonga/base.rb
54
+ - lib/active_groonga/column.rb
55
+ - lib/active_groonga/dirty.rb
56
+ - lib/active_groonga/fixtures.rb
57
+ - lib/active_groonga/migration.rb
58
+ - lib/active_groonga/rails_support.rb
59
+ - lib/active_groonga/reflection.rb
60
+ - lib/active_groonga/schema.rb
61
+ - lib/active_groonga/schema_dumper.rb
62
+ - lib/active_groonga/tasks.rb
63
+ - lib/active_groonga/tasks/groonga.rake
64
+ - lib/active_groonga/test_case.rb
65
+ - lib/active_groonga/test_help.rb
66
+ - lib/active_groonga/timestamp.rb
67
+ - lib/active_groonga/validations.rb
68
+ - lib/active_groonga/version.rb
69
+ - license/LGPL
70
+ - rails/README
71
+ - rails/init.rb
72
+ - rails_generators/model_groonga/USAGE
73
+ - rails_generators/model_groonga/model_groonga_generator.rb
74
+ - rails_generators/model_groonga/templates/fixtures.yml
75
+ - rails_generators/model_groonga/templates/migration.rb
76
+ - rails_generators/model_groonga/templates/model.rb
77
+ - rails_generators/model_groonga/templates/unit_test.rb
78
+ - test-unit/Rakefile
79
+ - test-unit/TODO
80
+ - test-unit/bin/testrb
81
+ - test-unit/html/classic.html
82
+ - test-unit/html/index.html
83
+ - test-unit/html/index.html.ja
84
+ - test-unit/lib/test/unit.rb
85
+ - test-unit/lib/test/unit/assertionfailederror.rb
86
+ - test-unit/lib/test/unit/assertions.rb
87
+ - test-unit/lib/test/unit/attribute.rb
88
+ - test-unit/lib/test/unit/autorunner.rb
89
+ - test-unit/lib/test/unit/collector.rb
90
+ - test-unit/lib/test/unit/collector/descendant.rb
91
+ - test-unit/lib/test/unit/collector/dir.rb
92
+ - test-unit/lib/test/unit/collector/load.rb
93
+ - test-unit/lib/test/unit/collector/objectspace.rb
94
+ - test-unit/lib/test/unit/color-scheme.rb
95
+ - test-unit/lib/test/unit/color.rb
96
+ - test-unit/lib/test/unit/diff.rb
97
+ - test-unit/lib/test/unit/error.rb
98
+ - test-unit/lib/test/unit/exceptionhandler.rb
99
+ - test-unit/lib/test/unit/failure.rb
100
+ - test-unit/lib/test/unit/fixture.rb
101
+ - test-unit/lib/test/unit/notification.rb
102
+ - test-unit/lib/test/unit/omission.rb
103
+ - test-unit/lib/test/unit/pending.rb
104
+ - test-unit/lib/test/unit/priority.rb
105
+ - test-unit/lib/test/unit/runner/console.rb
106
+ - test-unit/lib/test/unit/runner/emacs.rb
107
+ - test-unit/lib/test/unit/testcase.rb
108
+ - test-unit/lib/test/unit/testresult.rb
109
+ - test-unit/lib/test/unit/testsuite.rb
110
+ - test-unit/lib/test/unit/ui/console/outputlevel.rb
111
+ - test-unit/lib/test/unit/ui/console/testrunner.rb
112
+ - test-unit/lib/test/unit/ui/emacs/testrunner.rb
113
+ - test-unit/lib/test/unit/ui/testrunner.rb
114
+ - test-unit/lib/test/unit/ui/testrunnermediator.rb
115
+ - test-unit/lib/test/unit/ui/testrunnerutilities.rb
116
+ - test-unit/lib/test/unit/util/backtracefilter.rb
117
+ - test-unit/lib/test/unit/util/method-owner-finder.rb
118
+ - test-unit/lib/test/unit/util/observable.rb
119
+ - test-unit/lib/test/unit/util/procwrapper.rb
120
+ - test-unit/lib/test/unit/version.rb
121
+ - test-unit/sample/adder.rb
122
+ - test-unit/sample/subtracter.rb
123
+ - test-unit/sample/tc_adder.rb
124
+ - test-unit/sample/tc_subtracter.rb
125
+ - test-unit/sample/test_user.rb
126
+ - test-unit/sample/ts_examples.rb
127
+ - test-unit/test/collector/test-descendant.rb
128
+ - test-unit/test/collector/test-load.rb
129
+ - test-unit/test/collector/test_dir.rb
130
+ - test-unit/test/collector/test_objectspace.rb
131
+ - test-unit/test/run-test.rb
132
+ - test-unit/test/test-attribute.rb
133
+ - test-unit/test/test-color-scheme.rb
134
+ - test-unit/test/test-color.rb
135
+ - test-unit/test/test-diff.rb
136
+ - test-unit/test/test-emacs-runner.rb
137
+ - test-unit/test/test-fixture.rb
138
+ - test-unit/test/test-notification.rb
139
+ - test-unit/test/test-omission.rb
140
+ - test-unit/test/test-pending.rb
141
+ - test-unit/test/test-priority.rb
142
+ - test-unit/test/test_assertions.rb
143
+ - test-unit/test/test_error.rb
144
+ - test-unit/test/test_failure.rb
145
+ - test-unit/test/test_testcase.rb
146
+ - test-unit/test/test_testresult.rb
147
+ - test-unit/test/test_testsuite.rb
148
+ - test-unit/test/testunit-test-util.rb
149
+ - test-unit/test/ui/test_testrunmediator.rb
150
+ - test-unit/test/util/test-method-owner-finder.rb
151
+ - test-unit/test/util/test_backtracefilter.rb
152
+ - test-unit/test/util/test_observable.rb
153
+ - test-unit/test/util/test_procwrapper.rb
154
+ - test/active-groonga-test-utils.rb
155
+ - test/fixtures/bookmark.rb
156
+ - test/fixtures/task.rb
157
+ - test/fixtures/user.rb
158
+ - test/run-test.rb
159
+ - test/test-associations.rb
160
+ - test/test-base.rb
161
+ - test/test-schema.rb
162
+ has_rdoc: true
163
+ homepage: http://groonga.rubyforge.org/
164
+ licenses: []
165
+
166
+ post_install_message:
167
+ rdoc_options:
168
+ - --main
169
+ - README.ja.rdoc
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: "0"
177
+ version:
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: "0"
183
+ version:
184
+ requirements: []
185
+
186
+ rubyforge_project: groonga
187
+ rubygems_version: 1.3.2
188
+ signing_key:
189
+ specification_version: 3
190
+ summary: A library to use groonga with ActiveRecord like API.
191
+ test_files:
192
+ - test/run-test.rb