tenacity 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/EXTEND.rdoc +18 -21
- data/Gemfile +0 -2
- data/README.rdoc +3 -1
- data/Rakefile +7 -0
- data/history.txt +17 -0
- data/lib/tenacity.rb +4 -0
- data/lib/tenacity/associates_proxy.rb +5 -7
- data/lib/tenacity/association.rb +9 -47
- data/lib/tenacity/associations/belongs_to.rb +1 -2
- data/lib/tenacity/associations/has_many.rb +27 -21
- data/lib/tenacity/associations/has_one.rb +3 -2
- data/lib/tenacity/class_methods.rb +14 -60
- data/lib/tenacity/errors.rb +8 -0
- data/lib/tenacity/instance_methods.rb +42 -12
- data/lib/tenacity/orm_ext/activerecord.rb +11 -32
- data/lib/tenacity/orm_ext/couchrest.rb +14 -22
- data/lib/tenacity/orm_ext/datamapper.rb +14 -31
- data/lib/tenacity/orm_ext/helpers.rb +3 -3
- data/lib/tenacity/orm_ext/mongo_mapper.rb +16 -22
- data/lib/tenacity/orm_ext/mongoid.rb +10 -18
- data/lib/tenacity/orm_ext/ripple.rb +270 -0
- data/lib/tenacity/orm_ext/sequel.rb +21 -33
- data/lib/tenacity/orm_ext/toystore.rb +114 -0
- data/lib/tenacity/version.rb +1 -1
- data/tenacity.gemspec +10 -3
- data/test/association_features/belongs_to_test.rb +12 -0
- data/test/association_features/has_many_test.rb +32 -2
- data/test/association_features/has_one_test.rb +18 -4
- data/test/associations/has_one_test.rb +0 -1
- data/test/core/classmethods_test.rb +7 -0
- data/test/fixtures/active_record_has_many_target.rb +4 -0
- data/test/fixtures/active_record_has_one_target.rb +4 -0
- data/test/fixtures/active_record_object.rb +8 -0
- data/test/fixtures/couch_rest_has_many_target.rb +4 -0
- data/test/fixtures/couch_rest_has_one_target.rb +4 -0
- data/test/fixtures/couch_rest_object.rb +8 -0
- data/test/fixtures/data_mapper_has_many_target.rb +10 -0
- data/test/fixtures/data_mapper_has_one_target.rb +10 -0
- data/test/fixtures/data_mapper_object.rb +8 -0
- data/test/fixtures/mongo_mapper_has_many_target.rb +4 -0
- data/test/fixtures/mongo_mapper_has_one_target.rb +4 -0
- data/test/fixtures/mongo_mapper_object.rb +8 -0
- data/test/fixtures/mongoid_has_many_target.rb +4 -0
- data/test/fixtures/mongoid_has_one_target.rb +4 -0
- data/test/fixtures/mongoid_object.rb +8 -0
- data/test/fixtures/no_associations.rb +4 -0
- data/test/fixtures/ripple_has_many_target.rb +24 -0
- data/test/fixtures/ripple_has_one_target.rb +24 -0
- data/test/fixtures/ripple_object.rb +42 -0
- data/test/fixtures/sequel_has_many_target.rb +4 -0
- data/test/fixtures/sequel_has_one_target.rb +4 -0
- data/test/fixtures/sequel_object.rb +8 -0
- data/test/fixtures/toystore_has_many_target.rb +28 -0
- data/test/fixtures/toystore_has_one_target.rb +28 -0
- data/test/fixtures/toystore_object.rb +46 -0
- data/test/helpers/active_record_test_helper.rb +12 -95
- data/test/helpers/data_mapper_test_helper.rb +0 -64
- data/test/helpers/ripple_test_helper.rb +19 -0
- data/test/helpers/sequel_test_helper.rb +13 -60
- data/test/helpers/toystore_test_helper.rb +17 -0
- data/test/orm_ext/activerecord_test.rb +16 -26
- data/test/orm_ext/couchrest_test.rb +10 -29
- data/test/orm_ext/datamapper_test.rb +16 -29
- data/test/orm_ext/mongo_mapper_test.rb +11 -29
- data/test/orm_ext/mongoid_test.rb +11 -29
- data/test/orm_ext/ripple_test.rb +140 -0
- data/test/orm_ext/sequel_test.rb +15 -26
- data/test/orm_ext/toystore_test.rb +103 -0
- data/test/test_helper.rb +35 -23
- metadata +99 -133
@@ -7,13 +7,17 @@ class CouchRestHasOneTarget < CouchRest::Model::Base
|
|
7
7
|
t_belongs_to :data_mapper_object
|
8
8
|
t_belongs_to :mongo_mapper_object
|
9
9
|
require_mongoid { t_belongs_to :mongoid_object }
|
10
|
+
require_ripple { t_belongs_to :ripple_object }
|
10
11
|
t_belongs_to :sequel_object
|
12
|
+
require_toystore { t_belongs_to :toystore_object }
|
11
13
|
|
12
14
|
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
13
15
|
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
15
17
|
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
16
18
|
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
19
|
+
require_ripple { t_belongs_to :ripple_has_one_target_testable, :polymorphic => true }
|
17
20
|
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
21
|
+
require_toystore { t_belongs_to :toystore_has_one_target_testable, :polymorphic => true }
|
18
22
|
end
|
19
23
|
|
@@ -7,27 +7,35 @@ class CouchRestObject < CouchRest::Model::Base
|
|
7
7
|
t_has_one :data_mapper_has_one_target
|
8
8
|
t_has_one :mongo_mapper_has_one_target
|
9
9
|
require_mongoid { t_has_one :mongoid_has_one_target }
|
10
|
+
require_ripple { t_has_one :ripple_has_one_target }
|
10
11
|
t_has_one :sequel_has_one_target
|
12
|
+
require_toystore { t_has_one :toystore_has_one_target }
|
11
13
|
|
12
14
|
t_has_many :active_record_has_many_targets
|
13
15
|
t_has_many :couch_rest_has_many_targets
|
14
16
|
t_has_many :data_mapper_has_many_targets
|
15
17
|
t_has_many :mongo_mapper_has_many_targets
|
16
18
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
19
|
+
require_ripple { t_has_many :ripple_has_many_targets }
|
17
20
|
t_has_many :sequel_has_many_targets
|
21
|
+
require_toystore { t_has_many :toystore_has_many_targets }
|
18
22
|
|
19
23
|
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
20
24
|
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
21
25
|
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
22
26
|
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
23
27
|
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
28
|
+
require_ripple { t_has_one :ripple_has_one_target, :as => :ripple_has_one_target_testable }
|
24
29
|
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
30
|
+
require_toystore { t_has_one :toystore_has_one_target, :as => :toystore_has_one_target_testable }
|
25
31
|
|
26
32
|
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
27
33
|
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
28
34
|
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
29
35
|
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
30
36
|
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
37
|
+
require_ripple { t_has_many :ripple_has_many_targets, :as => :ripple_has_many_target_testable }
|
31
38
|
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
39
|
+
require_toystore { t_has_many :toystore_has_many_targets, :as => :toystore_has_many_target_testable }
|
32
40
|
end
|
33
41
|
|
@@ -8,7 +8,9 @@ class DataMapperHasManyTarget
|
|
8
8
|
property :data_mapper_object_id, Integer
|
9
9
|
property :mongo_mapper_object_id, String
|
10
10
|
property :mongoid_object_id, String
|
11
|
+
property :ripple_object_id, String
|
11
12
|
property :sequel_object_id, Integer
|
13
|
+
property :toystore_object_id, String
|
12
14
|
|
13
15
|
property :active_record_has_many_target_testable_id, String
|
14
16
|
property :active_record_has_many_target_testable_type, String
|
@@ -20,20 +22,28 @@ class DataMapperHasManyTarget
|
|
20
22
|
property :mongo_mapper_has_many_target_testable_type, String
|
21
23
|
property :mongoid_has_many_target_testable_id, String
|
22
24
|
property :mongoid_has_many_target_testable_type, String
|
25
|
+
property :ripple_has_many_target_testable_id, String
|
26
|
+
property :ripple_has_many_target_testable_type, String
|
23
27
|
property :sequel_has_many_target_testable_id, String
|
24
28
|
property :sequel_has_many_target_testable_type, String
|
29
|
+
property :toystore_has_many_target_testable_id, String
|
30
|
+
property :toystore_has_many_target_testable_type, String
|
25
31
|
|
26
32
|
t_belongs_to :active_record_object
|
27
33
|
t_belongs_to :couch_rest_object
|
28
34
|
t_belongs_to :data_mapper_object
|
29
35
|
t_belongs_to :mongo_mapper_object
|
30
36
|
require_mongoid { t_belongs_to :mongoid_object }
|
37
|
+
require_ripple { t_belongs_to :ripple_object }
|
31
38
|
t_belongs_to :sequel_object
|
39
|
+
require_toystore { t_belongs_to :toystore_object }
|
32
40
|
|
33
41
|
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
34
42
|
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
35
43
|
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
36
44
|
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
37
45
|
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
46
|
+
require_ripple { t_belongs_to :ripple_has_many_target_testable, :polymorphic => true }
|
38
47
|
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
48
|
+
require_toystore { t_belongs_to :toystore_has_many_target_testable, :polymorphic => true }
|
39
49
|
end
|
@@ -8,7 +8,9 @@ class DataMapperHasOneTarget
|
|
8
8
|
property :data_mapper_object_id, Integer
|
9
9
|
property :mongo_mapper_object_id, String
|
10
10
|
property :mongoid_object_id, String
|
11
|
+
property :ripple_object_id, String
|
11
12
|
property :sequel_object_id, Integer
|
13
|
+
property :toystore_object_id, String
|
12
14
|
|
13
15
|
property :active_record_has_one_target_testable_id, String
|
14
16
|
property :active_record_has_one_target_testable_type, String
|
@@ -20,20 +22,28 @@ class DataMapperHasOneTarget
|
|
20
22
|
property :mongo_mapper_has_one_target_testable_type, String
|
21
23
|
property :mongoid_has_one_target_testable_id, String
|
22
24
|
property :mongoid_has_one_target_testable_type, String
|
25
|
+
property :ripple_has_one_target_testable_id, String
|
26
|
+
property :ripple_has_one_target_testable_type, String
|
23
27
|
property :sequel_has_one_target_testable_id, String
|
24
28
|
property :sequel_has_one_target_testable_type, String
|
29
|
+
property :toystore_has_one_target_testable_id, String
|
30
|
+
property :toystore_has_one_target_testable_type, String
|
25
31
|
|
26
32
|
t_belongs_to :active_record_object
|
27
33
|
t_belongs_to :couch_rest_object
|
28
34
|
t_belongs_to :data_mapper_object
|
29
35
|
t_belongs_to :mongo_mapper_object
|
30
36
|
require_mongoid { t_belongs_to :mongoid_object }
|
37
|
+
require_ripple { t_belongs_to :ripple_object }
|
31
38
|
t_belongs_to :sequel_object
|
39
|
+
require_toystore { t_belongs_to :toystore_object }
|
32
40
|
|
33
41
|
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
34
42
|
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
35
43
|
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
36
44
|
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
37
45
|
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
46
|
+
require_ripple { t_belongs_to :ripple_has_one_target_testable, :polymorphic => true }
|
38
47
|
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
48
|
+
require_toystore { t_belongs_to :toystore_has_one_target_testable, :polymorphic => true }
|
39
49
|
end
|
@@ -9,26 +9,34 @@ class DataMapperObject
|
|
9
9
|
t_has_one :data_mapper_has_one_target
|
10
10
|
t_has_one :mongo_mapper_has_one_target
|
11
11
|
require_mongoid { t_has_one :mongoid_has_one_target }
|
12
|
+
require_ripple { t_has_one :ripple_has_one_target }
|
12
13
|
t_has_one :sequel_has_one_target
|
14
|
+
require_toystore { t_has_one :toystore_has_one_target }
|
13
15
|
|
14
16
|
t_has_many :active_record_has_many_targets
|
15
17
|
t_has_many :couch_rest_has_many_targets
|
16
18
|
t_has_many :data_mapper_has_many_targets
|
17
19
|
t_has_many :mongo_mapper_has_many_targets
|
18
20
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
21
|
+
require_ripple { t_has_many :ripple_has_many_targets }
|
19
22
|
t_has_many :sequel_has_many_targets
|
23
|
+
require_toystore { t_has_many :toystore_has_many_targets }
|
20
24
|
|
21
25
|
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
22
26
|
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
23
27
|
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
24
28
|
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
25
29
|
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
30
|
+
require_ripple { t_has_one :ripple_has_one_target, :as => :ripple_has_one_target_testable }
|
26
31
|
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
32
|
+
require_toystore { t_has_one :toystore_has_one_target, :as => :toystore_has_one_target_testable }
|
27
33
|
|
28
34
|
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
29
35
|
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
30
36
|
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
31
37
|
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
32
38
|
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
39
|
+
require_ripple { t_has_many :ripple_has_many_targets, :as => :ripple_has_many_target_testable }
|
33
40
|
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
41
|
+
require_toystore { t_has_many :toystore_has_many_targets, :as => :toystore_has_many_target_testable }
|
34
42
|
end
|
@@ -7,12 +7,16 @@ class MongoMapperHasManyTarget
|
|
7
7
|
t_belongs_to :data_mapper_object
|
8
8
|
t_belongs_to :mongo_mapper_object
|
9
9
|
require_mongoid { t_belongs_to :mongoid_object }
|
10
|
+
require_ripple { t_belongs_to :ripple_object }
|
10
11
|
t_belongs_to :sequel_object
|
12
|
+
require_toystore { t_belongs_to :toystore_object }
|
11
13
|
|
12
14
|
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
13
15
|
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
15
17
|
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
16
18
|
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
19
|
+
require_ripple { t_belongs_to :ripple_has_many_target_testable, :polymorphic => true }
|
17
20
|
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
21
|
+
require_toystore { t_belongs_to :toystore_has_many_target_testable, :polymorphic => true }
|
18
22
|
end
|
@@ -7,12 +7,16 @@ class MongoMapperHasOneTarget
|
|
7
7
|
t_belongs_to :data_mapper_object
|
8
8
|
t_belongs_to :mongo_mapper_object
|
9
9
|
require_mongoid { t_belongs_to :mongoid_object }
|
10
|
+
require_ripple { t_belongs_to :ripple_object }
|
10
11
|
t_belongs_to :sequel_object
|
12
|
+
require_toystore { t_belongs_to :toystore_object }
|
11
13
|
|
12
14
|
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
13
15
|
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
15
17
|
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
16
18
|
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
19
|
+
require_ripple { t_belongs_to :ripple_has_one_target_testable, :polymorphic => true }
|
17
20
|
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
21
|
+
require_toystore { t_belongs_to :toystore_has_one_target_testable, :polymorphic => true }
|
18
22
|
end
|
@@ -7,26 +7,34 @@ class MongoMapperObject
|
|
7
7
|
t_has_one :data_mapper_has_one_target
|
8
8
|
t_has_one :mongo_mapper_has_one_target
|
9
9
|
require_mongoid { t_has_one :mongoid_has_one_target }
|
10
|
+
require_ripple { t_has_one :ripple_has_one_target }
|
10
11
|
t_has_one :sequel_has_one_target
|
12
|
+
require_toystore { t_has_one :toystore_has_one_target }
|
11
13
|
|
12
14
|
t_has_many :active_record_has_many_targets
|
13
15
|
t_has_many :couch_rest_has_many_targets
|
14
16
|
t_has_many :data_mapper_has_many_targets
|
15
17
|
t_has_many :mongo_mapper_has_many_targets
|
16
18
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
19
|
+
require_ripple { t_has_many :ripple_has_many_targets }
|
17
20
|
t_has_many :sequel_has_many_targets
|
21
|
+
require_toystore { t_has_many :toystore_has_many_targets }
|
18
22
|
|
19
23
|
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
20
24
|
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
21
25
|
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
22
26
|
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
23
27
|
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
28
|
+
require_ripple { t_has_one :ripple_has_one_target, :as => :ripple_has_one_target_testable }
|
24
29
|
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
30
|
+
require_toystore { t_has_one :toystore_has_one_target, :as => :toystore_has_one_target_testable }
|
25
31
|
|
26
32
|
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
27
33
|
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
28
34
|
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
29
35
|
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
30
36
|
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
37
|
+
require_ripple { t_has_many :ripple_has_many_targets, :as => :ripple_has_many_target_testable }
|
31
38
|
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
39
|
+
require_toystore { t_has_many :toystore_has_many_targets, :as => :toystore_has_many_target_testable }
|
32
40
|
end
|
@@ -8,13 +8,17 @@ require_mongoid do
|
|
8
8
|
t_belongs_to :data_mapper_object
|
9
9
|
t_belongs_to :mongo_mapper_object
|
10
10
|
t_belongs_to :mongoid_object
|
11
|
+
t_belongs_to :ripple_object
|
11
12
|
t_belongs_to :sequel_object
|
13
|
+
t_belongs_to :toystore_object
|
12
14
|
|
13
15
|
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
15
17
|
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
16
18
|
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
17
19
|
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
20
|
+
require_ripple { t_belongs_to :ripple_has_many_target_testable, :polymorphic => true }
|
18
21
|
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
22
|
+
require_toystore { t_belongs_to :toystore_has_many_target_testable, :polymorphic => true }
|
19
23
|
end
|
20
24
|
end
|
@@ -8,13 +8,17 @@ require_mongoid do
|
|
8
8
|
t_belongs_to :data_mapper_object
|
9
9
|
t_belongs_to :mongo_mapper_object
|
10
10
|
t_belongs_to :mongoid_object
|
11
|
+
t_belongs_to :ripple_object
|
11
12
|
t_belongs_to :sequel_object
|
13
|
+
t_belongs_to :toystore_object
|
12
14
|
|
13
15
|
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
15
17
|
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
16
18
|
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
17
19
|
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
20
|
+
require_ripple { t_belongs_to :ripple_has_one_target_testable, :polymorphic => true }
|
18
21
|
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
22
|
+
require_toystore { t_belongs_to :toystore_has_one_target_testable, :polymorphic => true }
|
19
23
|
end
|
20
24
|
end
|
@@ -8,27 +8,35 @@ require_mongoid do
|
|
8
8
|
t_has_one :data_mapper_has_one_target
|
9
9
|
t_has_one :mongo_mapper_has_one_target
|
10
10
|
t_has_one :mongoid_has_one_target
|
11
|
+
t_has_one :ripple_has_one_target
|
11
12
|
t_has_one :sequel_has_one_target
|
13
|
+
t_has_one :toystore_has_one_target
|
12
14
|
|
13
15
|
t_has_many :active_record_has_many_targets
|
14
16
|
t_has_many :couch_rest_has_many_targets
|
15
17
|
t_has_many :data_mapper_has_many_targets
|
16
18
|
t_has_many :mongo_mapper_has_many_targets
|
17
19
|
t_has_many :mongoid_has_many_targets
|
20
|
+
t_has_many :ripple_has_many_targets
|
18
21
|
t_has_many :sequel_has_many_targets
|
22
|
+
t_has_many :toystore_has_many_targets
|
19
23
|
|
20
24
|
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
21
25
|
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
22
26
|
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
23
27
|
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
24
28
|
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
29
|
+
require_ripple { t_has_one :ripple_has_one_target, :as => :ripple_has_one_target_testable }
|
25
30
|
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
31
|
+
require_toystore { t_has_one :toystore_has_one_target, :as => :toystore_has_one_target_testable }
|
26
32
|
|
27
33
|
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
28
34
|
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
29
35
|
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
30
36
|
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
31
37
|
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
38
|
+
require_ripple { t_has_many :ripple_has_many_targets, :as => :ripple_has_many_target_testable }
|
32
39
|
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
40
|
+
require_toystore { t_has_many :toystore_has_many_targets, :as => :toystore_has_many_target_testable }
|
33
41
|
end
|
34
42
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_ripple do
|
2
|
+
class RippleHasManyTarget
|
3
|
+
include Ripple::Document
|
4
|
+
include Tenacity
|
5
|
+
|
6
|
+
t_belongs_to :active_record_object
|
7
|
+
t_belongs_to :couch_rest_object
|
8
|
+
t_belongs_to :data_mapper_object
|
9
|
+
t_belongs_to :mongo_mapper_object
|
10
|
+
t_belongs_to :mongoid_object
|
11
|
+
t_belongs_to :ripple_object
|
12
|
+
t_belongs_to :sequel_object
|
13
|
+
t_belongs_to :toystore_object
|
14
|
+
|
15
|
+
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
16
|
+
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
17
|
+
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
18
|
+
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
19
|
+
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
20
|
+
require_ripple { t_belongs_to :ripple_has_many_target_testable, :polymorphic => true }
|
21
|
+
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
22
|
+
require_toystore { t_belongs_to :toystore_has_many_target_testable, :polymorphic => true }
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_ripple do
|
2
|
+
class RippleHasOneTarget
|
3
|
+
include Ripple::Document
|
4
|
+
include Tenacity
|
5
|
+
|
6
|
+
t_belongs_to :active_record_object
|
7
|
+
t_belongs_to :couch_rest_object
|
8
|
+
t_belongs_to :data_mapper_object
|
9
|
+
t_belongs_to :mongo_mapper_object
|
10
|
+
t_belongs_to :mongoid_object
|
11
|
+
t_belongs_to :ripple_object
|
12
|
+
t_belongs_to :sequel_object
|
13
|
+
t_belongs_to :toystore_object
|
14
|
+
|
15
|
+
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
16
|
+
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
17
|
+
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
18
|
+
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
19
|
+
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
20
|
+
require_ripple { t_belongs_to :ripple_has_one_target_testable, :polymorphic => true }
|
21
|
+
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
22
|
+
require_toystore { t_belongs_to :toystore_has_one_target_testable, :polymorphic => true }
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require_ripple do
|
2
|
+
class RippleObject
|
3
|
+
include Ripple::Document
|
4
|
+
include Tenacity
|
5
|
+
|
6
|
+
t_has_one :active_record_has_one_target
|
7
|
+
t_has_one :couch_rest_has_one_target
|
8
|
+
t_has_one :data_mapper_has_one_target
|
9
|
+
t_has_one :mongo_mapper_has_one_target
|
10
|
+
require_mongoid { t_has_one :mongoid_has_one_target }
|
11
|
+
require_ripple { t_has_one :ripple_has_one_target }
|
12
|
+
t_has_one :sequel_has_one_target
|
13
|
+
require_toystore { t_has_one :toystore_has_one_target }
|
14
|
+
|
15
|
+
t_has_many :active_record_has_many_targets
|
16
|
+
t_has_many :couch_rest_has_many_targets
|
17
|
+
t_has_many :data_mapper_has_many_targets
|
18
|
+
t_has_many :mongo_mapper_has_many_targets
|
19
|
+
require_mongoid { t_has_many :mongoid_has_many_targets }
|
20
|
+
require_ripple { t_has_many :ripple_has_many_targets }
|
21
|
+
t_has_many :sequel_has_many_targets
|
22
|
+
require_toystore { t_has_many :toystore_has_many_targets }
|
23
|
+
|
24
|
+
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
25
|
+
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
26
|
+
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
27
|
+
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
28
|
+
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
29
|
+
require_ripple { t_has_one :ripple_has_one_target, :as => :ripple_has_one_target_testable }
|
30
|
+
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
31
|
+
require_toystore { t_has_one :toystore_has_one_target, :as => :toystore_has_one_target_testable }
|
32
|
+
|
33
|
+
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
34
|
+
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
35
|
+
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
36
|
+
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
37
|
+
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
38
|
+
require_ripple { t_has_many :ripple_has_many_targets, :as => :ripple_has_many_target_testable }
|
39
|
+
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
40
|
+
require_toystore { t_has_many :toystore_has_many_targets, :as => :toystore_has_many_target_testable }
|
41
|
+
end
|
42
|
+
end
|
@@ -6,12 +6,16 @@ class SequelHasManyTarget < Sequel::Model
|
|
6
6
|
t_belongs_to :data_mapper_object
|
7
7
|
t_belongs_to :mongo_mapper_object
|
8
8
|
require_mongoid { t_belongs_to :mongoid_object }
|
9
|
+
require_ripple { t_belongs_to :ripple_object }
|
9
10
|
t_belongs_to :sequel_object
|
11
|
+
require_toystore { t_belongs_to :toystore_object }
|
10
12
|
|
11
13
|
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
12
14
|
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
13
15
|
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
15
17
|
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
18
|
+
require_ripple { t_belongs_to :ripple_has_many_target_testable, :polymorphic => true }
|
16
19
|
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
20
|
+
require_toystore { t_belongs_to :toystore_has_many_target_testable, :polymorphic => true }
|
17
21
|
end
|
@@ -6,12 +6,16 @@ class SequelHasOneTarget < Sequel::Model
|
|
6
6
|
t_belongs_to :data_mapper_object
|
7
7
|
t_belongs_to :mongo_mapper_object
|
8
8
|
require_mongoid { t_belongs_to :mongoid_object }
|
9
|
+
require_ripple { t_belongs_to :ripple_object }
|
9
10
|
t_belongs_to :sequel_object
|
11
|
+
require_toystore { t_belongs_to :toystore_object }
|
10
12
|
|
11
13
|
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
12
14
|
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
13
15
|
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
14
16
|
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
15
17
|
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
18
|
+
require_ripple { t_belongs_to :ripple_has_one_target_testable, :polymorphic => true }
|
16
19
|
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
20
|
+
require_toystore { t_belongs_to :toystore_has_one_target_testable, :polymorphic => true }
|
17
21
|
end
|