mongo_mapper 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/.gitignore +7 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +39 -0
  4. data/Rakefile +87 -0
  5. data/VERSION +1 -0
  6. data/bin/mmconsole +55 -0
  7. data/lib/mongo_mapper.rb +92 -0
  8. data/lib/mongo_mapper/associations.rb +86 -0
  9. data/lib/mongo_mapper/associations/base.rb +83 -0
  10. data/lib/mongo_mapper/associations/belongs_to_polymorphic_proxy.rb +34 -0
  11. data/lib/mongo_mapper/associations/belongs_to_proxy.rb +22 -0
  12. data/lib/mongo_mapper/associations/many_documents_as_proxy.rb +27 -0
  13. data/lib/mongo_mapper/associations/many_documents_proxy.rb +116 -0
  14. data/lib/mongo_mapper/associations/many_embedded_polymorphic_proxy.rb +33 -0
  15. data/lib/mongo_mapper/associations/many_embedded_proxy.rb +67 -0
  16. data/lib/mongo_mapper/associations/many_polymorphic_proxy.rb +11 -0
  17. data/lib/mongo_mapper/associations/many_proxy.rb +6 -0
  18. data/lib/mongo_mapper/associations/proxy.rb +64 -0
  19. data/lib/mongo_mapper/callbacks.rb +106 -0
  20. data/lib/mongo_mapper/document.rb +317 -0
  21. data/lib/mongo_mapper/dynamic_finder.rb +35 -0
  22. data/lib/mongo_mapper/embedded_document.rb +354 -0
  23. data/lib/mongo_mapper/finder_options.rb +94 -0
  24. data/lib/mongo_mapper/key.rb +32 -0
  25. data/lib/mongo_mapper/observing.rb +50 -0
  26. data/lib/mongo_mapper/pagination.rb +51 -0
  27. data/lib/mongo_mapper/rails_compatibility/document.rb +15 -0
  28. data/lib/mongo_mapper/rails_compatibility/embedded_document.rb +27 -0
  29. data/lib/mongo_mapper/save_with_validation.rb +19 -0
  30. data/lib/mongo_mapper/serialization.rb +55 -0
  31. data/lib/mongo_mapper/serializers/json_serializer.rb +92 -0
  32. data/lib/mongo_mapper/support.rb +157 -0
  33. data/lib/mongo_mapper/validations.rb +69 -0
  34. data/mongo_mapper.gemspec +156 -0
  35. data/test/NOTE_ON_TESTING +1 -0
  36. data/test/custom_matchers.rb +48 -0
  37. data/test/functional/associations/test_belongs_to_polymorphic_proxy.rb +54 -0
  38. data/test/functional/associations/test_belongs_to_proxy.rb +46 -0
  39. data/test/functional/associations/test_many_documents_as_proxy.rb +244 -0
  40. data/test/functional/associations/test_many_embedded_polymorphic_proxy.rb +132 -0
  41. data/test/functional/associations/test_many_embedded_proxy.rb +174 -0
  42. data/test/functional/associations/test_many_polymorphic_proxy.rb +297 -0
  43. data/test/functional/associations/test_many_proxy.rb +331 -0
  44. data/test/functional/test_associations.rb +48 -0
  45. data/test/functional/test_binary.rb +18 -0
  46. data/test/functional/test_callbacks.rb +85 -0
  47. data/test/functional/test_document.rb +951 -0
  48. data/test/functional/test_embedded_document.rb +97 -0
  49. data/test/functional/test_pagination.rb +87 -0
  50. data/test/functional/test_rails_compatibility.rb +30 -0
  51. data/test/functional/test_validations.rb +279 -0
  52. data/test/models.rb +169 -0
  53. data/test/test_helper.rb +29 -0
  54. data/test/unit/serializers/test_json_serializer.rb +189 -0
  55. data/test/unit/test_association_base.rb +144 -0
  56. data/test/unit/test_document.rb +165 -0
  57. data/test/unit/test_dynamic_finder.rb +125 -0
  58. data/test/unit/test_embedded_document.rb +645 -0
  59. data/test/unit/test_finder_options.rb +193 -0
  60. data/test/unit/test_key.rb +163 -0
  61. data/test/unit/test_mongomapper.rb +28 -0
  62. data/test/unit/test_observing.rb +101 -0
  63. data/test/unit/test_pagination.rb +109 -0
  64. data/test/unit/test_rails_compatibility.rb +39 -0
  65. data/test/unit/test_serializations.rb +52 -0
  66. data/test/unit/test_support.rb +272 -0
  67. data/test/unit/test_time_zones.rb +40 -0
  68. data/test/unit/test_validations.rb +503 -0
  69. metadata +204 -0
