strokedb 0.0.2.1 → 0.0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. data/README +18 -20
  2. data/bench.html +4001 -0
  3. data/bin/strokedb +14 -0
  4. data/examples/movies.rb +105 -0
  5. data/examples/movies2.rb +97 -0
  6. data/examples/strokewiki/README +28 -0
  7. data/examples/strokewiki/view/edit.xhtml +27 -0
  8. data/examples/strokewiki/view/new.xhtml +26 -0
  9. data/examples/strokewiki/view/pages.xhtml +27 -0
  10. data/examples/strokewiki/view/show.xhtml +40 -0
  11. data/examples/strokewiki/view/versions.xhtml +25 -0
  12. data/examples/strokewiki/wiki.rb +106 -0
  13. data/examples/todo.rb +92 -0
  14. data/lib/strokedb.rb +85 -0
  15. data/lib/{config → strokedb}/config.rb +14 -9
  16. data/lib/strokedb/console.rb +87 -0
  17. data/lib/strokedb/core_ext.rb +10 -0
  18. data/lib/{util/ext → strokedb/core_ext}/blank.rb +1 -1
  19. data/lib/{util/ext → strokedb/core_ext}/enumerable.rb +0 -0
  20. data/lib/{util/ext → strokedb/core_ext}/fixnum.rb +0 -0
  21. data/lib/strokedb/core_ext/float.rb +4 -0
  22. data/lib/{util/ext → strokedb/core_ext}/hash.rb +0 -0
  23. data/lib/strokedb/core_ext/infinity.rb +33 -0
  24. data/lib/strokedb/core_ext/kernel.rb +41 -0
  25. data/lib/strokedb/core_ext/object.rb +16 -0
  26. data/lib/{util/ext → strokedb/core_ext}/string.rb +28 -1
  27. data/lib/strokedb/core_ext/symbol.rb +13 -0
  28. data/lib/strokedb/data_structures.rb +5 -0
  29. data/lib/strokedb/data_structures/chunked_skiplist.rb +123 -0
  30. data/lib/{data_structures → strokedb/data_structures}/inverted_list.rb +0 -0
  31. data/lib/{data_structures → strokedb/data_structures}/point_query.rb +0 -0
  32. data/lib/strokedb/data_structures/simple_skiplist.rb +350 -0
  33. data/lib/{data_structures → strokedb/data_structures}/skiplist.rb +1 -1
  34. data/lib/{document → strokedb}/document.rb +180 -71
  35. data/lib/{document → strokedb/document}/callback.rb +0 -0
  36. data/lib/{document → strokedb/document}/delete.rb +2 -2
  37. data/lib/strokedb/document/dsl.rb +4 -0
  38. data/lib/{document → strokedb/document/dsl}/associations.rb +0 -0
  39. data/lib/{document → strokedb/document/dsl}/coercions.rb +0 -0
  40. data/lib/strokedb/document/dsl/meta_dsl.rb +7 -0
  41. data/lib/{document → strokedb/document/dsl}/validations.rb +26 -21
  42. data/lib/{document → strokedb/document/dsl}/virtualize.rb +0 -0
  43. data/lib/{document → strokedb/document}/meta.rb +92 -29
  44. data/lib/{document → strokedb/document}/slot.rb +17 -5
  45. data/lib/{document → strokedb/document}/util.rb +0 -0
  46. data/lib/{document → strokedb/document}/versions.rb +2 -2
  47. data/lib/strokedb/index.rb +2 -0
  48. data/lib/strokedb/nsurl.rb +24 -0
  49. data/lib/strokedb/store.rb +149 -0
  50. data/lib/strokedb/stores.rb +6 -0
  51. data/lib/{stores → strokedb/stores}/chainable_storage.rb +20 -14
  52. data/lib/strokedb/stores/file_storage.rb +118 -0
  53. data/lib/{stores/inverted_list_index → strokedb/stores}/inverted_list_file_storage.rb +50 -0
  54. data/lib/strokedb/stores/memory_storage.rb +80 -0
  55. data/lib/{stores → strokedb/stores}/remote_store.rb +10 -4
  56. data/lib/strokedb/sync.rb +4 -0
  57. data/lib/{sync → strokedb/sync}/chain_sync.rb +0 -0
  58. data/lib/{sync → strokedb/sync}/diff.rb +12 -1
  59. data/lib/{sync/stroke_diff → strokedb/sync/diff}/array.rb +1 -1
  60. data/lib/{sync/stroke_diff → strokedb/sync/diff}/default.rb +0 -0
  61. data/lib/{sync/stroke_diff → strokedb/sync/diff}/hash.rb +1 -1
  62. data/lib/{sync/stroke_diff → strokedb/sync/diff}/string.rb +1 -1
  63. data/lib/{sync → strokedb/sync}/lamport_timestamp.rb +0 -0
  64. data/lib/{sync → strokedb/sync}/store_sync.rb +15 -7
  65. data/lib/strokedb/transaction.rb +78 -0
  66. data/lib/{util → strokedb}/util.rb +14 -7
  67. data/lib/strokedb/util/attach_dsl.rb +29 -0
  68. data/lib/{util → strokedb/util}/blankslate.rb +0 -0
  69. data/lib/strokedb/util/class_optimization.rb +93 -0
  70. data/lib/{util → strokedb/util}/inflect.rb +0 -0
  71. data/lib/strokedb/util/java_util.rb +13 -0
  72. data/lib/{util → strokedb/util}/lazy_array.rb +0 -0
  73. data/lib/{util → strokedb/util}/lazy_mapping_array.rb +4 -0
  74. data/lib/{util → strokedb/util}/lazy_mapping_hash.rb +0 -0
  75. data/lib/{util → strokedb/util}/serialization.rb +21 -0
  76. data/lib/strokedb/util/uuid.rb +159 -0
  77. data/lib/{util → strokedb/util}/xml.rb +0 -0
  78. data/lib/{view → strokedb}/view.rb +2 -2
  79. data/lib/strokedb/volumes.rb +5 -0
  80. data/lib/strokedb/volumes/archive_volume.rb +165 -0
  81. data/lib/strokedb/volumes/block_volume.rb +169 -0
  82. data/lib/strokedb/volumes/distributed_pointer.rb +43 -0
  83. data/lib/strokedb/volumes/fixed_length_skiplist_volume.rb +109 -0
  84. data/lib/strokedb/volumes/map_volume.rb +268 -0
  85. data/meta/MANIFEST +175 -0
  86. data/script/console +2 -70
  87. data/spec/integration/remote_store_spec.rb +70 -0
  88. data/spec/integration/search_spec.rb +76 -0
  89. data/spec/integration/spec_helper.rb +1 -0
  90. data/spec/lib/spec_helper.rb +1 -0
  91. data/spec/lib/strokedb/config_spec.rb +250 -0
  92. data/spec/lib/strokedb/core_ext/blank_spec.rb +20 -0
  93. data/spec/lib/strokedb/core_ext/extract_spec.rb +42 -0
  94. data/spec/lib/strokedb/core_ext/float_spec.rb +62 -0
  95. data/spec/lib/strokedb/core_ext/infinity_spec.rb +40 -0
  96. data/spec/lib/strokedb/core_ext/spec_helper.rb +1 -0
  97. data/spec/lib/strokedb/core_ext/string_spec.rb +25 -0
  98. data/spec/lib/strokedb/core_ext/symbol_spec.rb +8 -0
  99. data/spec/lib/strokedb/data_structures/chunked_skiplist_spec.rb +144 -0
  100. data/spec/lib/strokedb/data_structures/inverted_list_spec.rb +172 -0
  101. data/spec/lib/strokedb/data_structures/simple_skiplist_spec.rb +200 -0
  102. data/spec/lib/strokedb/data_structures/skiplist_spec.rb +253 -0
  103. data/spec/lib/strokedb/data_structures/spec_helper.rb +1 -0
  104. data/spec/lib/strokedb/document/associations_spec.rb +319 -0
  105. data/spec/lib/strokedb/document/callbacks_spec.rb +134 -0
  106. data/spec/lib/strokedb/document/coercions_spec.rb +110 -0
  107. data/spec/lib/strokedb/document/document_spec.rb +1063 -0
  108. data/spec/lib/strokedb/document/meta_meta_spec.rb +30 -0
  109. data/spec/lib/strokedb/document/meta_spec.rb +435 -0
  110. data/spec/lib/strokedb/document/metaslot_spec.rb +43 -0
  111. data/spec/lib/strokedb/document/slot_spec.rb +130 -0
  112. data/spec/lib/strokedb/document/spec_helper.rb +1 -0
  113. data/spec/lib/strokedb/document/validations_spec.rb +1081 -0
  114. data/spec/lib/strokedb/document/virtualize_spec.rb +80 -0
  115. data/spec/lib/strokedb/nsurl_spec.rb +73 -0
  116. data/spec/lib/strokedb/spec_helper.rb +1 -0
  117. data/spec/lib/strokedb/stores/chained_storages_spec.rb +116 -0
  118. data/spec/lib/strokedb/stores/spec_helper.rb +1 -0
  119. data/spec/lib/strokedb/stores/store_spec.rb +201 -0
  120. data/spec/lib/strokedb/stores/transaction_spec.rb +107 -0
  121. data/spec/lib/strokedb/sync/chain_sync_spec.rb +43 -0
  122. data/spec/lib/strokedb/sync/diff_spec.rb +111 -0
  123. data/spec/lib/strokedb/sync/lamport_timestamp_spec.rb +174 -0
  124. data/spec/lib/strokedb/sync/slot_diff_spec.rb +164 -0
  125. data/spec/lib/strokedb/sync/spec_helper.rb +1 -0
  126. data/spec/lib/strokedb/sync/store_sync_spec.rb +181 -0
  127. data/spec/lib/strokedb/sync/stroke_diff/array_spec.rb +97 -0
  128. data/spec/lib/strokedb/sync/stroke_diff/complex_spec.rb +58 -0
  129. data/spec/lib/strokedb/sync/stroke_diff/hash_spec.rb +144 -0
  130. data/spec/lib/strokedb/sync/stroke_diff/scalar_spec.rb +23 -0
  131. data/spec/lib/strokedb/sync/stroke_diff/spec_helper.rb +25 -0
  132. data/spec/lib/strokedb/sync/stroke_diff/string_spec.rb +61 -0
  133. data/spec/lib/strokedb/util/attach_dsl_spec.rb +45 -0
  134. data/spec/lib/strokedb/util/inflect_spec.rb +14 -0
  135. data/spec/lib/strokedb/util/lazy_array_spec.rb +157 -0
  136. data/spec/lib/strokedb/util/lazy_mapping_array_spec.rb +174 -0
  137. data/spec/lib/strokedb/util/lazy_mapping_hash_spec.rb +92 -0
  138. data/spec/lib/strokedb/util/spec_helper.rb +1 -0
  139. data/spec/lib/strokedb/util/uuid_spec.rb +46 -0
  140. data/spec/lib/strokedb/view_spec.rb +228 -0
  141. data/spec/lib/strokedb/volumes/archive_volume_spec.rb +105 -0
  142. data/spec/lib/strokedb/volumes/block_volume_spec.rb +100 -0
  143. data/spec/lib/strokedb/volumes/distributed_pointer_spec.rb +14 -0
  144. data/spec/lib/strokedb/volumes/fixed_length_skiplist_volume_spec.rb +177 -0
  145. data/spec/lib/strokedb/volumes/map_volume_spec.rb +172 -0
  146. data/spec/lib/strokedb/volumes/spec_helper.rb +1 -0
  147. data/spec/regression/docref_spec.rb +94 -0
  148. data/spec/regression/meta_spec.rb +23 -0
  149. data/spec/regression/spec_helper.rb +1 -0
  150. data/spec/regression/sync_spec.rb +36 -0
  151. data/spec/spec.opts +7 -0
  152. data/spec/spec_helper.rb +37 -0
  153. data/spec/temp/storages/TIMESTAMP +1 -0
  154. data/spec/temp/storages/UUID +1 -0
  155. data/spec/temp/storages/database-sync/TIMESTAMP +1 -0
  156. data/spec/temp/storages/database-sync/UUID +1 -0
  157. data/spec/temp/storages/database-sync/config +1 -0
  158. data/spec/temp/storages/database-sync/file/LAST +1 -0
  159. data/spec/temp/storages/database-sync/file/bd/f6/bdf675e5-8a7b-494e-97f2-f74a14ccd95d.av +0 -0
  160. data/spec/temp/storages/database-sync/file/uindex.wal +0 -0
  161. data/spec/temp/storages/database-sync/inverted_list_file/INVERTED_INDEX +1 -0
  162. data/spec/temp/storages/inverted_list_storage/INVERTED_INDEX +0 -0
  163. data/strokedb.gemspec +120 -0
  164. data/task/benchmark.task +9 -0
  165. data/task/ditz.task +30 -0
  166. data/task/echoe.rb +17 -0
  167. data/task/rcov.task +50 -0
  168. data/task/rdoc.task +10 -0
  169. data/task/rspec.task +0 -0
  170. data/vendor/java_inline.rb +106 -0
  171. data/vendor/rbmodexcl/mrimodexcl.rb +82 -0
  172. data/vendor/rbmodexcl/rbmodexcl.rb +5 -0
  173. data/vendor/rbmodexcl/rbxmodexcl.rb +48 -0
  174. data/vendor/rbmodexcl/spec/unextend_spec.rb +50 -0
  175. data/vendor/rbmodexcl/spec/uninclude_spec.rb +26 -0
  176. metadata +271 -79
  177. data/CONTRIBUTORS +0 -7
  178. data/CREDITS +0 -13
  179. data/bin/sdbc +0 -2
  180. data/lib/init.rb +0 -57
  181. data/lib/stores/inverted_list_index/inverted_list_index.rb +0 -49
  182. data/lib/stores/skiplist_store/chunk.rb +0 -119
  183. data/lib/stores/skiplist_store/chunk_storage.rb +0 -21
  184. data/lib/stores/skiplist_store/file_chunk_storage.rb +0 -44
  185. data/lib/stores/skiplist_store/memory_chunk_storage.rb +0 -37
  186. data/lib/stores/skiplist_store/skiplist_store.rb +0 -217
  187. data/lib/stores/store.rb +0 -5
  188. data/lib/sync/stroke_diff/stroke_diff.rb +0 -9
  189. data/lib/util/ext/object.rb +0 -8
  190. data/lib/util/java_util.rb +0 -9
  191. data/lib/util/trigger_partition.rb +0 -136
  192. data/strokedb.rb +0 -75
