lib/mongo_mapper.rb in tpitale-mongo_mapper-0.6.9 vs lib/mongo_mapper.rb in tpitale-mongo_mapper-0.6.10
- old
+ new
@@ -2,11 +2,11 @@
# call me crazy but a plain old require will just get the latest version you have installed
# so i want to make sure that if you are using gems you do in fact have the correct versions
# if there is a better way to do this, please enlighten me!
if self.class.const_defined?(:Gem)
gem 'activesupport', '>= 2.3'
- gem 'mongo', '0.18.1'
+ gem 'mongo', '0.18.2'
gem 'jnunemaker-validatable', '1.8.1'
end
require 'active_support'
require 'mongo'
@@ -63,10 +63,15 @@
def self.ensured_indexes
@@ensured_indexes ||= []
end
# @api private
+ def self.ensured_indexes=(value)
+ @@ensured_indexes = value
+ end
+
+ # @api private
def self.ensure_index(klass, keys, options={})
ensured_indexes << {:klass => klass, :keys => keys, :options => options}
end
# @api public
@@ -97,11 +102,10 @@
require 'mongo_mapper/callbacks'
require 'mongo_mapper/finder_options'
require 'mongo_mapper/dirty'
require 'mongo_mapper/dynamic_finder'
require 'mongo_mapper/key'
-require 'mongo_mapper/observing'
require 'mongo_mapper/pagination'
require 'mongo_mapper/serialization'
require 'mongo_mapper/validations'
require 'mongo_mapper/rails_compatibility/document'
require 'mongo_mapper/rails_compatibility/embedded_document'
@@ -116,5 +120,7 @@
require 'mongo_mapper/associations/belongs_to_polymorphic_proxy'
require 'mongo_mapper/associations/many_polymorphic_proxy'
require 'mongo_mapper/associations/many_embedded_proxy'
require 'mongo_mapper/associations/many_embedded_polymorphic_proxy'
require 'mongo_mapper/associations/many_documents_as_proxy'
+require 'mongo_mapper/associations/one_proxy'
+require 'mongo_mapper/associations/in_array_proxy'