honkster-mongo_mapper 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. data/LICENSE +20 -0
  2. data/README.rdoc +27 -0
  3. data/UPGRADES +7 -0
  4. data/bin/mmconsole +60 -0
  5. data/examples/attr_accessible.rb +22 -0
  6. data/examples/attr_protected.rb +22 -0
  7. data/examples/cache_key.rb +24 -0
  8. data/examples/custom_types.rb +24 -0
  9. data/examples/identity_map.rb +33 -0
  10. data/examples/identity_map/automatic.rb +8 -0
  11. data/examples/identity_map/middleware.rb +14 -0
  12. data/examples/keys.rb +40 -0
  13. data/examples/modifiers/set.rb +25 -0
  14. data/examples/plugins.rb +41 -0
  15. data/examples/querying.rb +35 -0
  16. data/examples/scopes.rb +52 -0
  17. data/examples/validating/embedded_docs.rb +29 -0
  18. data/lib/mongo_mapper.rb +79 -0
  19. data/lib/mongo_mapper/connection.rb +83 -0
  20. data/lib/mongo_mapper/document.rb +41 -0
  21. data/lib/mongo_mapper/embedded_document.rb +31 -0
  22. data/lib/mongo_mapper/exceptions.rb +27 -0
  23. data/lib/mongo_mapper/extensions/array.rb +19 -0
  24. data/lib/mongo_mapper/extensions/binary.rb +22 -0
  25. data/lib/mongo_mapper/extensions/boolean.rb +44 -0
  26. data/lib/mongo_mapper/extensions/date.rb +25 -0
  27. data/lib/mongo_mapper/extensions/float.rb +14 -0
  28. data/lib/mongo_mapper/extensions/hash.rb +14 -0
  29. data/lib/mongo_mapper/extensions/integer.rb +19 -0
  30. data/lib/mongo_mapper/extensions/kernel.rb +9 -0
  31. data/lib/mongo_mapper/extensions/nil_class.rb +18 -0
  32. data/lib/mongo_mapper/extensions/object.rb +27 -0
  33. data/lib/mongo_mapper/extensions/object_id.rb +30 -0
  34. data/lib/mongo_mapper/extensions/set.rb +20 -0
  35. data/lib/mongo_mapper/extensions/string.rb +18 -0
  36. data/lib/mongo_mapper/extensions/time.rb +29 -0
  37. data/lib/mongo_mapper/plugins.rb +15 -0
  38. data/lib/mongo_mapper/plugins/accessible.rb +44 -0
  39. data/lib/mongo_mapper/plugins/associations.rb +99 -0
  40. data/lib/mongo_mapper/plugins/associations/base.rb +124 -0
  41. data/lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb +29 -0
  42. data/lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb +24 -0
  43. data/lib/mongo_mapper/plugins/associations/collection.rb +27 -0
  44. data/lib/mongo_mapper/plugins/associations/embedded_collection.rb +40 -0
  45. data/lib/mongo_mapper/plugins/associations/in_array_proxy.rb +127 -0
  46. data/lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb +28 -0
  47. data/lib/mongo_mapper/plugins/associations/many_documents_proxy.rb +109 -0
  48. data/lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb +32 -0
  49. data/lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb +24 -0
  50. data/lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb +14 -0
  51. data/lib/mongo_mapper/plugins/associations/one_embedded_proxy.rb +40 -0
  52. data/lib/mongo_mapper/plugins/associations/one_proxy.rb +68 -0
  53. data/lib/mongo_mapper/plugins/associations/proxy.rb +139 -0
  54. data/lib/mongo_mapper/plugins/caching.rb +21 -0
  55. data/lib/mongo_mapper/plugins/callbacks.rb +241 -0
  56. data/lib/mongo_mapper/plugins/clone.rb +22 -0
  57. data/lib/mongo_mapper/plugins/descendants.rb +17 -0
  58. data/lib/mongo_mapper/plugins/dirty.rb +124 -0
  59. data/lib/mongo_mapper/plugins/document.rb +41 -0
  60. data/lib/mongo_mapper/plugins/dynamic_querying.rb +43 -0
  61. data/lib/mongo_mapper/plugins/dynamic_querying/dynamic_finder.rb +44 -0
  62. data/lib/mongo_mapper/plugins/embedded_document.rb +48 -0
  63. data/lib/mongo_mapper/plugins/equality.rb +17 -0
  64. data/lib/mongo_mapper/plugins/identity_map.rb +128 -0
  65. data/lib/mongo_mapper/plugins/indexes.rb +12 -0
  66. data/lib/mongo_mapper/plugins/inspect.rb +15 -0
  67. data/lib/mongo_mapper/plugins/keys.rb +313 -0
  68. data/lib/mongo_mapper/plugins/keys/key.rb +59 -0
  69. data/lib/mongo_mapper/plugins/logger.rb +18 -0
  70. data/lib/mongo_mapper/plugins/modifiers.rb +112 -0
  71. data/lib/mongo_mapper/plugins/pagination.rb +14 -0
  72. data/lib/mongo_mapper/plugins/persistence.rb +69 -0
  73. data/lib/mongo_mapper/plugins/protected.rb +53 -0
  74. data/lib/mongo_mapper/plugins/querying.rb +176 -0
  75. data/lib/mongo_mapper/plugins/querying/decorator.rb +46 -0
  76. data/lib/mongo_mapper/plugins/querying/plucky_methods.rb +15 -0
  77. data/lib/mongo_mapper/plugins/rails.rb +58 -0
  78. data/lib/mongo_mapper/plugins/safe.rb +28 -0
  79. data/lib/mongo_mapper/plugins/sci.rb +32 -0
  80. data/lib/mongo_mapper/plugins/scopes.rb +21 -0
  81. data/lib/mongo_mapper/plugins/serialization.rb +76 -0
  82. data/lib/mongo_mapper/plugins/timestamps.rb +22 -0
  83. data/lib/mongo_mapper/plugins/userstamps.rb +15 -0
  84. data/lib/mongo_mapper/plugins/validations.rb +50 -0
  85. data/lib/mongo_mapper/support/descendant_appends.rb +45 -0
  86. data/lib/mongo_mapper/version.rb +4 -0
  87. data/rails/init.rb +19 -0
  88. data/test/_NOTE_ON_TESTING +1 -0
  89. data/test/functional/associations/test_belongs_to_polymorphic_proxy.rb +63 -0
  90. data/test/functional/associations/test_belongs_to_proxy.rb +93 -0
  91. data/test/functional/associations/test_in_array_proxy.rb +319 -0
  92. data/test/functional/associations/test_many_documents_as_proxy.rb +229 -0
  93. data/test/functional/associations/test_many_documents_proxy.rb +615 -0
  94. data/test/functional/associations/test_many_embedded_polymorphic_proxy.rb +176 -0
  95. data/test/functional/associations/test_many_embedded_proxy.rb +256 -0
  96. data/test/functional/associations/test_many_polymorphic_proxy.rb +302 -0
  97. data/test/functional/associations/test_one_embedded_proxy.rb +81 -0
  98. data/test/functional/associations/test_one_proxy.rb +182 -0
  99. data/test/functional/test_accessible.rb +168 -0
  100. data/test/functional/test_associations.rb +44 -0
  101. data/test/functional/test_binary.rb +27 -0
  102. data/test/functional/test_caching.rb +76 -0
  103. data/test/functional/test_callbacks.rb +151 -0
  104. data/test/functional/test_dirty.rb +163 -0
  105. data/test/functional/test_document.rb +253 -0
  106. data/test/functional/test_dynamic_querying.rb +75 -0
  107. data/test/functional/test_embedded_document.rb +210 -0
  108. data/test/functional/test_identity_map.rb +514 -0
  109. data/test/functional/test_indexes.rb +42 -0
  110. data/test/functional/test_logger.rb +20 -0
  111. data/test/functional/test_modifiers.rb +416 -0
  112. data/test/functional/test_pagination.rb +91 -0
  113. data/test/functional/test_protected.rb +175 -0
  114. data/test/functional/test_querying.rb +873 -0
  115. data/test/functional/test_safe.rb +76 -0
  116. data/test/functional/test_sci.rb +230 -0
  117. data/test/functional/test_scopes.rb +171 -0
  118. data/test/functional/test_string_id_compatibility.rb +67 -0
  119. data/test/functional/test_timestamps.rb +62 -0
  120. data/test/functional/test_userstamps.rb +27 -0
  121. data/test/functional/test_validations.rb +342 -0
  122. data/test/models.rb +233 -0
  123. data/test/test_active_model_lint.rb +13 -0
  124. data/test/test_helper.rb +105 -0
  125. data/test/unit/associations/test_base.rb +212 -0
  126. data/test/unit/associations/test_proxy.rb +105 -0
  127. data/test/unit/serializers/test_json_serializer.rb +217 -0
  128. data/test/unit/test_clone.rb +69 -0
  129. data/test/unit/test_descendant_appends.rb +71 -0
  130. data/test/unit/test_document.rb +213 -0
  131. data/test/unit/test_dynamic_finder.rb +125 -0
  132. data/test/unit/test_embedded_document.rb +644 -0
  133. data/test/unit/test_extensions.rb +380 -0
  134. data/test/unit/test_key.rb +185 -0
  135. data/test/unit/test_keys.rb +89 -0
  136. data/test/unit/test_mongo_mapper.rb +110 -0
  137. data/test/unit/test_pagination.rb +11 -0
  138. data/test/unit/test_plugins.rb +50 -0
  139. data/test/unit/test_rails.rb +181 -0
  140. data/test/unit/test_rails_compatibility.rb +52 -0
  141. data/test/unit/test_serialization.rb +51 -0
  142. data/test/unit/test_time_zones.rb +39 -0
  143. data/test/unit/test_validations.rb +564 -0
  144. metadata +348 -0