@@ -0,0 +1,10 @@
1
+ namespace :rdoc do
2
+ Rake::RDocTask.new :html do |rd|
3
+ rd.main = "README"
4
+ rd.rdoc_dir = :meta / :rdoc
5
+ rd.rdoc_files.include("README", "lib/**/*.rb")
6
+ end
7
+ task :open do
8
+ system 'open ' + :meta / :rdoc / 'index.html' if PLATFORM['darwin']
9
+ end
10
+ end
File without changes
@@ -0,0 +1,106 @@
1
+ # Very alpha patch to RubyInline supporting inlining Java code.
2
+ # Copyright 2008 Charles Nutter.
3
+ # See http://headius.blogspot.com/2008/03/rubyinline-for-jruby-easy.html
4
+
5
+ require 'rubygems'
6
+ require 'inline'
7
+ require 'java'
8
+
9
+ # Add the inline cache dir to CLASSPATH
10
+ $CLASSPATH << Inline.directory
11
+
12
+ module Inline
13
+
14
+ # A Java builder for RubyInline. Provides the basic methods needed to
15
+ # allow assembling a set of Java methods that compile into a class and
16
+ # get bound to the same names in the containing module.
17
+ class Java
18
+ JFile = java.io.File
19
+ import javax.tools.ToolProvider
20
+ import javax.tools.SimpleJavaFileObject
21
+ import javax.tools.StandardLocation
22
+
23
+ def initialize(mod)
24
+ @context = mod
25
+ @src = ""
26
+ @imports = []
27
+ @sigs = []
28
+ end
29
+
30
+ def load_cache
31
+ false
32
+ end
33
+
34
+ # Set the package to use for the Java class being generated, as in
35
+ # builder.package "org.foo.bar"
36
+ def package(pkg)
37
+ @pkg = pkg
38
+ end
39
+
40
+ # Add an "import" line with the given class, as in
41
+ # builder.import "java.util.ArrayList". The imports will be composed
42
+ # into an appropriate block of code and added to the top of the source.
43
+ def import(cls)
44
+ @imports << cls
45
+ end
46
+
47
+ # Add a Java method to the built Java source. This expects the method to
48
+ # be public and static, so it can be called as a function.
49
+ def java(src)
50
+ @src << src << "\n"
51
+ signature = src.match(/public static\W+(\w+)\W+([a-zA-Z0-9_]+)\((.*)\)/)
52
+ raise "Could not parse method signature" unless signature
53
+ @sigs << [signature[1], signature[2], signature[3]]
54
+ end
55
+
56
+ def build
57
+ compiler = ToolProvider.system_java_compiler
58
+ file_mgr = compiler.get_standard_file_manager(nil, nil, nil)
59
+ file_mgr.set_location(StandardLocation::CLASS_OUTPUT, [JFile.new(Inline.directory)])
60
+
61
+ if @pkg
62
+ directory = "#{Inline.directory}/#{@pkg.gsub('.', '/')}"
63
+ unless File.directory? directory then
64
+ $stderr.puts "NOTE: creating #{directory} for RubyInline" if $DEBUG
65
+ FileUtils.mkdir_p directory
66
+ end
67
+
68
+ @name = "Java#{@src.hash.abs}"
69
+ @load_name = "#{@pkg}.#{@name}"
70
+ filename = "#{directory}/#{@name}.java"
71
+
72
+ imports = "import " + @imports.join(";\nimport ") + ";" if @imports.size > 0
73
+ full_src = "
74
+ package #{@pkg};
75
+ #{imports}
76
+ public class #{@name} {
77
+ #{@src}
78
+ }
79
+ "
80
+ else
81
+ @load_name = @name = "Java#{@src.hash.abs}"
82
+ filename = "#{Inline.directory}/#{@name}.java"
83
+
84
+ imports = "import " + @imports.join(";\nimport ") + ";" if @imports.size > 0
85
+ full_src = "
86
+ #{imports}
87
+ public class #{@name} {
88
+ #{@src}
89
+ }
90
+ "
91
+ end
92
+
93
+ File.open(filename, "w") {|file| file.write(full_src)}
94
+ file_objs = file_mgr.get_java_file_objects_from_strings([filename])
95
+
96
+ compiler.get_task(nil, file_mgr, nil, nil, nil, file_objs).call
97
+ file_mgr.close
98
+ end
99
+
100
+ def load
101
+ @sigs.each do |sig|
102
+ @context.module_eval "const_set :#{@name}, ::Java::#{@load_name}; p '#{@load_name}'; def #{sig[1]}(*args); #{@name}.#{sig[1]}(*args); end"
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,82 @@
1
+ require 'rubygems'
2
+ require 'inline'
3
+
4
+ class Object
5
+ inline(:C) do |builder|
6
+ builder.prefix %{
7
+ static VALUE
8
+ rb_obj_dummy()
9
+ {
10
+ return Qnil;
11
+ }
12
+ }
13
+ builder.add_to_init %{
14
+ rb_define_private_method(rb_cModule, "unextended", rb_obj_dummy, 1);
15
+ }
16
+ builder.c %{
17
+ VALUE unextend(VALUE mod)
18
+ {
19
+ VALUE p, prev;
20
+ Check_Type(mod, T_MODULE);
21
+ if (mod == rb_mKernel)
22
+ rb_raise(rb_eArgError, "unextending Kernel is prohibited");
23
+
24
+
25
+ p = rb_singleton_class(self);
26
+
27
+ while (p) {
28
+ if (p == mod || RCLASS(p)->m_tbl == RCLASS(mod)->m_tbl) {
29
+ RCLASS(prev)->super = RCLASS(p)->super;
30
+ rb_clear_cache();
31
+ rb_funcall(mod, rb_intern("unextended"), 1, self);
32
+ return self;
33
+ }
34
+ prev = p;
35
+ p = RCLASS(p)->super;
36
+ }
37
+ return self;
38
+ }
39
+ }
40
+ end
41
+
42
+ end
43
+
44
+ class Class
45
+
46
+ inline(:C) do |builder|
47
+ builder.prefix %{
48
+ static VALUE
49
+ rb_obj_dummy()
50
+ {
51
+ return Qnil;
52
+ }
53
+ }
54
+ builder.add_to_init %{
55
+ rb_define_private_method(rb_cModule, "unincluded", rb_obj_dummy, 1);
56
+ }
57
+ builder.c %{
58
+ VALUE uninclude(VALUE mod)
59
+ {
60
+ VALUE p, prev;
61
+ Check_Type(mod, T_MODULE);
62
+ if (mod == rb_mKernel)
63
+ rb_raise(rb_eArgError, "unincluding Kernel is prohibited");
64
+
65
+ p = self;
66
+
67
+ while (p) {
68
+ if (p == mod || RCLASS(p)->m_tbl == RCLASS(mod)->m_tbl) {
69
+ RCLASS(prev)->super = RCLASS(p)->super;
70
+ rb_clear_cache();
71
+ rb_funcall(mod, rb_intern("unincluded"), 1, self);
72
+ return self;
73
+ }
74
+ prev = p;
75
+ p = RCLASS(p)->super;
76
+ }
77
+ return self;
78
+ }
79
+ }
80
+ end
81
+
82
+ end
@@ -0,0 +1,5 @@
1
+ if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
2
+ require File.join(File.dirname(__FILE__),'rbxmodexcl')
3
+ else
4
+ require File.join(File.dirname(__FILE__),'mrimodexcl')
5
+ end
@@ -0,0 +1,48 @@
1
+
2
+ class Object
3
+
4
+ def unextend(mod)
5
+ raise ArgumentError, "Module is expected" unless mod.is_a?(Module)
6
+ raise ArgumentError, "unextending Kernel is prohibited" if mod == Kernel
7
+ prev = p = metaclass
8
+ while p
9
+ if (p == mod || (p.respond_to?(:module) && p.module == mod))
10
+ prev.set_superclass(p.direct_superclass)
11
+ # remove cache
12
+ self.methods.each do |name|
13
+ name = self.metaclass.send(:normalize_name,name)
14
+ Rubinius::VM.reset_method_cache(name)
15
+ end
16
+ #
17
+ mod.send(:unextended, self) if mod.respond_to?(:unextended)
18
+ return self
19
+ end
20
+ prev = p
21
+ p = p.direct_superclass
22
+ end
23
+
24
+ end
25
+
26
+ def uninclude(mod)
27
+ raise ArgumentError, "Module is expected" unless mod.is_a?(Module)
28
+ raise ArgumentError, "unincluding Kernel is prohibited" if mod == Kernel
29
+ prev = p = self
30
+ while p
31
+ if (p == mod || (p.respond_to?(:module) && p.module == mod))
32
+ prev.superclass=(p.direct_superclass)
33
+ # remove cache
34
+ self.methods.each do |name|
35
+ name = self.metaclass.send(:normalize_name,name)
36
+ Rubinius::VM.reset_method_cache(name)
37
+ end
38
+ #
39
+ mod.send(:unincluded, self) if mod.respond_to?(:unincluded)
40
+ return self
41
+ end
42
+ prev = p
43
+ p = p.direct_superclass
44
+ end
45
+
46
+ end
47
+
48
+ end
@@ -0,0 +1,50 @@
1
+ require File.dirname(__FILE__) + '/../rbmodexcl'
2
+
3
+ describe Class, "extended with module" do
4
+
5
+ before(:each) do
6
+ @klass = Class.new
7
+ @module = Module.new do
8
+ def modded? ; true ; end
9
+ end
10
+ @klass.extend(@module)
11
+ @klass.should be_a_kind_of(@module)
12
+ end
13
+
14
+ it "should be unextendable with #unextend" do
15
+ @klass.unextend(@module)
16
+ @klass.should_not be_a_kind_of(@module)
17
+ @klass.should_not respond_to(:modded?)
18
+ end
19
+
20
+ it "should call Module.unextended on #unextend" do
21
+ @module.should_receive(:unextended).with(@klass)
22
+ @klass.unextend(@module)
23
+ end
24
+
25
+ end
26
+
27
+
28
+ describe Object, "extended with module" do
29
+
30
+ before(:each) do
31
+ @object = Object.new
32
+ @module = Module.new do
33
+ def modded? ; true ; end
34
+ end
35
+ @object.extend(@module)
36
+ @object.should be_a_kind_of(@module)
37
+ end
38
+
39
+ it "should be unextendable with #unextend" do
40
+ @object.unextend(@module)
41
+ @object.should_not be_a_kind_of(@module)
42
+ @object.should_not respond_to(:modded?)
43
+ end
44
+
45
+ it "should call Module.unextended on #unextend" do
46
+ @module.should_receive(:unextended).with(@object)
47
+ @object.unextend(@module)
48
+ end
49
+
50
+ end
@@ -0,0 +1,26 @@
1
+ require File.dirname(__FILE__) + '/../rbmodexcl'
2
+
3
+ describe Class, "with module included" do
4
+
5
+ before(:each) do
6
+ $module = Module.new do
7
+ def modded? ; true ; end
8
+ end
9
+ @klass = Class.new do
10
+ include $module
11
+ end
12
+ @klass.new.should be_a_kind_of($module)
13
+ end
14
+
15
+ it "should be able to uninclude module with #uninclude" do
16
+ @klass.uninclude($module)
17
+ @klass.new.should_not be_a_kind_of($module)
18
+ @klass.new.should_not respond_to(:modded?)
19
+ end
20
+
21
+ it "should call Module.unincluded on #uninclude" do
22
+ $module.should_receive(:unincluded).with(@klass)
23
+ @klass.uninclude($module)
24
+ end
25
+
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strokedb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.1
4
+ version: 0.0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurii Rashkovskii, Oleg Andreev
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-15 00:00:00 +03:00
12
+ date: 2008-05-22 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -18,6 +18,9 @@ dependencies:
18
18
  version_requirements: !ruby/object:Gem::Requirement
