mongoid-multi-db 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. data/CHANGELOG.md +615 -0
  2. data/LICENSE +20 -0
  3. data/README.md +62 -0
  4. data/Rakefile +49 -0
  5. data/lib/config/locales/bg.yml +54 -0
  6. data/lib/config/locales/de.yml +54 -0
  7. data/lib/config/locales/en-GB.yml +55 -0
  8. data/lib/config/locales/en.yml +55 -0
  9. data/lib/config/locales/es.yml +52 -0
  10. data/lib/config/locales/fr.yml +55 -0
  11. data/lib/config/locales/hi.yml +46 -0
  12. data/lib/config/locales/hu.yml +57 -0
  13. data/lib/config/locales/id.yml +55 -0
  14. data/lib/config/locales/it.yml +52 -0
  15. data/lib/config/locales/ja.yml +50 -0
  16. data/lib/config/locales/kr.yml +47 -0
  17. data/lib/config/locales/nl.yml +52 -0
  18. data/lib/config/locales/pl.yml +52 -0
  19. data/lib/config/locales/pt-BR.yml +53 -0
  20. data/lib/config/locales/pt.yml +53 -0
  21. data/lib/config/locales/ro.yml +59 -0
  22. data/lib/config/locales/ru.yml +54 -0
  23. data/lib/config/locales/sv.yml +53 -0
  24. data/lib/config/locales/vi.yml +55 -0
  25. data/lib/config/locales/zh-CN.yml +46 -0
  26. data/lib/mongoid.rb +148 -0
  27. data/lib/mongoid/atomic.rb +230 -0
  28. data/lib/mongoid/atomic/modifiers.rb +243 -0
  29. data/lib/mongoid/atomic/paths.rb +3 -0
  30. data/lib/mongoid/atomic/paths/embedded.rb +43 -0
  31. data/lib/mongoid/atomic/paths/embedded/many.rb +44 -0
  32. data/lib/mongoid/atomic/paths/embedded/one.rb +43 -0
  33. data/lib/mongoid/atomic/paths/root.rb +40 -0
  34. data/lib/mongoid/attributes.rb +234 -0
  35. data/lib/mongoid/attributes/processing.rb +146 -0
  36. data/lib/mongoid/callbacks.rb +135 -0
  37. data/lib/mongoid/collection.rb +153 -0
  38. data/lib/mongoid/collection_proxy.rb +59 -0
  39. data/lib/mongoid/collections.rb +120 -0
  40. data/lib/mongoid/collections/master.rb +45 -0
  41. data/lib/mongoid/collections/operations.rb +44 -0
  42. data/lib/mongoid/collections/retry.rb +46 -0
  43. data/lib/mongoid/components.rb +96 -0
  44. data/lib/mongoid/config.rb +347 -0
  45. data/lib/mongoid/config/database.rb +186 -0
  46. data/lib/mongoid/config/replset_database.rb +82 -0
  47. data/lib/mongoid/connection_proxy.rb +30 -0
  48. data/lib/mongoid/contexts.rb +25 -0
  49. data/lib/mongoid/contexts/enumerable.rb +288 -0
  50. data/lib/mongoid/contexts/enumerable/sort.rb +43 -0
  51. data/lib/mongoid/contexts/mongo.rb +409 -0
  52. data/lib/mongoid/copyable.rb +48 -0
  53. data/lib/mongoid/criteria.rb +418 -0
  54. data/lib/mongoid/criterion/builder.rb +34 -0
  55. data/lib/mongoid/criterion/complex.rb +84 -0
  56. data/lib/mongoid/criterion/creational.rb +34 -0
  57. data/lib/mongoid/criterion/exclusion.rb +108 -0
  58. data/lib/mongoid/criterion/inclusion.rb +305 -0
  59. data/lib/mongoid/criterion/inspection.rb +22 -0
  60. data/lib/mongoid/criterion/optional.rb +232 -0
  61. data/lib/mongoid/criterion/selector.rb +153 -0
  62. data/lib/mongoid/cursor.rb +86 -0
  63. data/lib/mongoid/database_proxy.rb +97 -0
  64. data/lib/mongoid/default_scope.rb +36 -0
  65. data/lib/mongoid/dirty.rb +110 -0
  66. data/lib/mongoid/document.rb +280 -0
  67. data/lib/mongoid/errors.rb +17 -0
  68. data/lib/mongoid/errors/callback.rb +26 -0
  69. data/lib/mongoid/errors/document_not_found.rb +28 -0
  70. data/lib/mongoid/errors/eager_load.rb +25 -0
  71. data/lib/mongoid/errors/invalid_collection.rb +18 -0
  72. data/lib/mongoid/errors/invalid_database.rb +19 -0
  73. data/lib/mongoid/errors/invalid_field.rb +18 -0
  74. data/lib/mongoid/errors/invalid_find.rb +19 -0
  75. data/lib/mongoid/errors/invalid_options.rb +28 -0
  76. data/lib/mongoid/errors/invalid_time.rb +25 -0
  77. data/lib/mongoid/errors/invalid_type.rb +25 -0
  78. data/lib/mongoid/errors/mixed_relations.rb +37 -0
  79. data/lib/mongoid/errors/mongoid_error.rb +26 -0
  80. data/lib/mongoid/errors/too_many_nested_attribute_records.rb +20 -0
  81. data/lib/mongoid/errors/unsaved_document.rb +23 -0
  82. data/lib/mongoid/errors/unsupported_version.rb +20 -0
  83. data/lib/mongoid/errors/validations.rb +23 -0
  84. data/lib/mongoid/extensions.rb +82 -0
  85. data/lib/mongoid/extensions/array/deletion.rb +29 -0
  86. data/lib/mongoid/extensions/false_class/equality.rb +26 -0
  87. data/lib/mongoid/extensions/hash/criteria_helpers.rb +45 -0
  88. data/lib/mongoid/extensions/hash/scoping.rb +25 -0
  89. data/lib/mongoid/extensions/integer/checks.rb +23 -0
  90. data/lib/mongoid/extensions/nil/collectionization.rb +23 -0
  91. data/lib/mongoid/extensions/object/checks.rb +29 -0
  92. data/lib/mongoid/extensions/object/reflections.rb +48 -0
  93. data/lib/mongoid/extensions/object/substitutable.rb +15 -0
  94. data/lib/mongoid/extensions/object/yoda.rb +44 -0
  95. data/lib/mongoid/extensions/object_id/conversions.rb +60 -0
  96. data/lib/mongoid/extensions/proc/scoping.rb +25 -0
  97. data/lib/mongoid/extensions/string/checks.rb +36 -0
  98. data/lib/mongoid/extensions/string/conversions.rb +22 -0
  99. data/lib/mongoid/extensions/string/inflections.rb +118 -0
  100. data/lib/mongoid/extensions/symbol/checks.rb +23 -0
  101. data/lib/mongoid/extensions/symbol/inflections.rb +66 -0
  102. data/lib/mongoid/extensions/true_class/equality.rb +26 -0
  103. data/lib/mongoid/extras.rb +31 -0
  104. data/lib/mongoid/factory.rb +46 -0
  105. data/lib/mongoid/fields.rb +332 -0
  106. data/lib/mongoid/fields/mappings.rb +41 -0
  107. data/lib/mongoid/fields/serializable.rb +201 -0
  108. data/lib/mongoid/fields/serializable/array.rb +49 -0
  109. data/lib/mongoid/fields/serializable/big_decimal.rb +42 -0
  110. data/lib/mongoid/fields/serializable/bignum.rb +10 -0
  111. data/lib/mongoid/fields/serializable/binary.rb +11 -0
  112. data/lib/mongoid/fields/serializable/boolean.rb +43 -0
  113. data/lib/mongoid/fields/serializable/date.rb +51 -0
  114. data/lib/mongoid/fields/serializable/date_time.rb +28 -0
  115. data/lib/mongoid/fields/serializable/fixnum.rb +10 -0
  116. data/lib/mongoid/fields/serializable/float.rb +32 -0
  117. data/lib/mongoid/fields/serializable/foreign_keys/array.rb +42 -0
  118. data/lib/mongoid/fields/serializable/foreign_keys/object.rb +47 -0
  119. data/lib/mongoid/fields/serializable/hash.rb +11 -0
  120. data/lib/mongoid/fields/serializable/integer.rb +44 -0
  121. data/lib/mongoid/fields/serializable/localized.rb +41 -0
  122. data/lib/mongoid/fields/serializable/nil_class.rb +38 -0
  123. data/lib/mongoid/fields/serializable/object.rb +11 -0
  124. data/lib/mongoid/fields/serializable/object_id.rb +31 -0
  125. data/lib/mongoid/fields/serializable/range.rb +42 -0
  126. data/lib/mongoid/fields/serializable/set.rb +42 -0
  127. data/lib/mongoid/fields/serializable/string.rb +27 -0
  128. data/lib/mongoid/fields/serializable/symbol.rb +27 -0
  129. data/lib/mongoid/fields/serializable/time.rb +23 -0
  130. data/lib/mongoid/fields/serializable/time_with_zone.rb +23 -0
  131. data/lib/mongoid/fields/serializable/timekeeping.rb +106 -0
  132. data/lib/mongoid/finders.rb +152 -0
  133. data/lib/mongoid/hierarchy.rb +120 -0
  134. data/lib/mongoid/identity.rb +92 -0
  135. data/lib/mongoid/identity_map.rb +119 -0
  136. data/lib/mongoid/indexes.rb +54 -0
  137. data/lib/mongoid/inspection.rb +54 -0
  138. data/lib/mongoid/javascript.rb +20 -0
  139. data/lib/mongoid/javascript/functions.yml +63 -0
  140. data/lib/mongoid/json.rb +16 -0
  141. data/lib/mongoid/keys.rb +144 -0
  142. data/lib/mongoid/logger.rb +39 -0
  143. data/lib/mongoid/matchers.rb +32 -0
  144. data/lib/mongoid/matchers/all.rb +21 -0
  145. data/lib/mongoid/matchers/and.rb +30 -0
  146. data/lib/mongoid/matchers/default.rb +70 -0
  147. data/lib/mongoid/matchers/exists.rb +23 -0
  148. data/lib/mongoid/matchers/gt.rb +21 -0
  149. data/lib/mongoid/matchers/gte.rb +21 -0
  150. data/lib/mongoid/matchers/in.rb +21 -0
  151. data/lib/mongoid/matchers/lt.rb +21 -0
  152. data/lib/mongoid/matchers/lte.rb +21 -0
  153. data/lib/mongoid/matchers/ne.rb +21 -0
  154. data/lib/mongoid/matchers/nin.rb +21 -0
  155. data/lib/mongoid/matchers/or.rb +33 -0
  156. data/lib/mongoid/matchers/size.rb +21 -0
  157. data/lib/mongoid/matchers/strategies.rb +93 -0
  158. data/lib/mongoid/multi_database.rb +31 -0
  159. data/lib/mongoid/multi_parameter_attributes.rb +106 -0
  160. data/lib/mongoid/named_scope.rb +146 -0
  161. data/lib/mongoid/nested_attributes.rb +54 -0
  162. data/lib/mongoid/observer.rb +170 -0
  163. data/lib/mongoid/paranoia.rb +158 -0
  164. data/lib/mongoid/persistence.rb +264 -0
  165. data/lib/mongoid/persistence/atomic.rb +223 -0
  166. data/lib/mongoid/persistence/atomic/add_to_set.rb +35 -0
  167. data/lib/mongoid/persistence/atomic/bit.rb +37 -0
  168. data/lib/mongoid/persistence/atomic/inc.rb +31 -0
  169. data/lib/mongoid/persistence/atomic/operation.rb +85 -0
  170. data/lib/mongoid/persistence/atomic/pop.rb +34 -0
  171. data/lib/mongoid/persistence/atomic/pull.rb +34 -0
  172. data/lib/mongoid/persistence/atomic/pull_all.rb +34 -0
  173. data/lib/mongoid/persistence/atomic/push.rb +31 -0
  174. data/lib/mongoid/persistence/atomic/push_all.rb +31 -0
  175. data/lib/mongoid/persistence/atomic/rename.rb +31 -0
  176. data/lib/mongoid/persistence/atomic/sets.rb +30 -0
  177. data/lib/mongoid/persistence/atomic/unset.rb +28 -0
  178. data/lib/mongoid/persistence/deletion.rb +32 -0
  179. data/lib/mongoid/persistence/insertion.rb +41 -0
  180. data/lib/mongoid/persistence/modification.rb +37 -0
  181. data/lib/mongoid/persistence/operations.rb +211 -0
  182. data/lib/mongoid/persistence/operations/embedded/insert.rb +42 -0
  183. data/lib/mongoid/persistence/operations/embedded/remove.rb +40 -0
  184. data/lib/mongoid/persistence/operations/insert.rb +34 -0
  185. data/lib/mongoid/persistence/operations/remove.rb +33 -0
  186. data/lib/mongoid/persistence/operations/update.rb +64 -0
  187. data/lib/mongoid/railtie.rb +126 -0
  188. data/lib/mongoid/railties/database.rake +182 -0
  189. data/lib/mongoid/railties/document.rb +12 -0
  190. data/lib/mongoid/relations.rb +144 -0
  191. data/lib/mongoid/relations/accessors.rb +138 -0
  192. data/lib/mongoid/relations/auto_save.rb +38 -0
  193. data/lib/mongoid/relations/binding.rb +26 -0
  194. data/lib/mongoid/relations/bindings.rb +9 -0
  195. data/lib/mongoid/relations/bindings/embedded/in.rb +69 -0
  196. data/lib/mongoid/relations/bindings/embedded/many.rb +93 -0
  197. data/lib/mongoid/relations/bindings/embedded/one.rb +61 -0
  198. data/lib/mongoid/relations/bindings/referenced/in.rb +76 -0
  199. data/lib/mongoid/relations/bindings/referenced/many.rb +54 -0
  200. data/lib/mongoid/relations/bindings/referenced/many_to_many.rb +51 -0
  201. data/lib/mongoid/relations/bindings/referenced/one.rb +58 -0
  202. data/lib/mongoid/relations/builder.rb +57 -0
  203. data/lib/mongoid/relations/builders.rb +83 -0
  204. data/lib/mongoid/relations/builders/embedded/in.rb +29 -0
  205. data/lib/mongoid/relations/builders/embedded/many.rb +40 -0
  206. data/lib/mongoid/relations/builders/embedded/one.rb +30 -0
  207. data/lib/mongoid/relations/builders/nested_attributes/many.rb +110 -0
  208. data/lib/mongoid/relations/builders/nested_attributes/one.rb +135 -0
  209. data/lib/mongoid/relations/builders/referenced/in.rb +26 -0
  210. data/lib/mongoid/relations/builders/referenced/many.rb +27 -0
  211. data/lib/mongoid/relations/builders/referenced/many_to_many.rb +38 -0
  212. data/lib/mongoid/relations/builders/referenced/one.rb +26 -0
  213. data/lib/mongoid/relations/cascading.rb +56 -0
  214. data/lib/mongoid/relations/cascading/delete.rb +19 -0
  215. data/lib/mongoid/relations/cascading/destroy.rb +26 -0
  216. data/lib/mongoid/relations/cascading/nullify.rb +18 -0
  217. data/lib/mongoid/relations/cascading/strategy.rb +26 -0
  218. data/lib/mongoid/relations/constraint.rb +42 -0
  219. data/lib/mongoid/relations/conversions.rb +35 -0
  220. data/lib/mongoid/relations/cyclic.rb +103 -0
  221. data/lib/mongoid/relations/embedded/atomic.rb +89 -0
  222. data/lib/mongoid/relations/embedded/atomic/operation.rb +63 -0
  223. data/lib/mongoid/relations/embedded/atomic/pull.rb +65 -0
  224. data/lib/mongoid/relations/embedded/atomic/push_all.rb +59 -0
  225. data/lib/mongoid/relations/embedded/atomic/set.rb +61 -0
  226. data/lib/mongoid/relations/embedded/atomic/unset.rb +41 -0
  227. data/lib/mongoid/relations/embedded/in.rb +220 -0
  228. data/lib/mongoid/relations/embedded/many.rb +560 -0
  229. data/lib/mongoid/relations/embedded/one.rb +206 -0
  230. data/lib/mongoid/relations/embedded/sort.rb +31 -0
  231. data/lib/mongoid/relations/macros.rb +310 -0
  232. data/lib/mongoid/relations/many.rb +135 -0
  233. data/lib/mongoid/relations/metadata.rb +919 -0
  234. data/lib/mongoid/relations/nested_builder.rb +75 -0
  235. data/lib/mongoid/relations/one.rb +36 -0
  236. data/lib/mongoid/relations/options.rb +47 -0
  237. data/lib/mongoid/relations/polymorphic.rb +40 -0
  238. data/lib/mongoid/relations/proxy.rb +145 -0
  239. data/lib/mongoid/relations/referenced/batch.rb +72 -0
  240. data/lib/mongoid/relations/referenced/batch/insert.rb +57 -0
  241. data/lib/mongoid/relations/referenced/in.rb +262 -0
  242. data/lib/mongoid/relations/referenced/many.rb +623 -0
  243. data/lib/mongoid/relations/referenced/many_to_many.rb +396 -0
  244. data/lib/mongoid/relations/referenced/one.rb +272 -0
  245. data/lib/mongoid/relations/reflections.rb +62 -0
  246. data/lib/mongoid/relations/synchronization.rb +153 -0
  247. data/lib/mongoid/relations/targets.rb +2 -0
  248. data/lib/mongoid/relations/targets/enumerable.rb +372 -0
  249. data/lib/mongoid/reloading.rb +91 -0
  250. data/lib/mongoid/safety.rb +105 -0
  251. data/lib/mongoid/scope.rb +31 -0
  252. data/lib/mongoid/serialization.rb +134 -0
  253. data/lib/mongoid/sharding.rb +61 -0
  254. data/lib/mongoid/state.rb +97 -0
  255. data/lib/mongoid/threaded.rb +530 -0
  256. data/lib/mongoid/threaded/lifecycle.rb +192 -0
  257. data/lib/mongoid/timestamps.rb +15 -0
  258. data/lib/mongoid/timestamps/created.rb +24 -0
  259. data/lib/mongoid/timestamps/timeless.rb +50 -0
  260. data/lib/mongoid/timestamps/updated.rb +26 -0
  261. data/lib/mongoid/validations.rb +140 -0
  262. data/lib/mongoid/validations/associated.rb +46 -0
  263. data/lib/mongoid/validations/uniqueness.rb +145 -0
  264. data/lib/mongoid/version.rb +4 -0
  265. data/lib/mongoid/versioning.rb +185 -0
  266. data/lib/rack/mongoid.rb +2 -0
  267. data/lib/rack/mongoid/middleware/identity_map.rb +38 -0
  268. data/lib/rails/generators/mongoid/config/config_generator.rb +25 -0
  269. data/lib/rails/generators/mongoid/config/templates/mongoid.yml +20 -0
  270. data/lib/rails/generators/mongoid/model/model_generator.rb +24 -0
  271. data/lib/rails/generators/mongoid/model/templates/model.rb.tt +19 -0
  272. data/lib/rails/generators/mongoid/observer/observer_generator.rb +17 -0
  273. data/lib/rails/generators/mongoid/observer/templates/observer.rb.tt +4 -0
  274. data/lib/rails/generators/mongoid_generator.rb +70 -0
  275. data/lib/rails/mongoid.rb +91 -0
  276. metadata +465 -0