metadata ADDED
@@ -0,0 +1,348 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: honkster-mongo_mapper
3
+ version: !ruby/object:Gem::Version
4
+ hash: 55
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 4
10
+ version: 0.8.4
11
+ platform: ruby
12
+ authors:
13
+ - John Nunemaker
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-09-29 00:00:00 -07:00
19
+ default_executable: mmconsole
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: activesupport
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 11
30
+ segments:
31
+ - 2
32
+ - 3
33
+ - 4
34
+ version: 2.3.4
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: jnunemaker-validatable
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 63
46
+ segments:
47
+ - 1
48
+ - 8
49
+ - 4
50
+ version: 1.8.4
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: plucky
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ hash: 25
62
+ segments:
63
+ - 0
64
+ - 3
65
+ - 5
66
+ version: 0.3.5
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 3
78
+ segments:
79
+ - 0
80
+ version: "0"
81
+ type: :development
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
84
+ name: log_buddy
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ type: :development
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
98
+ name: jnunemaker-matchy
99
+ prerelease: false
100
+ requirement: &id006 !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ~>
104
+ - !ruby/object:Gem::Version
105
+ hash: 15
106
+ segments:
107
+ - 0
108
+ - 4
109
+ - 0
110
+ version: 0.4.0
111
+ type: :development
112
+ version_requirements: *id006
113
+ - !ruby/object:Gem::Dependency
114
+ name: shoulda
115
+ prerelease: false
116
+ requirement: &id007 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ~>
120
+ - !ruby/object:Gem::Version
121
+ hash: 21
122
+ segments:
123
+ - 2
124
+ - 11
125
+ version: "2.11"
126
+ type: :development
127
+ version_requirements: *id007
128
+ - !ruby/object:Gem::Dependency
129
+ name: timecop
130
+ prerelease: false
131
+ requirement: &id008 !ruby/object:Gem::Requirement
132
+ none: false
133
+ requirements:
134
+ - - ~>
135
+ - !ruby/object:Gem::Version
136
+ hash: 17
137
+ segments:
138
+ - 0
139
+ - 3
140
+ - 1
141
+ version: 0.3.1
142
+ type: :development
143
+ version_requirements: *id008
144
+ - !ruby/object:Gem::Dependency
145
+ name: mocha
146
+ prerelease: false
147
+ requirement: &id009 !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ hash: 43
153
+ segments:
154
+ - 0
155
+ - 9
156
+ - 8
157
+ version: 0.9.8
158
+ type: :development
159
+ version_requirements: *id009
160
+ description:
161
+ email:
162
+ - nunemaker@gmail.com
163
+ executables:
164
+ - mmconsole
165
+ extensions: []
166
+
167
+ extra_rdoc_files: []
168
+
169
+ files:
170
+ - bin/mmconsole
171
+ - examples/plugins.rb
172
+ - examples/cache_key.rb
173
+ - examples/custom_types.rb
174
+ - examples/scopes.rb
175
+ - examples/querying.rb
176
+ - examples/modifiers/set.rb
177
+ - examples/keys.rb
178
+ - examples/identity_map.rb
179
+ - examples/attr_protected.rb
180
+ - examples/identity_map/middleware.rb
181
+ - examples/identity_map/automatic.rb
182
+ - examples/validating/embedded_docs.rb
183
+ - examples/attr_accessible.rb
184
+ - lib/mongo_mapper/plugins.rb
185
+ - lib/mongo_mapper/support/descendant_appends.rb
186
+ - lib/mongo_mapper/version.rb
187
+ - lib/mongo_mapper/connection.rb
188
+ - lib/mongo_mapper/exceptions.rb
189
+ - lib/mongo_mapper/extensions/nil_class.rb
190
+ - lib/mongo_mapper/extensions/date.rb
191
+ - lib/mongo_mapper/extensions/time.rb
192
+ - lib/mongo_mapper/extensions/kernel.rb
193
+ - lib/mongo_mapper/extensions/string.rb
194
+ - lib/mongo_mapper/extensions/binary.rb
195
+ - lib/mongo_mapper/extensions/integer.rb
196
+ - lib/mongo_mapper/extensions/object.rb
197
+ - lib/mongo_mapper/extensions/set.rb
198
+ - lib/mongo_mapper/extensions/array.rb
199
+ - lib/mongo_mapper/extensions/hash.rb
200
+ - lib/mongo_mapper/extensions/boolean.rb
201
+ - lib/mongo_mapper/extensions/float.rb
202
+ - lib/mongo_mapper/extensions/object_id.rb
203
+ - lib/mongo_mapper/embedded_document.rb
204
+ - lib/mongo_mapper/plugins/dynamic_querying/dynamic_finder.rb
205
+ - lib/mongo_mapper/plugins/sci.rb
206
+ - lib/mongo_mapper/plugins/clone.rb
207
+ - lib/mongo_mapper/plugins/logger.rb
208
+ - lib/mongo_mapper/plugins/inspect.rb
209
+ - lib/mongo_mapper/plugins/dirty.rb
210
+ - lib/mongo_mapper/plugins/scopes.rb
211
+ - lib/mongo_mapper/plugins/associations.rb
212
+ - lib/mongo_mapper/plugins/timestamps.rb
213
+ - lib/mongo_mapper/plugins/pagination.rb
214
+ - lib/mongo_mapper/plugins/userstamps.rb
215
+ - lib/mongo_mapper/plugins/querying.rb
216
+ - lib/mongo_mapper/plugins/callbacks.rb
217
+ - lib/mongo_mapper/plugins/rails.rb
218
+ - lib/mongo_mapper/plugins/caching.rb
219
+ - lib/mongo_mapper/plugins/validations.rb
220
+ - lib/mongo_mapper/plugins/safe.rb
221
+ - lib/mongo_mapper/plugins/modifiers.rb
222
+ - lib/mongo_mapper/plugins/keys.rb
223
+ - lib/mongo_mapper/plugins/identity_map.rb
224
+ - lib/mongo_mapper/plugins/dynamic_querying.rb
225
+ - lib/mongo_mapper/plugins/serialization.rb
226
+ - lib/mongo_mapper/plugins/embedded_document.rb
227
+ - lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb
228
+ - lib/mongo_mapper/plugins/associations/proxy.rb
229
+ - lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb
230
+ - lib/mongo_mapper/plugins/associations/base.rb
231
+ - lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb
232
+ - lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb
233
+ - lib/mongo_mapper/plugins/associations/many_documents_proxy.rb
234
+ - lib/mongo_mapper/plugins/associations/one_embedded_proxy.rb
235
+ - lib/mongo_mapper/plugins/associations/collection.rb
236
+ - lib/mongo_mapper/plugins/associations/one_proxy.rb
237
+ - lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb
238
+ - lib/mongo_mapper/plugins/associations/embedded_collection.rb
239
+ - lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb
240
+ - lib/mongo_mapper/plugins/associations/in_array_proxy.rb
241
+ - lib/mongo_mapper/plugins/descendants.rb
242
+ - lib/mongo_mapper/plugins/querying/plucky_methods.rb
243
+ - lib/mongo_mapper/plugins/querying/decorator.rb
244
+ - lib/mongo_mapper/plugins/keys/key.rb
245
+ - lib/mongo_mapper/plugins/persistence.rb
246
+ - lib/mongo_mapper/plugins/indexes.rb
247
+ - lib/mongo_mapper/plugins/accessible.rb
248
+ - lib/mongo_mapper/plugins/document.rb
249
+ - lib/mongo_mapper/plugins/protected.rb
250
+ - lib/mongo_mapper/plugins/equality.rb
251
+ - lib/mongo_mapper/document.rb
252
+ - lib/mongo_mapper.rb
253
+ - rails/init.rb
254
+ - test/test_active_model_lint.rb
255
+ - test/models.rb
256
+ - test/_NOTE_ON_TESTING
257
+ - test/functional/test_identity_map.rb
258
+ - test/functional/test_document.rb
259
+ - test/functional/test_indexes.rb
260
+ - test/functional/test_protected.rb
261
+ - test/functional/test_binary.rb
262
+ - test/functional/test_caching.rb
263
+ - test/functional/test_pagination.rb
264
+ - test/functional/test_dynamic_querying.rb
265
+ - test/functional/test_validations.rb
266
+ - test/functional/test_callbacks.rb
267
+ - test/functional/test_userstamps.rb
268
+ - test/functional/test_sci.rb
269
+ - test/functional/test_logger.rb
270
+ - test/functional/test_string_id_compatibility.rb
271
+ - test/functional/associations/test_one_embedded_proxy.rb
272
+ - test/functional/associations/test_many_embedded_polymorphic_proxy.rb
273
+ - test/functional/associations/test_one_proxy.rb
274
+ - test/functional/associations/test_many_polymorphic_proxy.rb
275
+ - test/functional/associations/test_many_documents_proxy.rb
276
+ - test/functional/associations/test_in_array_proxy.rb
277
+ - test/functional/associations/test_belongs_to_proxy.rb
278
+ - test/functional/associations/test_belongs_to_polymorphic_proxy.rb
279
+ - test/functional/associations/test_many_documents_as_proxy.rb
280
+ - test/functional/associations/test_many_embedded_proxy.rb
281
+ - test/functional/test_timestamps.rb
282
+ - test/functional/test_associations.rb
283
+ - test/functional/test_modifiers.rb
284
+ - test/functional/test_accessible.rb
285
+ - test/functional/test_dirty.rb
286
+ - test/functional/test_querying.rb
287
+ - test/functional/test_scopes.rb
288
+ - test/functional/test_safe.rb
289
+ - test/functional/test_embedded_document.rb
290
+ - test/unit/test_document.rb
291
+ - test/unit/test_descendant_appends.rb
292
+ - test/unit/test_mongo_mapper.rb
293
+ - test/unit/test_rails_compatibility.rb
294
+ - test/unit/test_keys.rb
295
+ - test/unit/test_clone.rb
296
+ - test/unit/test_pagination.rb
297
+ - test/unit/serializers/test_json_serializer.rb
298
+ - test/unit/test_rails.rb
299
+ - test/unit/test_time_zones.rb
300
+ - test/unit/test_key.rb
301
+ - test/unit/test_validations.rb
302
+ - test/unit/test_plugins.rb
303
+ - test/unit/test_serialization.rb
304
+ - test/unit/test_dynamic_finder.rb
305
+ - test/unit/associations/test_base.rb
306
+ - test/unit/associations/test_proxy.rb
307
+ - test/unit/test_extensions.rb
308
+ - test/unit/test_embedded_document.rb
309
+ - test/test_helper.rb
310
+ - LICENSE
311
+ - UPGRADES
312
+ - README.rdoc
313
+ has_rdoc: true
314
+ homepage: http://github.com/jnunemaker/mongomapper
315
+ licenses: []
316
+
317
+ post_install_message:
318
+ rdoc_options: []
319
+
320
+ require_paths:
321
+ - lib
322
+ required_ruby_version: !ruby/object:Gem::Requirement
323
+ none: false
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ hash: 3
328
+ segments:
329
+ - 0
330
+ version: "0"
331
+ required_rubygems_version: !ruby/object:Gem::Requirement
332
+ none: false
333
+ requirements:
334
+ - - ">="
335
+ - !ruby/object:Gem::Version
336
+ hash: 3
337
+ segments:
338
+ - 0
339
+ version: "0"
340
+ requirements: []
341
+
342
+ rubyforge_project:
343
+ rubygems_version: 1.3.7
344
+ signing_key:
345
+ specification_version: 3
346
+ summary: A Ruby Object Mapper for Mongo
347
+ test_files: []
348
+