19
19
  requirements:
20
20
  - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "0"
23
+ - - "="
21
24
  - !ruby/object:Gem::Version
22
25
  version: 1.1.2
23
26
  version:
@@ -27,6 +30,9 @@ dependencies:
27
30
  version_requirements: !ruby/object:Gem::Requirement
28
31
  requirements:
29
32
  - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ - - "="
30
36
  - !ruby/object:Gem::Version
31
37
  version: 1.0.3
32
38
  version:
@@ -36,94 +42,280 @@ dependencies:
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ - - "="
39
48
  - !ruby/object:Gem::Version
40
49
  version: 1.1.2
41
50
  version:
42
- description: StrokeDB is an embeddable distributed document database written in Ruby. It is schema-free, it scales infinitely, it even tracks revisions and perfectly integrates with Ruby applications.
43
- email: strokedb@googlegroups.com
51
+ description: StrokeDB is an embeddable, distributed, document-based database written in Ruby. It is schema-free (allowing you to define any attribute on any object at any time), it scales infinitely, it even allows free versioning and integrates perfectly with Ruby applications.
52
+ email:
53
+ - strokedb@googlegroups.com
44
54
  executables:
45
- - sdbc
55
+ - strokedb
46
56
  extensions: []
47
57
 
48
- extra_rdoc_files: []
49
-
58
+ extra_rdoc_files:
59
+ - bin/strokedb
60
+ - lib/strokedb/config.rb
61
+ - lib/strokedb/console.rb
62
+ - lib/strokedb/core_ext/blank.rb
63
+ - lib/strokedb/core_ext/enumerable.rb
64
+ - lib/strokedb/core_ext/fixnum.rb
65
+ - lib/strokedb/core_ext/float.rb
66
+ - lib/strokedb/core_ext/hash.rb
67
+ - lib/strokedb/core_ext/infinity.rb
68
+ - lib/strokedb/core_ext/kernel.rb
69
+ - lib/strokedb/core_ext/object.rb
70
+ - lib/strokedb/core_ext/string.rb
71
+ - lib/strokedb/core_ext/symbol.rb
72
+ - lib/strokedb/core_ext.rb
73
+ - lib/strokedb/data_structures/chunked_skiplist.rb
74
+ - lib/strokedb/data_structures/inverted_list.rb
75
+ - lib/strokedb/data_structures/point_query.rb
76
+ - lib/strokedb/data_structures/simple_skiplist.rb
77
+ - lib/strokedb/data_structures/skiplist.rb
78
+ - lib/strokedb/data_structures.rb
79
+ - lib/strokedb/document/callback.rb
80
+ - lib/strokedb/document/delete.rb
81
+ - lib/strokedb/document/dsl/associations.rb
82
+ - lib/strokedb/document/dsl/coercions.rb
83
+ - lib/strokedb/document/dsl/meta_dsl.rb
84
+ - lib/strokedb/document/dsl/validations.rb
85
+ - lib/strokedb/document/dsl/virtualize.rb
86
+ - lib/strokedb/document/dsl.rb
87
+ - lib/strokedb/document/meta.rb
88
+ - lib/strokedb/document/slot.rb
89
+ - lib/strokedb/document/util.rb
90
+ - lib/strokedb/document/versions.rb
91
+ - lib/strokedb/document.rb
92
+ - lib/strokedb/index.rb
93
+ - lib/strokedb/nsurl.rb
94
+ - lib/strokedb/store.rb
95
+ - lib/strokedb/stores/chainable_storage.rb
96
+ - lib/strokedb/stores/file_storage.rb
97
+ - lib/strokedb/stores/inverted_list_file_storage.rb
98
+ - lib/strokedb/stores/memory_storage.rb
99
+ - lib/strokedb/stores/remote_store.rb
100
+ - lib/strokedb/stores.rb
101
+ - lib/strokedb/sync/chain_sync.rb
102
+ - lib/strokedb/sync/diff/array.rb
103
+ - lib/strokedb/sync/diff/default.rb
104
+ - lib/strokedb/sync/diff/hash.rb
105
+ - lib/strokedb/sync/diff/string.rb
106
+ - lib/strokedb/sync/diff.rb
107
+ - lib/strokedb/sync/lamport_timestamp.rb
108
+ - lib/strokedb/sync/store_sync.rb
109
+ - lib/strokedb/sync.rb
110
+ - lib/strokedb/transaction.rb
111
+ - lib/strokedb/util/attach_dsl.rb
112
+ - lib/strokedb/util/blankslate.rb
113
+ - lib/strokedb/util/class_optimization.rb
114
+ - lib/strokedb/util/inflect.rb
115
+ - lib/strokedb/util/java_util.rb
116
+ - lib/strokedb/util/lazy_array.rb
117
+ - lib/strokedb/util/lazy_mapping_array.rb
118
+ - lib/strokedb/util/lazy_mapping_hash.rb
119
+ - lib/strokedb/util/serialization.rb
120
+ - lib/strokedb/util/uuid.rb
121
+ - lib/strokedb/util/xml.rb
122
+ - lib/strokedb/util.rb
123
+ - lib/strokedb/view.rb
124
+ - lib/strokedb/volumes/archive_volume.rb
125
+ - lib/strokedb/volumes/block_volume.rb
126
+ - lib/strokedb/volumes/distributed_pointer.rb
127
+ - lib/strokedb/volumes/fixed_length_skiplist_volume.rb
128
+ - lib/strokedb/volumes/map_volume.rb
129
+ - lib/strokedb/volumes.rb
130
+ - lib/strokedb.rb
131
+ - README
50
132
  files:
