jmonteiro-mongo_mapper 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/.gitignore +10 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +38 -0
  4. data/Rakefile +55 -0
  5. data/VERSION +1 -0
  6. data/bin/mmconsole +60 -0
  7. data/jmonteiro-mongo_mapper.gemspec +195 -0
  8. data/lib/mongo_mapper.rb +128 -0
  9. data/lib/mongo_mapper/descendant_appends.rb +44 -0
  10. data/lib/mongo_mapper/document.rb +402 -0
  11. data/lib/mongo_mapper/dynamic_finder.rb +74 -0
  12. data/lib/mongo_mapper/embedded_document.rb +61 -0
  13. data/lib/mongo_mapper/finder_options.rb +127 -0
  14. data/lib/mongo_mapper/plugins.rb +19 -0
  15. data/lib/mongo_mapper/plugins/associations.rb +104 -0
  16. data/lib/mongo_mapper/plugins/associations/base.rb +121 -0
  17. data/lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb +28 -0
  18. data/lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb +23 -0
  19. data/lib/mongo_mapper/plugins/associations/collection.rb +21 -0
  20. data/lib/mongo_mapper/plugins/associations/embedded_collection.rb +49 -0
  21. data/lib/mongo_mapper/plugins/associations/in_array_proxy.rb +139 -0
  22. data/lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb +28 -0
  23. data/lib/mongo_mapper/plugins/associations/many_documents_proxy.rb +117 -0
  24. data/lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb +31 -0
  25. data/lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb +23 -0
  26. data/lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb +13 -0
  27. data/lib/mongo_mapper/plugins/associations/one_proxy.rb +66 -0
  28. data/lib/mongo_mapper/plugins/associations/proxy.rb +118 -0
  29. data/lib/mongo_mapper/plugins/callbacks.rb +65 -0
  30. data/lib/mongo_mapper/plugins/clone.rb +13 -0
  31. data/lib/mongo_mapper/plugins/descendants.rb +16 -0
  32. data/lib/mongo_mapper/plugins/dirty.rb +119 -0
  33. data/lib/mongo_mapper/plugins/equality.rb +11 -0
  34. data/lib/mongo_mapper/plugins/identity_map.rb +66 -0
  35. data/lib/mongo_mapper/plugins/inspect.rb +14 -0
  36. data/lib/mongo_mapper/plugins/keys.rb +295 -0
  37. data/lib/mongo_mapper/plugins/logger.rb +17 -0
  38. data/lib/mongo_mapper/plugins/pagination.rb +85 -0
  39. data/lib/mongo_mapper/plugins/protected.rb +31 -0
  40. data/lib/mongo_mapper/plugins/rails.rb +80 -0
  41. data/lib/mongo_mapper/plugins/serialization.rb +109 -0
  42. data/lib/mongo_mapper/plugins/validations.rb +48 -0
  43. data/lib/mongo_mapper/support.rb +213 -0
  44. data/performance/read_write.rb +52 -0
  45. data/specs.watchr +51 -0
  46. data/test/NOTE_ON_TESTING +1 -0
  47. data/test/functional/associations/test_belongs_to_polymorphic_proxy.rb +63 -0
  48. data/test/functional/associations/test_belongs_to_proxy.rb +93 -0
  49. data/test/functional/associations/test_in_array_proxy.rb +309 -0
  50. data/test/functional/associations/test_many_documents_as_proxy.rb +246 -0
  51. data/test/functional/associations/test_many_documents_proxy.rb +437 -0
  52. data/test/functional/associations/test_many_embedded_polymorphic_proxy.rb +175 -0
  53. data/test/functional/associations/test_many_embedded_proxy.rb +216 -0
  54. data/test/functional/associations/test_many_polymorphic_proxy.rb +340 -0
  55. data/test/functional/associations/test_one_proxy.rb +149 -0
  56. data/test/functional/test_associations.rb +44 -0
  57. data/test/functional/test_binary.rb +27 -0
  58. data/test/functional/test_callbacks.rb +81 -0
  59. data/test/functional/test_dirty.rb +156 -0
  60. data/test/functional/test_document.rb +1171 -0
  61. data/test/functional/test_embedded_document.rb +125 -0
  62. data/test/functional/test_identity_map.rb +233 -0
  63. data/test/functional/test_logger.rb +20 -0
  64. data/test/functional/test_modifiers.rb +252 -0
  65. data/test/functional/test_pagination.rb +93 -0
  66. data/test/functional/test_protected.rb +41 -0
  67. data/test/functional/test_string_id_compatibility.rb +67 -0
  68. data/test/functional/test_validations.rb +329 -0
  69. data/test/models.rb +232 -0
  70. data/test/support/custom_matchers.rb +55 -0
  71. data/test/support/timing.rb +16 -0
  72. data/test/test_helper.rb +60 -0
  73. data/test/unit/associations/test_base.rb +207 -0
  74. data/test/unit/associations/test_proxy.rb +103 -0
  75. data/test/unit/serializers/test_json_serializer.rb +189 -0
  76. data/test/unit/test_descendant_appends.rb +71 -0
  77. data/test/unit/test_document.rb +203 -0
  78. data/test/unit/test_dynamic_finder.rb +125 -0
  79. data/test/unit/test_embedded_document.rb +628 -0
  80. data/test/unit/test_finder_options.rb +325 -0
  81. data/test/unit/test_keys.rb +169 -0
  82. data/test/unit/test_mongo_mapper.rb +65 -0
  83. data/test/unit/test_pagination.rb +127 -0
  84. data/test/unit/test_plugins.rb +42 -0
  85. data/test/unit/test_rails.rb +139 -0
  86. data/test/unit/test_rails_compatibility.rb +42 -0
  87. data/test/unit/test_serialization.rb +51 -0
  88. data/test/unit/test_support.rb +350 -0
  89. data/test/unit/test_time_zones.rb +39 -0
  90. data/test/unit/test_validations.rb +492 -0
  91. metadata +260 -0
