public
Description: StrokeDB is an embeddable distributed document database written in Ruby
Homepage: http://strokedb.com/
Clone URL: git://github.com/yrashk/strokedb.git
added pereklyuchatel STORAGE=file|mem for running specs [#59 state:resolved]
oleganza (author)
Thu May 22 13:47:49 -0700 2008
commit  72805eb5a6029a85d532c2c4d34f0e0c8139b4b8
tree    1f13b211e763f0e3bd510bcbc89612ff52047b28
parent  de2d95d146b88a91541bc4ff5eff99fdbfcd151f
...
11
12
13
14
15
16
17
 
 
 
 
 
 
 
 
18
19
20
...
11
12
13
 
14
15
 
16
17
18
19
20
21
22
23
24
25
26
0
@@ -11,10 +11,16 @@ def setup_default_store(store=nil)
0
     StrokeDB.stub!(:default_store).and_return(store)
0
     return store
0
   end
0
-  @mem_storage = StrokeDB::MemoryStorage.new
0
   @path = TEMP_STORAGES
0
   FileUtils.rm_rf @path
0
-  StrokeDB.stub!(:default_store).and_return(StrokeDB::Store.new(:storage => @mem_storage,:index => @index, 
0
+      
0
+  @storage = if ENV['STORAGE'].to_s.downcase == 'file'
0
+    StrokeDB::FileStorage.new(:path => @path + '/file_storage')
0
+  else
0
+    StrokeDB::MemoryStorage.new
0
+  end
0
+  
0
+  StrokeDB.stub!(:default_store).and_return(StrokeDB::Store.new(:storage => @storage,:index => @index, 
0
                                                                 :path => @path))
0
   StrokeDB.default_store
0
 end

Comments

michaelklishin Thu May 22 13:55:22 -0700 2008

Pereklyuchatel :D

yrashk Thu May 22 16:18:48 -0700 2008

Oleg’s type of jokes