public
Description: Library for accessing ThruDB documents.
Clone URL: git://github.com/technoweenie/activedocument.git
add ActiveDocument::Schema experiment
technoweenie (author)
Wed Jan 16 17:41:54 -0800 2008
commit  5832f33388f2f845878ae4e963d8afd79a9b3b7c
tree    04b73678b62212b3e88aaa7c9bab7b670664ca07
parent  27c28752135f9dbde66979ec46be0d11c16ef706
...
3
4
5
 
6
7
8
9
...
3
4
5
6
7
8
9
10
0
@@ -3,6 +3,7 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'vendor', 'thrudb')
0
 require 'active_document/manager'
0
 require 'active_document/common'
0
 require 'active_document/formats'
0
+require 'active_document/schema'
0
 
0
 module ActiveDocument
0
 end
0
\ No newline at end of file
...
17
18
19
 
 
 
 
20
21
22
 
23
24
25
...
34
35
36
37
 
38
39
40
...
54
55
56
57
58
59
 
60
...
17
18
19
20
21
22
23
24
25
 
26
27
28
29
...
38
39
40
 
41
42
43
44
...
58
59
60
 
 
61
62
63
0
@@ -17,9 +17,13 @@ require 'mock_record_constants'
0
 
0
 require 'digest/sha1'
0
 module MockRecord
0
+ class Generic
0
+ include ActiveDocument::Schema::Methods
0
+ end
0
+
0
   class Thrift
0
     include ActiveDocument::Formats::Thrift
0
-
0
+
0
     def initialize
0
       @name = Digest::SHA1.hexdigest(rand.to_s)
0
       @content = Digest::SHA1.hexdigest(rand.to_s)
0
@@ -34,7 +38,7 @@ module MockRecord
0
     include ActiveDocument::Formats::JSON
0
     
0
     attr_accessor :name, :content
0
-
0
+
0
     def initialize
0
       @name = Digest::SHA1.hexdigest(rand.to_s)
0
       @content = Digest::SHA1.hexdigest(rand.to_s)
0
@@ -54,5 +58,4 @@ end
0
 # right now I'm running the same thrudb server from the thrudb tutorial with ./thrudbctl start
0
 [MockRecord::Thrift, MockRecord::JSON].each do |record_class|
0
   record_class.manager = ActiveDocument::Manager.new :domain => 'tutorial', :index_name => 'bookmarks'
0
-end
0
-foo = MockRecord::JSON.new
0
\ No newline at end of file
0
+end
0
\ No newline at end of file

Comments

    No one has commented yet.