@@ -0,0 +1,20 @@
1
+ development:
2
+ host: localhost
3
+ database: <%= database_name || app_name %>_development
4
+
5
+ test:
6
+ host: localhost
7
+ database: <%= database_name || app_name %>_test
8
+
9
+ # set these environment variables on your prod server
10
+ production:
11
+ host: <%%= ENV['MONGOID_HOST'] %>
12
+ port: <%%= ENV['MONGOID_PORT'] %>
13
+ username: <%%= ENV['MONGOID_USERNAME'] %>
14
+ password: <%%= ENV['MONGOID_PASSWORD'] %>
15
+ database: <%%= ENV['MONGOID_DATABASE'] %>
16
+ # slaves:
17
+ # - host: slave1.local
18
+ # port: 27018
19
+ # - host: slave2.local
20
+ # port: 27019
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+ require "rails/generators/mongoid_generator"
3
+
4
+ module Mongoid #:nodoc:
5
+ module Generators #:nodoc:
6
+ class ModelGenerator < Base #:nodoc:
7
+
8
+ desc "Creates a Mongoid model"
9
+ argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
10
+
11
+ check_class_collision
12
+
13
+ class_option :timestamps, :type => :boolean
14
+ class_option :parent, :type => :string, :desc => "The parent class for the generated model"
15
+ class_option :versioning, :type => :boolean, :default => false, :desc => "Enable mongoid versioning"
16
+
17
+ def create_model_file
18
+ template "model.rb.tt", File.join("app/models", class_path, "#{file_name}.rb")
19
+ end
20
+
21
+ hook_for :test_framework
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,19 @@
1
+ <% module_namespacing do -%>
2
+ class <%= class_name %><%= " < #{options[:parent].classify}" if options[:parent] %>
3
+ <% unless options[:parent] -%>
4
+ include Mongoid::Document
5
+ <% end -%>
6
+ <% if options[:timestamps] -%>
7
+ include Mongoid::Timestamps
8
+ <% end -%>
9
+ <% if options[:versioning] -%>
10
+ include Mongoid::Versioning
11
+ <% end -%>
12
+ <% attributes.reject{|attr| attr.reference?}.each do |attribute| -%>
13
+ field :<%= attribute.name %>, :type => <%= attribute.type_class %>
14
+ <% end -%>
15
+ <% attributes.select{|attr| attr.reference? }.each do |attribute| -%>
16
+ embedded_in :<%= attribute.name%>, :inverse_of => :<%= class_name.tableize %>
17
+ <% end -%>
18
+ end
19
+ <% end -%>
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ require "rails/generators/mongoid_generator"
3
+
4
+ module Mongoid #:nodoc:
5
+ module Generators #:nodoc:
6
+ class ObserverGenerator < Base #:nodoc:
7
+
8
+ check_class_collision :suffix => "Observer"
9
+
10
+ def create_observer_file
11
+ template 'observer.rb.tt', File.join('app/models', class_path, "#{file_name}_observer.rb")
12
+ end
13
+
14
+ hook_for :test_framework
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,4 @@
1
+ <% module_namespacing do -%>
2
+ class <%= class_name %>Observer < Mongoid::Observer
3
+ end
4
+ <% end -%>
@@ -0,0 +1,70 @@
1
+ # encoding: utf-8
2
+ require "rails/generators/named_base"
3
+ require "rails/generators/active_model"
4
+
5
+ module Mongoid #:nodoc:
6
+ module Generators #:nodoc:
7
+ class Base < ::Rails::Generators::NamedBase #:nodoc:
8
+
9
+ def self.source_root
10
+ @_mongoid_source_root ||=
11
+ File.expand_path("../#{base_name}/#{generator_name}/templates", __FILE__)
12
+ end
13
+
14
+ unless methods.include?(:module_namespacing)
15
+
16
+ # This is only defined on Rails edge at the moment, so include here now
17
+ # as per: https://github.com/mongoid/mongoid/issues/744
18
+ def module_namespacing(&block)
19
+ yield if block
20
+ end
21
+ end
22
+ end
23
+
24
+ class ActiveModel < ::Rails::Generators::ActiveModel #:nodoc:
25
+ def self.all(klass)
26
+ "#{klass}.all"
27
+ end
28
+
29
+ def self.find(klass, params=nil)
30
+ "#{klass}.find(#{params})"
31
+ end
32
+
33
+ def self.build(klass, params=nil)
34
+ if params
35
+ "#{klass}.new(#{params})"
36
+ else
37
+ "#{klass}.new"
38
+ end
39
+ end
40
+
41
+ def save
42
+ "#{name}.save"
43
+ end
44
+
45
+ def update_attributes(params=nil)
46
+ "#{name}.update_attributes(#{params})"
47
+ end
48
+
49
+ def errors
50
+ "#{name}.errors"
51
+ end
52
+
53
+ def destroy
54
+ "#{name}.destroy"
55
+ end
56
+ end
57
+ end
58
+ end
59
+
60
+ module Rails
61
+ module Generators
62
+ class GeneratedAttribute #:nodoc:
63
+ def type_class
64
+ return "Time" if type.to_s == "datetime"
65
+ return "String" if type.to_s == "text"
66
+ type.to_s.camelcase
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,91 @@
1
+ # encoding: utf-8
2
+ module Rails #:nodoc:
3
+ module Mongoid #:nodoc:
4
+ extend self
5
+
6
+ # Create indexes for each model given the provided pattern and the class is
7
+ # not embedded.
8
+ #
9
+ # @example Create all the indexes.
10
+ # Rails::Mongoid.create_indexes("app/models/**/*.rb")
11
+ #
12
+ # @param [ String ] pattern The file matching pattern.
13
+ #
14
+ # @return [ Array<String> ] The file names.
15
+ #
16
+ # @since 2.1.0
17
+ def create_indexes(pattern)
18
+ Dir.glob(pattern).each do |file|
19
+ logger = Logger.new($stdout)
20
+ begin
21
+ model = determine_model(file)
22
+ if model
23
+ model.create_indexes
24
+ logger.info("Generated indexes for #{model}")
25
+ end
26
+ rescue => e
27
+ logger.error("ERROR: #{e.message}")
28
+ end
29
+ end
30
+ end
31
+
32
+ # Use the application configuration to get every model and require it, so
33
+ # that indexing and inheritance work in both development and production
34
+ # with the same results.
35
+ #
36
+ # @example Load all the application models.
37
+ # Rails::Mongoid.load_models(app)
38
+ #
39
+ # @param [ Application ] app The rails application.
40
+ def load_models(app)
41
+ app.config.paths["app/models"].each do |path|
42
+ Dir.glob("#{path}/**/*.rb").sort.each do |file|
43
+ load_model(file.gsub("#{path}/" , "").gsub(".rb", ""))
44
+ end
45
+ end
46
+ end
47
+
48
+ # Conditionally calls `Rails::Mongoid.load_models(app)` if the
49
+ # `::Mongoid.preload_models` is `true`.
50
+ #
51
+ # @param [ Application ] app The rails application.
52
+ def preload_models(app)
53
+ load_models(app) if ::Mongoid.preload_models
54
+ end
55
+
56
+ private
57
+
58
+ # I don't want to mock out kernel for unit testing purposes, so added this
59
+ # method as a convenience.
60
+ #
61
+ # @example Load the model.
62
+ # Mongoid.load_model("/mongoid/behaviour")
63
+ #
64
+ # @param [ String ] file The base filename.
65
+ #
66
+ # @since 2.0.0.rc.3
67
+ def load_model(file)
68
+ require_dependency(file)
69
+ end
70
+
71
+ # Given the provided file name, determine the model and return the class.
72
+ #
73
+ # @example Determine the model from the file.
74
+ # Rails::Mongoid.determine_model("app/models/person.rb")
75
+ #
76
+ # @param [ String ] file The filename.
77
+ #
78
+ # @return [ Class ] The model.
79
+ #
80
+ # @since 2.1.0
81
+ def determine_model(file)
82
+ if file =~ /app\/models\/(.*).rb$/
83
+ model_path = $1.split('/')
84
+ klass = model_path.map { |path| path.camelize }.join('::').constantize
85
+ if klass.ancestors.include?(::Mongoid::Document) && !klass.embedded
86
+ return klass
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
metadata ADDED
@@ -0,0 +1,465 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mongoid-multi-db
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Durran Jordan
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activemodel
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ - !ruby/object:Gem::Dependency
31
+ name: tzinfo
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.3.22
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.3.22
46
+ - !ruby/object:Gem::Dependency
47
+ name: mongo
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '1.3'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rdoc
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 3.5.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 3.5.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: bson_ext
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '1.3'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '1.3'
94
+ - !ruby/object:Gem::Dependency
95
+ name: mocha
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 0.9.12
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.9.12
110
+ - !ruby/object:Gem::Dependency
111
+ name: rspec
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '2.6'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '2.6'
126
+ - !ruby/object:Gem::Dependency
127
+ name: watchr
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: '0.6'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: '0.6'
142
+ - !ruby/object:Gem::Dependency
143
+ name: ammeter
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
149
+ version: 0.1.3
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 0.1.3
158
+ description: Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written
159
+ in Ruby.
160
+ email:
161
+ - durran@gmail.com
162
+ executables: []
163
+ extensions: []
164
+ extra_rdoc_files: []
165
+ files:
166
+ - lib/config/locales/bg.yml
167
+ - lib/config/locales/de.yml
168
+ - lib/config/locales/en-GB.yml
169
+ - lib/config/locales/en.yml
170
+ - lib/config/locales/es.yml
171
+ - lib/config/locales/fr.yml
172
+ - lib/config/locales/hi.yml
173
+ - lib/config/locales/hu.yml
174
+ - lib/config/locales/id.yml
175
+ - lib/config/locales/it.yml
176
+ - lib/config/locales/ja.yml
177
+ - lib/config/locales/kr.yml
178
+ - lib/config/locales/nl.yml
179
+ - lib/config/locales/pl.yml
180
+ - lib/config/locales/pt-BR.yml
181
+ - lib/config/locales/pt.yml
182
+ - lib/config/locales/ro.yml
183
+ - lib/config/locales/ru.yml
184
+ - lib/config/locales/sv.yml
185
+ - lib/config/locales/vi.yml
186
+ - lib/config/locales/zh-CN.yml
187
+ - lib/mongoid/document.rb
188
+ - lib/mongoid/logger.rb
189
+ - lib/mongoid/atomic/modifiers.rb
190
+ - lib/mongoid/atomic/paths/embedded/many.rb
191
+ - lib/mongoid/atomic/paths/embedded/one.rb
192
+ - lib/mongoid/atomic/paths/embedded.rb
193
+ - lib/mongoid/atomic/paths/root.rb
194
+ - lib/mongoid/atomic/paths.rb
195
+ - lib/mongoid/atomic.rb
196
+ - lib/mongoid/attributes/processing.rb
197
+ - lib/mongoid/attributes.rb
198
+ - lib/mongoid/callbacks.rb
199
+ - lib/mongoid/collection.rb
200
+ - lib/mongoid/collections/master.rb
201
+ - lib/mongoid/collections/operations.rb
202
+ - lib/mongoid/collections/retry.rb
203
+ - lib/mongoid/collections.rb
204
+ - lib/mongoid/collection_proxy.rb
205
+ - lib/mongoid/components.rb
206
+ - lib/mongoid/config/database.rb
207
+ - lib/mongoid/config/replset_database.rb
208
+ - lib/mongoid/config.rb
209
+ - lib/mongoid/connection_proxy.rb
210
+ - lib/mongoid/contexts/enumerable/sort.rb
211
+ - lib/mongoid/contexts/enumerable.rb
212
+ - lib/mongoid/contexts/mongo.rb
213
+ - lib/mongoid/contexts.rb
214
+ - lib/mongoid/copyable.rb
215
+ - lib/mongoid/criteria.rb
216
+ - lib/mongoid/criterion/builder.rb
217
+ - lib/mongoid/criterion/complex.rb
218
+ - lib/mongoid/criterion/creational.rb
219
+ - lib/mongoid/criterion/exclusion.rb
220
+ - lib/mongoid/criterion/inclusion.rb
221
+ - lib/mongoid/criterion/inspection.rb
222
+ - lib/mongoid/criterion/optional.rb
223
+ - lib/mongoid/criterion/selector.rb
224
+ - lib/mongoid/cursor.rb
225
+ - lib/mongoid/database_proxy.rb
226
+ - lib/mongoid/default_scope.rb
227
+ - lib/mongoid/dirty.rb
228
+ - lib/mongoid/errors/callback.rb
229
+ - lib/mongoid/errors/document_not_found.rb
230
+ - lib/mongoid/errors/eager_load.rb
231
+ - lib/mongoid/errors/invalid_collection.rb
232
+ - lib/mongoid/errors/invalid_database.rb
233
+ - lib/mongoid/errors/invalid_field.rb
234
+ - lib/mongoid/errors/invalid_find.rb
235
+ - lib/mongoid/errors/invalid_options.rb
236
+ - lib/mongoid/errors/invalid_time.rb
237
+ - lib/mongoid/errors/invalid_type.rb
238
+ - lib/mongoid/errors/mixed_relations.rb
239
+ - lib/mongoid/errors/mongoid_error.rb
240
+ - lib/mongoid/errors/too_many_nested_attribute_records.rb
241
+ - lib/mongoid/errors/unsaved_document.rb
242
+ - lib/mongoid/errors/unsupported_version.rb
243
+ - lib/mongoid/errors/validations.rb
244
+ - lib/mongoid/errors.rb
245
+ - lib/mongoid/extensions/array/deletion.rb
246
+ - lib/mongoid/extensions/false_class/equality.rb
247
+ - lib/mongoid/extensions/hash/criteria_helpers.rb
248
+ - lib/mongoid/extensions/hash/scoping.rb
249
+ - lib/mongoid/extensions/integer/checks.rb
250
+ - lib/mongoid/extensions/nil/collectionization.rb
251
+ - lib/mongoid/extensions/object/checks.rb
252
+ - lib/mongoid/extensions/object/reflections.rb
253
+ - lib/mongoid/extensions/object/substitutable.rb
254
+ - lib/mongoid/extensions/object/yoda.rb
255
+ - lib/mongoid/extensions/object_id/conversions.rb
256
+ - lib/mongoid/extensions/proc/scoping.rb
257
+ - lib/mongoid/extensions/string/checks.rb
258
+ - lib/mongoid/extensions/string/conversions.rb
259
+ - lib/mongoid/extensions/string/inflections.rb
260
+ - lib/mongoid/extensions/symbol/checks.rb
261
+ - lib/mongoid/extensions/symbol/inflections.rb
262
+ - lib/mongoid/extensions/true_class/equality.rb
263
+ - lib/mongoid/extensions.rb
264
+ - lib/mongoid/extras.rb
265
+ - lib/mongoid/factory.rb
266
+ - lib/mongoid/fields/mappings.rb
267
+ - lib/mongoid/fields/serializable/array.rb
268
+ - lib/mongoid/fields/serializable/bignum.rb
269
+ - lib/mongoid/fields/serializable/big_decimal.rb
270
+ - lib/mongoid/fields/serializable/binary.rb
271
+ - lib/mongoid/fields/serializable/boolean.rb
272
+ - lib/mongoid/fields/serializable/date.rb
273
+ - lib/mongoid/fields/serializable/date_time.rb
274
+ - lib/mongoid/fields/serializable/fixnum.rb
275
+ - lib/mongoid/fields/serializable/float.rb
276
+ - lib/mongoid/fields/serializable/foreign_keys/array.rb
277
+ - lib/mongoid/fields/serializable/foreign_keys/object.rb
278
+ - lib/mongoid/fields/serializable/hash.rb
279
+ - lib/mongoid/fields/serializable/integer.rb
280
+ - lib/mongoid/fields/serializable/localized.rb
281
+ - lib/mongoid/fields/serializable/nil_class.rb
282
+ - lib/mongoid/fields/serializable/object.rb
283
+ - lib/mongoid/fields/serializable/object_id.rb
284
+ - lib/mongoid/fields/serializable/range.rb
285
+ - lib/mongoid/fields/serializable/set.rb
286
+ - lib/mongoid/fields/serializable/string.rb
287
+ - lib/mongoid/fields/serializable/symbol.rb
288
+ - lib/mongoid/fields/serializable/time.rb
289
+ - lib/mongoid/fields/serializable/timekeeping.rb
290
+ - lib/mongoid/fields/serializable/time_with_zone.rb
291
+ - lib/mongoid/fields/serializable.rb
292
+ - lib/mongoid/fields.rb
293
+ - lib/mongoid/finders.rb
294
+ - lib/mongoid/hierarchy.rb
295
+ - lib/mongoid/identity.rb
296
+ - lib/mongoid/identity_map.rb
297
+ - lib/mongoid/indexes.rb
298
+ - lib/mongoid/inspection.rb
299
+ - lib/mongoid/javascript/functions.yml
300
+ - lib/mongoid/javascript.rb
301
+ - lib/mongoid/json.rb
302
+ - lib/mongoid/keys.rb
303
+ - lib/mongoid/matchers/all.rb
304
+ - lib/mongoid/matchers/and.rb
305
+ - lib/mongoid/matchers/default.rb
306
+ - lib/mongoid/matchers/exists.rb
307
+ - lib/mongoid/matchers/gt.rb
308
+ - lib/mongoid/matchers/gte.rb
309
+ - lib/mongoid/matchers/in.rb
310
+ - lib/mongoid/matchers/lt.rb
311
+ - lib/mongoid/matchers/lte.rb
312
+ - lib/mongoid/matchers/ne.rb
313
+ - lib/mongoid/matchers/nin.rb
314
+ - lib/mongoid/matchers/or.rb
315
+ - lib/mongoid/matchers/size.rb
316
+ - lib/mongoid/matchers/strategies.rb
317
+ - lib/mongoid/matchers.rb
318
+ - lib/mongoid/multi_database.rb
319
+ - lib/mongoid/multi_parameter_attributes.rb
320
+ - lib/mongoid/named_scope.rb
321
+ - lib/mongoid/nested_attributes.rb
322
+ - lib/mongoid/observer.rb
323
+ - lib/mongoid/paranoia.rb
324
+ - lib/mongoid/persistence/atomic/add_to_set.rb
325
+ - lib/mongoid/persistence/atomic/bit.rb
326
+ - lib/mongoid/persistence/atomic/inc.rb
327
+ - lib/mongoid/persistence/atomic/operation.rb
328
+ - lib/mongoid/persistence/atomic/pop.rb
329
+ - lib/mongoid/persistence/atomic/pull.rb
330
+ - lib/mongoid/persistence/atomic/pull_all.rb
331
+ - lib/mongoid/persistence/atomic/push.rb
332
+ - lib/mongoid/persistence/atomic/push_all.rb
333
+ - lib/mongoid/persistence/atomic/rename.rb
334
+ - lib/mongoid/persistence/atomic/sets.rb
335
+ - lib/mongoid/persistence/atomic/unset.rb
336
+ - lib/mongoid/persistence/atomic.rb
337
+ - lib/mongoid/persistence/deletion.rb
338
+ - lib/mongoid/persistence/insertion.rb
339
+ - lib/mongoid/persistence/modification.rb
340
+ - lib/mongoid/persistence/operations/embedded/insert.rb
341
+ - lib/mongoid/persistence/operations/embedded/remove.rb
342
+ - lib/mongoid/persistence/operations/insert.rb
343
+ - lib/mongoid/persistence/operations/remove.rb
344
+ - lib/mongoid/persistence/operations/update.rb
345
+ - lib/mongoid/persistence/operations.rb
346
+ - lib/mongoid/persistence.rb
347
+ - lib/mongoid/railtie.rb
348
+ - lib/mongoid/railties/database.rake
349
+ - lib/mongoid/railties/document.rb
350
+ - lib/mongoid/relations/accessors.rb
351
+ - lib/mongoid/relations/auto_save.rb
352
+ - lib/mongoid/relations/binding.rb
353
+ - lib/mongoid/relations/bindings/embedded/in.rb
354
+ - lib/mongoid/relations/bindings/embedded/many.rb
355
+ - lib/mongoid/relations/bindings/embedded/one.rb
356
+ - lib/mongoid/relations/bindings/referenced/in.rb
357
+ - lib/mongoid/relations/bindings/referenced/many.rb
358
+ - lib/mongoid/relations/bindings/referenced/many_to_many.rb
359
+ - lib/mongoid/relations/bindings/referenced/one.rb
360
+ - lib/mongoid/relations/bindings.rb
361
+ - lib/mongoid/relations/builder.rb
362
+ - lib/mongoid/relations/builders/embedded/in.rb
363
+ - lib/mongoid/relations/builders/embedded/many.rb
364
+ - lib/mongoid/relations/builders/embedded/one.rb
365
+ - lib/mongoid/relations/builders/nested_attributes/many.rb
366
+ - lib/mongoid/relations/builders/nested_attributes/one.rb
367
+ - lib/mongoid/relations/builders/referenced/in.rb
368
+ - lib/mongoid/relations/builders/referenced/many.rb
369
+ - lib/mongoid/relations/builders/referenced/many_to_many.rb
370
+ - lib/mongoid/relations/builders/referenced/one.rb
371
+ - lib/mongoid/relations/builders.rb
372
+ - lib/mongoid/relations/cascading/delete.rb
373
+ - lib/mongoid/relations/cascading/destroy.rb
374
+ - lib/mongoid/relations/cascading/nullify.rb
375
+ - lib/mongoid/relations/cascading/strategy.rb
376
+ - lib/mongoid/relations/cascading.rb
377
+ - lib/mongoid/relations/constraint.rb
378
+ - lib/mongoid/relations/conversions.rb
379
+ - lib/mongoid/relations/cyclic.rb
380
+ - lib/mongoid/relations/embedded/atomic/operation.rb
381
+ - lib/mongoid/relations/embedded/atomic/pull.rb
382
+ - lib/mongoid/relations/embedded/atomic/push_all.rb
383
+ - lib/mongoid/relations/embedded/atomic/set.rb
384
+ - lib/mongoid/relations/embedded/atomic/unset.rb
385
+ - lib/mongoid/relations/embedded/atomic.rb
386
+ - lib/mongoid/relations/embedded/in.rb
387
+ - lib/mongoid/relations/embedded/many.rb
388
+ - lib/mongoid/relations/embedded/one.rb
389
+ - lib/mongoid/relations/embedded/sort.rb
390
+ - lib/mongoid/relations/macros.rb
391
+ - lib/mongoid/relations/many.rb
392
+ - lib/mongoid/relations/metadata.rb
393
+ - lib/mongoid/relations/nested_builder.rb
394
+ - lib/mongoid/relations/one.rb
395
+ - lib/mongoid/relations/options.rb
396
+ - lib/mongoid/relations/polymorphic.rb
397
+ - lib/mongoid/relations/proxy.rb
398
+ - lib/mongoid/relations/referenced/batch/insert.rb
399
+ - lib/mongoid/relations/referenced/batch.rb
400
+ - lib/mongoid/relations/referenced/in.rb
401
+ - lib/mongoid/relations/referenced/many.rb
402
+ - lib/mongoid/relations/referenced/many_to_many.rb
403
+ - lib/mongoid/relations/referenced/one.rb
404
+ - lib/mongoid/relations/reflections.rb
405
+ - lib/mongoid/relations/synchronization.rb
406
+ - lib/mongoid/relations/targets/enumerable.rb
407
+ - lib/mongoid/relations/targets.rb
408
+ - lib/mongoid/relations.rb
409
+ - lib/mongoid/reloading.rb
410
+ - lib/mongoid/safety.rb
411
+ - lib/mongoid/scope.rb
412
+ - lib/mongoid/serialization.rb
413
+ - lib/mongoid/sharding.rb
414
+ - lib/mongoid/state.rb
415
+ - lib/mongoid/threaded/lifecycle.rb
416
+ - lib/mongoid/threaded.rb
417
+ - lib/mongoid/timestamps/created.rb
418
+ - lib/mongoid/timestamps/timeless.rb
419
+ - lib/mongoid/timestamps/updated.rb
420
+ - lib/mongoid/timestamps.rb
421
+ - lib/mongoid/validations/associated.rb
422
+ - lib/mongoid/validations/uniqueness.rb
423
+ - lib/mongoid/validations.rb
424
+ - lib/mongoid/version.rb
425
+ - lib/mongoid/versioning.rb
426
+ - lib/mongoid.rb
427
+ - lib/rack/mongoid/middleware/identity_map.rb
428
+ - lib/rack/mongoid.rb
429
+ - lib/rails/generators/mongoid/config/config_generator.rb
430
+ - lib/rails/generators/mongoid/config/templates/mongoid.yml
431
+ - lib/rails/generators/mongoid/model/model_generator.rb
432
+ - lib/rails/generators/mongoid/model/templates/model.rb.tt
433
+ - lib/rails/generators/mongoid/observer/observer_generator.rb
434
+ - lib/rails/generators/mongoid/observer/templates/observer.rb.tt
435
+ - lib/rails/generators/mongoid_generator.rb
436
+ - lib/rails/mongoid.rb
437
+ - CHANGELOG.md
438
+ - LICENSE
439
+ - README.md
440
+ - Rakefile
441
+ homepage: http://mongoid.org
442
+ licenses: []
443
+ post_install_message:
444
+ rdoc_options: []
445
+ require_paths:
446
+ - lib
447
+ required_ruby_version: !ruby/object:Gem::Requirement
448
+ none: false
449
+ requirements:
450
+ - - ! '>='
451
+ - !ruby/object:Gem::Version
452
+ version: '0'
453
+ required_rubygems_version: !ruby/object:Gem::Requirement
454
+ none: false
455
+ requirements:
456
+ - - ! '>='
457
+ - !ruby/object:Gem::Version
458
+ version: 1.3.6
459
+ requirements: []
460
+ rubyforge_project: mongoid
461
+ rubygems_version: 1.8.19
462
+ signing_key:
463
+ specification_version: 3
464
+ summary: Elegant Persistance in Ruby for MongoDB.
465
+ test_files: []