metadata ADDED
@@ -0,0 +1,260 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jmonteiro-mongo_mapper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - John Nunemaker
8
+ - Julio Monteiro
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2010-01-13 00:00:00 -02:00
14
+ default_executable: mmconsole
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: activesupport
18
+ type: :runtime
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "2.3"
25
+ version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: mongo
28
+ type: :runtime
29
+ version_requirement:
30
+ version_requirements: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "="
33
+ - !ruby/object:Gem::Version
34
+ version: 0.18.2
35
+ version:
36
+ - !ruby/object:Gem::Dependency
37
+ name: jnunemaker-validatable
38
+ type: :runtime
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - "="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.8.1
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: jnunemaker-matchy
48
+ type: :development
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.4.0
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: shoulda
58
+ type: :development
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - "="
63
+ - !ruby/object:Gem::Version
64
+ version: 2.10.2
65
+ version:
66
+ - !ruby/object:Gem::Dependency
67
+ name: timecop
68
+ type: :development
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.3.1
75
+ version:
76
+ - !ruby/object:Gem::Dependency
77
+ name: mocha
78
+ type: :development
79
+ version_requirement:
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "="
83
+ - !ruby/object:Gem::Version
84
+ version: 0.9.8
85
+ version:
86
+ description:
87
+ email:
88
+ - nunemaker@gmail.com
89
+ - julio@monteiro.eti.br
90
+ executables:
91
+ - mmconsole
92
+ extensions: []
93
+
94
+ extra_rdoc_files:
95
+ - LICENSE
96
+ - README.rdoc
97
+ files:
98
+ - .gitignore
99
+ - LICENSE
100
+ - README.rdoc
101
+ - Rakefile
102
+ - VERSION
103
+ - bin/mmconsole
104
+ - jmonteiro-mongo_mapper.gemspec
105
+ - lib/mongo_mapper.rb
106
+ - lib/mongo_mapper/descendant_appends.rb
107
+ - lib/mongo_mapper/document.rb
108
+ - lib/mongo_mapper/dynamic_finder.rb
109
+ - lib/mongo_mapper/embedded_document.rb
110
+ - lib/mongo_mapper/finder_options.rb
111
+ - lib/mongo_mapper/plugins.rb
112
+ - lib/mongo_mapper/plugins/associations.rb
113
+ - lib/mongo_mapper/plugins/associations/base.rb
114
+ - lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb
115
+ - lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb
116
+ - lib/mongo_mapper/plugins/associations/collection.rb
117
+ - lib/mongo_mapper/plugins/associations/embedded_collection.rb
118
+ - lib/mongo_mapper/plugins/associations/in_array_proxy.rb
119
+ - lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb
120
+ - lib/mongo_mapper/plugins/associations/many_documents_proxy.rb
121
+ - lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb
122
+ - lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb
123
+ - lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb
124
+ - lib/mongo_mapper/plugins/associations/one_proxy.rb
125
+ - lib/mongo_mapper/plugins/associations/proxy.rb
126
+ - lib/mongo_mapper/plugins/callbacks.rb
127
+ - lib/mongo_mapper/plugins/clone.rb
128
+ - lib/mongo_mapper/plugins/descendants.rb
129
+ - lib/mongo_mapper/plugins/dirty.rb
130
+ - lib/mongo_mapper/plugins/equality.rb
131
+ - lib/mongo_mapper/plugins/identity_map.rb
132
+ - lib/mongo_mapper/plugins/inspect.rb
133
+ - lib/mongo_mapper/plugins/keys.rb
134
+ - lib/mongo_mapper/plugins/logger.rb
135
+ - lib/mongo_mapper/plugins/pagination.rb
136
+ - lib/mongo_mapper/plugins/protected.rb
137
+ - lib/mongo_mapper/plugins/rails.rb
138
+ - lib/mongo_mapper/plugins/serialization.rb
139
+ - lib/mongo_mapper/plugins/validations.rb
140
+ - lib/mongo_mapper/support.rb
141
+ - performance/read_write.rb
142
+ - specs.watchr
143
+ - test/NOTE_ON_TESTING
144
+ - test/functional/associations/test_belongs_to_polymorphic_proxy.rb
145
+ - test/functional/associations/test_belongs_to_proxy.rb
146
+ - test/functional/associations/test_in_array_proxy.rb
147
+ - test/functional/associations/test_many_documents_as_proxy.rb
148
+ - test/functional/associations/test_many_documents_proxy.rb
149
+ - test/functional/associations/test_many_embedded_polymorphic_proxy.rb
150
+ - test/functional/associations/test_many_embedded_proxy.rb
151
+ - test/functional/associations/test_many_polymorphic_proxy.rb
152
+ - test/functional/associations/test_one_proxy.rb
153
+ - test/functional/test_associations.rb
154
+ - test/functional/test_binary.rb
155
+ - test/functional/test_callbacks.rb
156
+ - test/functional/test_dirty.rb
157
+ - test/functional/test_document.rb
158
+ - test/functional/test_embedded_document.rb
159
+ - test/functional/test_identity_map.rb
160
+ - test/functional/test_logger.rb
161
+ - test/functional/test_modifiers.rb
162
+ - test/functional/test_pagination.rb
163
+ - test/functional/test_protected.rb
164
+ - test/functional/test_string_id_compatibility.rb
165
+ - test/functional/test_validations.rb
166
+ - test/models.rb
167
+ - test/support/custom_matchers.rb
168
+ - test/support/timing.rb
169
+ - test/test_helper.rb
170
+ - test/unit/associations/test_base.rb
171
+ - test/unit/associations/test_proxy.rb
172
+ - test/unit/serializers/test_json_serializer.rb
173
+ - test/unit/test_descendant_appends.rb
174
+ - test/unit/test_document.rb
175
+ - test/unit/test_dynamic_finder.rb
176
+ - test/unit/test_embedded_document.rb
177
+ - test/unit/test_finder_options.rb
178
+ - test/unit/test_keys.rb
179
+ - test/unit/test_mongo_mapper.rb
180
+ - test/unit/test_pagination.rb
181
+ - test/unit/test_plugins.rb
182
+ - test/unit/test_rails.rb
183
+ - test/unit/test_rails_compatibility.rb
184
+ - test/unit/test_serialization.rb
185
+ - test/unit/test_support.rb
186
+ - test/unit/test_time_zones.rb
187
+ - test/unit/test_validations.rb
188
+ has_rdoc: true
189
+ homepage: http://github.com/jmonteiro/mongomapper
190
+ licenses: []
191
+
192
+ post_install_message:
193
+ rdoc_options:
194
+ - --charset=UTF-8
195
+ require_paths:
196
+ - lib
197
+ required_ruby_version: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: "0"
202
+ version:
203
+ required_rubygems_version: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: "0"
208
+ version:
209
+ requirements: []
210
+
211
+ rubyforge_project:
212
+ rubygems_version: 1.3.5
213
+ signing_key:
214
+ specification_version: 3
215
+ summary: Awesome gem for modeling your domain and storing it in mongo
216
+ test_files:
217
+ - test/functional/associations/test_belongs_to_polymorphic_proxy.rb
218
+ - test/functional/associations/test_belongs_to_proxy.rb
219
+ - test/functional/associations/test_in_array_proxy.rb
220
+ - test/functional/associations/test_many_documents_as_proxy.rb
221
+ - test/functional/associations/test_many_documents_proxy.rb
222
+ - test/functional/associations/test_many_embedded_polymorphic_proxy.rb
223
+ - test/functional/associations/test_many_embedded_proxy.rb
224
+ - test/functional/associations/test_many_polymorphic_proxy.rb
225
+ - test/functional/associations/test_one_proxy.rb
226
+ - test/functional/test_associations.rb
227
+ - test/functional/test_binary.rb
228
+ - test/functional/test_callbacks.rb
229
+ - test/functional/test_dirty.rb
230
+ - test/functional/test_document.rb
231
+ - test/functional/test_embedded_document.rb
232
+ - test/functional/test_identity_map.rb
233
+ - test/functional/test_logger.rb
234
+ - test/functional/test_modifiers.rb
235
+ - test/functional/test_pagination.rb
236
+ - test/functional/test_protected.rb
237
+ - test/functional/test_string_id_compatibility.rb
238
+ - test/functional/test_validations.rb
239
+ - test/models.rb
240
+ - test/support/custom_matchers.rb
241
+ - test/support/timing.rb
242
+ - test/test_helper.rb
243
+ - test/unit/associations/test_base.rb
244
+ - test/unit/associations/test_proxy.rb
245
+ - test/unit/serializers/test_json_serializer.rb
246
+ - test/unit/test_descendant_appends.rb
247
+ - test/unit/test_document.rb
248
+ - test/unit/test_dynamic_finder.rb
249
+ - test/unit/test_embedded_document.rb
250
+ - test/unit/test_finder_options.rb
251
+ - test/unit/test_keys.rb
252
+ - test/unit/test_mongo_mapper.rb
253
+ - test/unit/test_pagination.rb
254
+ - test/unit/test_plugins.rb
255
+ - test/unit/test_rails.rb
256
+ - test/unit/test_rails_compatibility.rb
257
+ - test/unit/test_serialization.rb
258
+ - test/unit/test_support.rb
259
+ - test/unit/test_time_zones.rb
260
+ - test/unit/test_validations.rb