tenacity 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. data/.gitignore +1 -0
  2. data/EXTEND.rdoc +32 -22
  3. data/LICENSE.txt +1 -1
  4. data/README.rdoc +14 -16
  5. data/Rakefile +0 -37
  6. data/history.txt +21 -0
  7. data/lib/tenacity.rb +2 -1
  8. data/lib/tenacity/association.rb +82 -0
  9. data/lib/tenacity/associations/belongs_to.rb +9 -9
  10. data/lib/tenacity/associations/has_many.rb +19 -31
  11. data/lib/tenacity/associations/has_one.rb +7 -23
  12. data/lib/tenacity/class_methods.rb +136 -33
  13. data/lib/tenacity/instance_methods.rb +9 -13
  14. data/lib/tenacity/orm_ext/activerecord.rb +13 -30
  15. data/lib/tenacity/orm_ext/couchrest/couchrest_extended_document.rb +1 -4
  16. data/lib/tenacity/orm_ext/couchrest/couchrest_model.rb +1 -4
  17. data/lib/tenacity/orm_ext/couchrest/tenacity_class_methods.rb +8 -17
  18. data/lib/tenacity/orm_ext/couchrest/tenacity_instance_methods.rb +6 -6
  19. data/lib/tenacity/orm_ext/mongo_mapper.rb +15 -25
  20. data/lib/tenacity/version.rb +1 -1
  21. data/tenacity.gemspec +3 -3
  22. data/test/associations/belongs_to_test.rb +17 -1
  23. data/test/associations/has_many_test.rb +22 -0
  24. data/test/associations/has_one_test.rb +15 -0
  25. data/test/fixtures/active_record_car.rb +4 -0
  26. data/test/fixtures/active_record_engine.rb +5 -0
  27. data/test/fixtures/couch_rest_door.rb +10 -0
  28. data/test/fixtures/couch_rest_windshield.rb +10 -0
  29. data/test/fixtures/mongo_mapper_ash_tray.rb +8 -0
  30. data/test/fixtures/mongo_mapper_dashboard.rb +3 -0
  31. data/test/fixtures/mongo_mapper_vent.rb +8 -0
  32. data/test/fixtures/mongo_mapper_wheel.rb +1 -1
  33. data/test/helpers/active_record_test_helper.rb +34 -4
  34. data/test/orm_ext/activerecord_test.rb +15 -8
  35. data/test/orm_ext/couchrest_test.rb +15 -8
  36. data/test/orm_ext/mongo_mapper_test.rb +14 -8
  37. data/test/test_helper.rb +5 -2
  38. metadata +16 -11
  39. data/Gemfile.lock +0 -70
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Wood
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-29 00:00:00 -06:00
17
+ date: 2011-01-07 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -134,12 +134,12 @@ dependencies:
134
134
  - - ~>
135
135
  - !ruby/object:Gem::Version
136
136
  segments:
137
- - 2
138
- - 8
139
137
  - 1
140
- version: 2.8.1
138
+ - 3
139
+ - 1
140
+ version: 1.3.1
141
141
  prerelease: false
142
- name: mysql
142
+ name: sqlite3-ruby
143
143
  type: :development
144
144
  version_requirements: *id009
145
145
  - !ruby/object:Gem::Dependency
@@ -168,7 +168,7 @@ dependencies:
168
168
  name: couchrest_model
169
169
  type: :development
170
170
  version_requirements: *id011
171
- description: Tenacity provides an ORM independent way of specifying simple relationships between models backed by different databases.
171
+ description: Tenacity provides a database client independent way of specifying simple relationships between models backed by different databases.
172
172
  email:
173
173
  - john@johnpwood.net
174
174
  executables: []
@@ -181,12 +181,12 @@ files:
181
181
  - .gitignore
182
182
  - EXTEND.rdoc
183
183
  - Gemfile
184
- - Gemfile.lock
185
184
  - LICENSE.txt
186
185
  - README.rdoc
187
186
  - Rakefile
188
187
  - history.txt
189
188
  - lib/tenacity.rb