51
- - bin/sdbc
133
+ - bench.html
134
+ - bin/strokedb
135
+ - examples/movies.rb
136
+ - examples/movies2.rb
137
+ - examples/strokewiki/README
138
+ - examples/strokewiki/view/edit.xhtml
139
+ - examples/strokewiki/view/new.xhtml
140
+ - examples/strokewiki/view/pages.xhtml
141
+ - examples/strokewiki/view/show.xhtml
142
+ - examples/strokewiki/view/versions.xhtml
143
+ - examples/strokewiki/wiki.rb
144
+ - examples/todo.rb
145
+ - lib/strokedb/config.rb
146
+ - lib/strokedb/console.rb
147
+ - lib/strokedb/core_ext/blank.rb
148
+ - lib/strokedb/core_ext/enumerable.rb
149
+ - lib/strokedb/core_ext/fixnum.rb
150
+ - lib/strokedb/core_ext/float.rb
151
+ - lib/strokedb/core_ext/hash.rb
152
+ - lib/strokedb/core_ext/infinity.rb
153
+ - lib/strokedb/core_ext/kernel.rb
154
+ - lib/strokedb/core_ext/object.rb
155
+ - lib/strokedb/core_ext/string.rb
156
+ - lib/strokedb/core_ext/symbol.rb
157
+ - lib/strokedb/core_ext.rb
158
+ - lib/strokedb/data_structures/chunked_skiplist.rb
159
+ - lib/strokedb/data_structures/inverted_list.rb
160
+ - lib/strokedb/data_structures/point_query.rb
161
+ - lib/strokedb/data_structures/simple_skiplist.rb
162
+ - lib/strokedb/data_structures/skiplist.rb
163
+ - lib/strokedb/data_structures.rb
164
+ - lib/strokedb/document/callback.rb
165
+ - lib/strokedb/document/delete.rb
166
+ - lib/strokedb/document/dsl/associations.rb
167
+ - lib/strokedb/document/dsl/coercions.rb
168
+ - lib/strokedb/document/dsl/meta_dsl.rb
169
+ - lib/strokedb/document/dsl/validations.rb
170
+ - lib/strokedb/document/dsl/virtualize.rb
171
+ - lib/strokedb/document/dsl.rb
172
+ - lib/strokedb/document/meta.rb
173
+ - lib/strokedb/document/slot.rb
174
+ - lib/strokedb/document/util.rb
175
+ - lib/strokedb/document/versions.rb
176
+ - lib/strokedb/document.rb
177
+ - lib/strokedb/index.rb
178
+ - lib/strokedb/nsurl.rb
179
+ - lib/strokedb/store.rb
180
+ - lib/strokedb/stores/chainable_storage.rb
181
+ - lib/strokedb/stores/file_storage.rb
182
+ - lib/strokedb/stores/inverted_list_file_storage.rb
183
+ - lib/strokedb/stores/memory_storage.rb
184
+ - lib/strokedb/stores/remote_store.rb
185
+ - lib/strokedb/stores.rb
186
+ - lib/strokedb/sync/chain_sync.rb
187
+ - lib/strokedb/sync/diff/array.rb
188
+ - lib/strokedb/sync/diff/default.rb
189
+ - lib/strokedb/sync/diff/hash.rb
190
+ - lib/strokedb/sync/diff/string.rb
191
+ - lib/strokedb/sync/diff.rb
192
+ - lib/strokedb/sync/lamport_timestamp.rb
193
+ - lib/strokedb/sync/store_sync.rb
194
+ - lib/strokedb/sync.rb
195
+ - lib/strokedb/transaction.rb
196
+ - lib/strokedb/util/attach_dsl.rb
197
+ - lib/strokedb/util/blankslate.rb
198
+ - lib/strokedb/util/class_optimization.rb
199
+ - lib/strokedb/util/inflect.rb
200
+ - lib/strokedb/util/java_util.rb
201
+ - lib/strokedb/util/lazy_array.rb
202
+ - lib/strokedb/util/lazy_mapping_array.rb
203
+ - lib/strokedb/util/lazy_mapping_hash.rb
204
+ - lib/strokedb/util/serialization.rb
205
+ - lib/strokedb/util/uuid.rb
206
+ - lib/strokedb/util/xml.rb
207
+ - lib/strokedb/util.rb
208
+ - lib/strokedb/view.rb
209
+ - lib/strokedb/volumes/archive_volume.rb
210
+ - lib/strokedb/volumes/block_volume.rb
211
+ - lib/strokedb/volumes/distributed_pointer.rb
212
+ - lib/strokedb/volumes/fixed_length_skiplist_volume.rb
213
+ - lib/strokedb/volumes/map_volume.rb
214
+ - lib/strokedb/volumes.rb
215
+ - lib/strokedb.rb
52
216
  - README