metadata ADDED
@@ -0,0 +1,204 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mongo_mapper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
5
+ platform: ruby
6
+ authors:
7
+ - John Nunemaker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-10-07 00:00:00 -04:00
13
+ default_executable: mmconsole
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: mongo
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "="
32
+ - !ruby/object:Gem::Version
33
+ version: "0.15"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: jnunemaker-validatable
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.7.3
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: mocha
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.9.4
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: jnunemaker-matchy
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "="
62
+ - !ruby/object:Gem::Version
63
+ version: 0.4.0
64
+ version:
65
+ description:
66
+ email: nunemaker@gmail.com
67
+ executables:
68
+ - mmconsole
69
+ extensions: []
70
+
71
+ extra_rdoc_files:
72
+ - LICENSE
73
+ - README.rdoc
74
+ files:
75
+ - .gitignore
76
+ - LICENSE
77
+ - README.rdoc
78
+ - Rakefile
79
+ - VERSION
80
+ - bin/mmconsole
81
+ - lib/mongo_mapper.rb
82
+ - lib/mongo_mapper/associations.rb
83
+ - lib/mongo_mapper/associations/base.rb
84
+ - lib/mongo_mapper/associations/belongs_to_polymorphic_proxy.rb
85
+ - lib/mongo_mapper/associations/belongs_to_proxy.rb
86
+ - lib/mongo_mapper/associations/many_documents_as_proxy.rb
87
+ - lib/mongo_mapper/associations/many_documents_proxy.rb
88
+ - lib/mongo_mapper/associations/many_embedded_polymorphic_proxy.rb
89
+ - lib/mongo_mapper/associations/many_embedded_proxy.rb
90
+ - lib/mongo_mapper/associations/many_polymorphic_proxy.rb
91
+ - lib/mongo_mapper/associations/many_proxy.rb
92
+ - lib/mongo_mapper/associations/proxy.rb
93
+ - lib/mongo_mapper/callbacks.rb
94
+ - lib/mongo_mapper/document.rb
95
+ - lib/mongo_mapper/dynamic_finder.rb
96
+ - lib/mongo_mapper/embedded_document.rb
97
+ - lib/mongo_mapper/finder_options.rb
98
+ - lib/mongo_mapper/key.rb
99
+ - lib/mongo_mapper/observing.rb
100
+ - lib/mongo_mapper/pagination.rb
101
+ - lib/mongo_mapper/rails_compatibility/document.rb
102
+ - lib/mongo_mapper/rails_compatibility/embedded_document.rb
103
+ - lib/mongo_mapper/save_with_validation.rb
104
+ - lib/mongo_mapper/serialization.rb
105
+ - lib/mongo_mapper/serializers/json_serializer.rb
106
+ - lib/mongo_mapper/support.rb
107
+ - lib/mongo_mapper/validations.rb
108
+ - mongo_mapper.gemspec
109
+ - test/NOTE_ON_TESTING
110
+ - test/custom_matchers.rb
111
+ - test/functional/associations/test_belongs_to_polymorphic_proxy.rb
112
+ - test/functional/associations/test_belongs_to_proxy.rb
113
+ - test/functional/associations/test_many_documents_as_proxy.rb
114
+ - test/functional/associations/test_many_embedded_polymorphic_proxy.rb
115
+ - test/functional/associations/test_many_embedded_proxy.rb
116
+ - test/functional/associations/test_many_polymorphic_proxy.rb
117
+ - test/functional/associations/test_many_proxy.rb
118
+ - test/functional/test_associations.rb
119
+ - test/functional/test_binary.rb
120
+ - test/functional/test_callbacks.rb
121
+ - test/functional/test_document.rb
122
+ - test/functional/test_embedded_document.rb
123
+ - test/functional/test_pagination.rb
124
+ - test/functional/test_rails_compatibility.rb
125
+ - test/functional/test_validations.rb
126
+ - test/models.rb
127
+ - test/test_helper.rb
128
+ - test/unit/serializers/test_json_serializer.rb
129
+ - test/unit/test_association_base.rb
130
+ - test/unit/test_document.rb
131
+ - test/unit/test_dynamic_finder.rb
132
+ - test/unit/test_embedded_document.rb
133
+ - test/unit/test_finder_options.rb
134
+ - test/unit/test_key.rb
135
+ - test/unit/test_mongomapper.rb
136
+ - test/unit/test_observing.rb
137
+ - test/unit/test_pagination.rb
138
+ - test/unit/test_rails_compatibility.rb
139
+ - test/unit/test_serializations.rb
140
+ - test/unit/test_support.rb
141
+ - test/unit/test_time_zones.rb
142
+ - test/unit/test_validations.rb
143
+ has_rdoc: true
144
+ homepage: http://github.com/jnunemaker/mongomapper
145
+ licenses: []
146
+
147
+ post_install_message:
148
+ rdoc_options:
149
+ - --charset=UTF-8
150
+ require_paths:
151
+ - lib
152
+ required_ruby_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: "0"
157
+ version:
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: "0"
163
+ version:
164
+ requirements: []
165
+
166
+ rubyforge_project: mongomapper
167
+ rubygems_version: 1.3.5
168
+ signing_key:
169
+ specification_version: 3
170
+ summary: Awesome gem for modeling your domain and storing it in mongo
171
+ test_files:
172
+ - test/custom_matchers.rb
173
+ - test/functional/associations/test_belongs_to_polymorphic_proxy.rb
174
+ - test/functional/associations/test_belongs_to_proxy.rb
175
+ - test/functional/associations/test_many_documents_as_proxy.rb
176
+ - test/functional/associations/test_many_embedded_polymorphic_proxy.rb
177
+ - test/functional/associations/test_many_embedded_proxy.rb
178
+ - test/functional/associations/test_many_polymorphic_proxy.rb
179
+ - test/functional/associations/test_many_proxy.rb
180
+ - test/functional/test_associations.rb
181
+ - test/functional/test_binary.rb
182
+ - test/functional/test_callbacks.rb
183
+ - test/functional/test_document.rb
184
+ - test/functional/test_embedded_document.rb
185
+ - test/functional/test_pagination.rb
186
+ - test/functional/test_rails_compatibility.rb
187
+ - test/functional/test_validations.rb
188
+ - test/models.rb
189
+ - test/test_helper.rb
190
+ - test/unit/serializers/test_json_serializer.rb
191
+ - test/unit/test_association_base.rb
192
+ - test/unit/test_document.rb
193
+ - test/unit/test_dynamic_finder.rb
194
+ - test/unit/test_embedded_document.rb
195
+ - test/unit/test_finder_options.rb
196
+ - test/unit/test_key.rb
197
+ - test/unit/test_mongomapper.rb
198
+ - test/unit/test_observing.rb
199
+ - test/unit/test_pagination.rb
200
+ - test/unit/test_rails_compatibility.rb
201
+ - test/unit/test_serializations.rb
202
+ - test/unit/test_support.rb
203
+ - test/unit/test_time_zones.rb
204
+ - test/unit/test_validations.rb