189
+ - lib/tenacity/association.rb
190
190
  - lib/tenacity/associations/belongs_to.rb
191
191
  - lib/tenacity/associations/has_many.rb
192
192
  - lib/tenacity/associations/has_one.rb
@@ -206,10 +206,15 @@ files:
206
206
  - test/core/classmethods_test.rb
207
207
  - test/fixtures/active_record_car.rb
208
208
  - test/fixtures/active_record_climate_control_unit.rb
209
+ - test/fixtures/active_record_engine.rb
209
210
  - test/fixtures/active_record_nuts.rb
211
+ - test/fixtures/couch_rest_door.rb
210
212
  - test/fixtures/couch_rest_radio.rb
213
+ - test/fixtures/couch_rest_windshield.rb
214
+ - test/fixtures/mongo_mapper_ash_tray.rb
211
215
  - test/fixtures/mongo_mapper_button.rb
212
216
  - test/fixtures/mongo_mapper_dashboard.rb
217
+ - test/fixtures/mongo_mapper_vent.rb
213
218
  - test/fixtures/mongo_mapper_wheel.rb
214
219
  - test/helpers/active_record_test_helper.rb
215
220
  - test/helpers/couch_rest_test_helper.rb
@@ -249,6 +254,6 @@ rubyforge_project: tenacity
249
254
  rubygems_version: 1.3.6
250
255
  signing_key:
251
256
  specification_version: 3
252
- summary: A ORM independent way of specifying simple relationships between models backed by different databases.
257
+ summary: A database client independent way of specifying simple relationships between models backed by different databases.
253
258
  test_files: []
254
259
 
@@ -1,70 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- tenacity (0.1.1)
5
- activesupport (>= 2.3)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- remote: http://rubygems.org/
10
- specs:
11
- activemodel (3.0.3)
12
- activesupport (= 3.0.3)
13
- builder (~> 2.1.2)
14
- i18n (~> 0.4)
15
- activerecord (3.0.3)
16
- activemodel (= 3.0.3)
17
- activesupport (= 3.0.3)
18
- arel (~> 2.0.2)
19
- tzinfo (~> 0.3.23)
20
- activesupport (3.0.3)
21
- arel (2.0.6)
22
- bson (1.1.5)
23
- bson_ext (1.1.5)
24
- builder (2.1.2)
25
- couchrest (1.0.1)
26
- json (>= 1.4.6)
27
- mime-types (>= 1.15)
28
- rest-client (>= 1.5.1)
29
- couchrest_model (1.0.0.beta7)
30
- activemodel (>= 3.0.0.beta4)
31
- activesupport (>= 2.3.5)
32
- couchrest (>= 1.0.0.beta)
33
- mime-types (>= 1.15)
34
- i18n (0.5.0)
35
- jnunemaker-validatable (1.8.4)
36
- activesupport (>= 2.3.4)
37
- json (1.4.6)
38
- mime-types (1.16)
39
- mongo (1.1.5)
40
- bson (>= 1.1.5)
41
- mongo_mapper (0.8.6)
42
- activesupport (>= 2.3.4)
43
- jnunemaker-validatable (~> 1.8.4)
44
- plucky (~> 0.3.6)
45
- mysql (2.8.1)
46
- plucky (0.3.6)
47
- mongo (~> 1.1)
48
- rake (0.8.7)
49
- rcov (0.9.9)
50
- rest-client (1.6.1)
51
- mime-types (>= 1.16)
52
- shoulda (2.11.3)
53
- tzinfo (0.3.23)
54
-
55
- PLATFORMS
56
- ruby
57
-
58
- DEPENDENCIES
59
- activerecord (~> 3.0.0)
60
- activesupport (>= 2.3)
61
- bson_ext (~> 1.1.3)
62
- bundler (~> 1.0.0)
63
- couchrest (~> 1.0.0)
64
- couchrest_model
65
- mongo_mapper (~> 0.8.6)
66
- mysql (~> 2.8.1)
67
- rake (~> 0.8.7)
68
- rcov (~> 0.9.9)
69
- shoulda (~> 2.11.3)
70
- tenacity!