53
- - CONTRIBUTORS
54
- - CREDITS
55
217
  - script/console
56
- - lib/config
57
- - lib/config/config.rb
58
- - lib/data_structures
59
- - lib/data_structures/inverted_list.rb
60
- - lib/data_structures/point_query.rb
61
- - lib/data_structures/skiplist.rb
62
- - lib/document
63
- - lib/document/associations.rb
64
- - lib/document/callback.rb
65
- - lib/document/coercions.rb
66
- - lib/document/delete.rb
67
- - lib/document/document.rb
68
- - lib/document/meta.rb
69
- - lib/document/slot.rb
70
- - lib/document/util.rb
71
- - lib/document/validations.rb
72
- - lib/document/versions.rb
73
- - lib/document/virtualize.rb
74
- - lib/init.rb
75
- - lib/stores
76
- - lib/stores/chainable_storage.rb
77
- - lib/stores/inverted_list_index
78
- - lib/stores/inverted_list_index/inverted_list_file_storage.rb
79
- - lib/stores/inverted_list_index/inverted_list_index.rb
80
- - lib/stores/remote_store.rb
81
- - lib/stores/skiplist_store
82
- - lib/stores/skiplist_store/chunk.rb
83
- - lib/stores/skiplist_store/chunk_storage.rb
84
- - lib/stores/skiplist_store/file_chunk_storage.rb
85
- - lib/stores/skiplist_store/memory_chunk_storage.rb
86
- - lib/stores/skiplist_store/skiplist_store.rb
87
- - lib/stores/store.rb
88
- - lib/sync
89
- - lib/sync/chain_sync.rb
90
- - lib/sync/diff.rb
91
- - lib/sync/lamport_timestamp.rb
92
- - lib/sync/store_sync.rb
93
- - lib/sync/stroke_diff
94
- - lib/sync/stroke_diff/array.rb
95
- - lib/sync/stroke_diff/default.rb
96
- - lib/sync/stroke_diff/hash.rb
97
- - lib/sync/stroke_diff/string.rb
98
- - lib/sync/stroke_diff/stroke_diff.rb
99
- - lib/util
100
- - lib/util/blankslate.rb
101
- - lib/util/ext
102
- - lib/util/ext/blank.rb
103
- - lib/util/ext/enumerable.rb
104
- - lib/util/ext/fixnum.rb
105
- - lib/util/ext/hash.rb
106
- - lib/util/ext/object.rb
107
- - lib/util/ext/string.rb
108
- - lib/util/inflect.rb
109
- - lib/util/java_util.rb
110
- - lib/util/lazy_array.rb
111
- - lib/util/lazy_mapping_array.rb
112
- - lib/util/lazy_mapping_hash.rb
113
- - lib/util/serialization.rb
114
- - lib/util/trigger_partition.rb
115
- - lib/util/util.rb
116
- - lib/util/xml.rb
117
- - lib/view
118
- - lib/view/view.rb
119
- - strokedb.rb
218
+ - spec/integration/remote_store_spec.rb
219
+ - spec/integration/search_spec.rb
220
+ - spec/integration/spec_helper.rb
221
+ - spec/lib/spec_helper.rb
222
+ - spec/lib/strokedb/config_spec.rb
223
+ - spec/lib/strokedb/core_ext/blank_spec.rb
224
+ - spec/lib/strokedb/core_ext/extract_spec.rb
225
+ - spec/lib/strokedb/core_ext/float_spec.rb
226
+ - spec/lib/strokedb/core_ext/infinity_spec.rb
227
+ - spec/lib/strokedb/core_ext/spec_helper.rb
228
+ - spec/lib/strokedb/core_ext/string_spec.rb
229
+ - spec/lib/strokedb/core_ext/symbol_spec.rb
230
+ - spec/lib/strokedb/data_structures/chunked_skiplist_spec.rb
231
+ - spec/lib/strokedb/data_structures/inverted_list_spec.rb
232
+ - spec/lib/strokedb/data_structures/simple_skiplist_spec.rb
233
+ - spec/lib/strokedb/data_structures/skiplist_spec.rb
234
+ - spec/lib/strokedb/data_structures/spec_helper.rb
235
+ - spec/lib/strokedb/document/associations_spec.rb
236
+ - spec/lib/strokedb/document/callbacks_spec.rb
237
+ - spec/lib/strokedb/document/coercions_spec.rb
238
+ - spec/lib/strokedb/document/document_spec.rb
239
+ - spec/lib/strokedb/document/meta_meta_spec.rb
240
+ - spec/lib/strokedb/document/meta_spec.rb
241
+ - spec/lib/strokedb/document/metaslot_spec.rb
242
+ - spec/lib/strokedb/document/slot_spec.rb
243
+ - spec/lib/strokedb/document/spec_helper.rb
244
+ - spec/lib/strokedb/document/validations_spec.rb
245
+ - spec/lib/strokedb/document/virtualize_spec.rb
246
+ - spec/lib/strokedb/nsurl_spec.rb
247
+ - spec/lib/strokedb/spec_helper.rb
248
+ - spec/lib/strokedb/stores/chained_storages_spec.rb
249
+ - spec/lib/strokedb/stores/spec_helper.rb
250
+ - spec/lib/strokedb/stores/store_spec.rb
251
+ - spec/lib/strokedb/stores/transaction_spec.rb
252
+ - spec/lib/strokedb/sync/chain_sync_spec.rb
253
+ - spec/lib/strokedb/sync/diff_spec.rb
254
+ - spec/lib/strokedb/sync/lamport_timestamp_spec.rb
255
+ - spec/lib/strokedb/sync/slot_diff_spec.rb
256
+ - spec/lib/strokedb/sync/spec_helper.rb
257
+ - spec/lib/strokedb/sync/store_sync_spec.rb
258
+ - spec/lib/strokedb/sync/stroke_diff/array_spec.rb
259
+ - spec/lib/strokedb/sync/stroke_diff/complex_spec.rb
260
+ - spec/lib/strokedb/sync/stroke_diff/hash_spec.rb
261
+ - spec/lib/strokedb/sync/stroke_diff/scalar_spec.rb
262
+ - spec/lib/strokedb/sync/stroke_diff/spec_helper.rb
263
+ - spec/lib/strokedb/sync/stroke_diff/string_spec.rb
264
+ - spec/lib/strokedb/util/attach_dsl_spec.rb
265
+ - spec/lib/strokedb/util/inflect_spec.rb
266
+ - spec/lib/strokedb/util/lazy_array_spec.rb
267
+ - spec/lib/strokedb/util/lazy_mapping_array_spec.rb
268
+ - spec/lib/strokedb/util/lazy_mapping_hash_spec.rb
269
+ - spec/lib/strokedb/util/spec_helper.rb
270
+ - spec/lib/strokedb/util/uuid_spec.rb
271
+ - spec/lib/strokedb/view_spec.rb
272
+ - spec/lib/strokedb/volumes/archive_volume_spec.rb
273
+ - spec/lib/strokedb/volumes/block_volume_spec.rb
274
+ - spec/lib/strokedb/volumes/distributed_pointer_spec.rb
275
+ - spec/lib/strokedb/volumes/fixed_length_skiplist_volume_spec.rb
276
+ - spec/lib/strokedb/volumes/map_volume_spec.rb
277
+ - spec/lib/strokedb/volumes/spec_helper.rb
278
+ - spec/regression/docref_spec.rb
279
+ - spec/regression/meta_spec.rb
280
+ - spec/regression/spec_helper.rb
281
+ - spec/regression/sync_spec.rb
282
+ - spec/spec.opts
283
+ - spec/spec_helper.rb
284
+ - spec/temp/storages/database-sync/config
285
+ - spec/temp/storages/database-sync/file/bd/f6/bdf675e5-8a7b-494e-97f2-f74a14ccd95d.av
286
+ - spec/temp/storages/database-sync/file/LAST
287
+ - spec/temp/storages/database-sync/file/uindex.wal
288
+ - spec/temp/storages/database-sync/inverted_list_file/INVERTED_INDEX
289
+ - spec/temp/storages/database-sync/TIMESTAMP
290
+ - spec/temp/storages/database-sync/UUID
291
+ - spec/temp/storages/inverted_list_storage/INVERTED_INDEX
292
+ - spec/temp/storages/TIMESTAMP
293
+ - spec/temp/storages/UUID
294
+ - strokedb.gemspec
295
+ - task/benchmark.task
296
+ - task/ditz.task
297
+ - task/echoe.rb
298
+ - task/rcov.task
299
+ - task/rdoc.task
300
+ - task/rspec.task
301
+ - vendor/java_inline.rb
302
+ - vendor/rbmodexcl/mrimodexcl.rb
303
+ - vendor/rbmodexcl/rbmodexcl.rb
304
+ - vendor/rbmodexcl/rbxmodexcl.rb
305
+ - vendor/rbmodexcl/spec/unextend_spec.rb
306
+ - vendor/rbmodexcl/spec/uninclude_spec.rb
307
+ - meta/MANIFEST
120
308
  has_rdoc: true
121
309
  homepage: http://strokedb.com
122
310
  post_install_message:
123
- rdoc_options: []
124
-
311
+ rdoc_options:
312
+ - --line-numbers
313
+ - --inline-source
314
+ - --title
315
+ - Strokedb
316
+ - --main
317
+ - README
125
318
  require_paths:
126
- - .
127
319
  - lib
128
320
  required_ruby_version: !ruby/object:Gem::Requirement
129
321
  requirements:
@@ -140,9 +332,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
332
  requirements: []
141
333
 
142
334
  rubyforge_project: strokedb
143
- rubygems_version: 1.0.1
335
+ rubygems_version: 1.1.1
144
336
  signing_key:
145
337
  specification_version: 2
146
- summary: an embeddable distributed document database written in Ruby
338
+ summary: embeddable, distributed, document-based database
147
339
  test_files: []
148
340