mongoid 3.1.7 → 4.0.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +317 -11
- data/README.md +4 -5
- data/lib/config/locales/en.yml +9 -12
- data/lib/mongoid.rb +6 -75
- data/lib/mongoid/atomic.rb +0 -11
- data/lib/mongoid/atomic/paths/embedded.rb +0 -30
- data/lib/mongoid/atomic/paths/root.rb +0 -13
- data/lib/mongoid/attributes.rb +30 -108
- data/lib/mongoid/attributes/dynamic.rb +154 -0
- data/lib/mongoid/attributes/nested.rb +82 -0
- data/lib/mongoid/attributes/processing.rb +13 -66
- data/lib/mongoid/{dirty.rb → changeable.rb} +5 -2
- data/lib/mongoid/composable.rb +104 -0
- data/lib/mongoid/config.rb +3 -9
- data/lib/mongoid/config/options.rb +1 -1
- data/lib/mongoid/contextual/aggregable/mongo.rb +5 -9
- data/lib/mongoid/contextual/atomic.rb +53 -53
- data/lib/mongoid/contextual/command.rb +26 -0
- data/lib/mongoid/contextual/map_reduce.rb +1 -1
- data/lib/mongoid/contextual/memory.rb +6 -5
- data/lib/mongoid/contextual/mongo.rb +59 -28
- data/lib/mongoid/contextual/text_search.rb +180 -0
- data/lib/mongoid/copyable.rb +2 -3
- data/lib/mongoid/criteria.rb +13 -33
- data/lib/mongoid/criteria/{#findable.rb# → findable.rb} +0 -2
- data/lib/mongoid/{criterion/inspection.rb → criteria/inspectable.rb} +2 -2
- data/lib/mongoid/{criterion → criteria}/marshalable.rb +3 -1
- data/lib/mongoid/{criterion → criteria}/modifiable.rb +1 -1
- data/lib/mongoid/{criterion/scoping.rb → criteria/scopable.rb} +2 -2
- data/lib/mongoid/document.rb +28 -12
- data/lib/mongoid/errors.rb +1 -1
- data/lib/mongoid/errors/document_not_found.rb +2 -1
- data/lib/mongoid/errors/invalid_value.rb +16 -0
- data/lib/mongoid/errors/mongoid_error.rb +1 -1
- data/lib/mongoid/extensions.rb +2 -7
- data/lib/mongoid/extensions/array.rb +2 -2
- data/lib/mongoid/extensions/boolean.rb +14 -17
- data/lib/mongoid/extensions/float.rb +1 -0
- data/lib/mongoid/extensions/hash.rb +1 -1
- data/lib/mongoid/extensions/object.rb +4 -4
- data/lib/mongoid/extensions/object_id.rb +5 -5
- data/lib/mongoid/extensions/range.rb +8 -2
- data/lib/mongoid/extensions/string.rb +5 -17
- data/lib/mongoid/extensions/time.rb +2 -2
- data/lib/mongoid/factory.rb +3 -3
- data/lib/mongoid/fields.rb +9 -8
- data/lib/mongoid/fields/foreign_key.rb +3 -3
- data/lib/mongoid/fields/standard.rb +4 -16
- data/lib/mongoid/fields/validators/macro.rb +11 -3
- data/lib/mongoid/{finders.rb → findable.rb} +6 -2
- data/lib/mongoid/{indexes.rb → indexable.rb} +50 -55
- data/lib/mongoid/indexable/specification.rb +104 -0
- data/lib/mongoid/{indexes → indexable}/validators/options.rb +2 -1
- data/lib/mongoid/{inspection.rb → inspectable.rb} +15 -11
- data/lib/mongoid/{callbacks.rb → interceptable.rb} +3 -52
- data/lib/mongoid/log_subscriber.rb +22 -0
- data/lib/mongoid/matchable.rb +152 -0
- data/lib/mongoid/{matchers → matchable}/all.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/and.rb +2 -2
- data/lib/mongoid/{matchers → matchable}/default.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/exists.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/gt.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/gte.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/in.rb +2 -2
- data/lib/mongoid/{matchers → matchable}/lt.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/lte.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/ne.rb +1 -1
- data/lib/mongoid/{matchers → matchable}/nin.rb +3 -2
- data/lib/mongoid/{matchers → matchable}/or.rb +2 -2
- data/lib/mongoid/{matchers → matchable}/size.rb +1 -1
- data/lib/mongoid/persistable.rb +212 -0
- data/lib/mongoid/persistable/creatable.rb +188 -0
- data/lib/mongoid/persistable/deletable.rb +148 -0
- data/lib/mongoid/persistable/destroyable.rb +55 -0
- data/lib/mongoid/persistable/incrementable.rb +36 -0
- data/lib/mongoid/persistable/logical.rb +38 -0
- data/lib/mongoid/persistable/poppable.rb +39 -0
- data/lib/mongoid/persistable/pullable.rb +55 -0
- data/lib/mongoid/persistable/pushable.rb +62 -0
- data/lib/mongoid/persistable/renamable.rb +35 -0
- data/lib/mongoid/persistable/savable.rb +52 -0
- data/lib/mongoid/persistable/settable.rb +33 -0
- data/lib/mongoid/persistable/unsettable.rb +36 -0
- data/lib/mongoid/persistable/updatable.rb +151 -0
- data/lib/mongoid/persistable/upsertable.rb +55 -0
- data/lib/mongoid/positional.rb +71 -0
- data/lib/mongoid/railtie.rb +32 -45
- data/lib/mongoid/railties/database.rake +12 -6
- data/lib/mongoid/relations.rb +3 -3
- data/lib/mongoid/relations/accessors.rb +13 -46
- data/lib/mongoid/relations/auto_save.rb +15 -36
- data/lib/mongoid/relations/binding.rb +0 -23
- data/lib/mongoid/relations/bindings/embedded/many.rb +1 -3
- data/lib/mongoid/relations/bindings/referenced/in.rb +3 -8
- data/lib/mongoid/relations/bindings/referenced/many_to_many.rb +3 -1
- data/lib/mongoid/relations/builder.rb +1 -1
- data/lib/mongoid/relations/builders.rb +2 -2
- data/lib/mongoid/relations/builders/nested_attributes/many.rb +10 -13
- data/lib/mongoid/relations/builders/nested_attributes/one.rb +4 -5
- data/lib/mongoid/relations/builders/referenced/in.rb +1 -1
- data/lib/mongoid/relations/builders/referenced/many.rb +1 -2
- data/lib/mongoid/relations/builders/referenced/many_to_many.rb +1 -2
- data/lib/mongoid/relations/builders/referenced/one.rb +1 -1
- data/lib/mongoid/relations/cascading.rb +3 -5
- data/lib/mongoid/relations/constraint.rb +1 -1
- data/lib/mongoid/relations/conversions.rb +1 -1
- data/lib/mongoid/relations/counter_cache.rb +39 -15
- data/lib/mongoid/relations/eager.rb +47 -0
- data/lib/mongoid/relations/eager/base.rb +57 -0
- data/lib/mongoid/relations/eager/belongs_to.rb +30 -0
- data/lib/mongoid/relations/eager/has_and_belongs_to_many.rb +40 -0
- data/lib/mongoid/relations/eager/has_many.rb +37 -0
- data/lib/mongoid/relations/eager/has_one.rb +29 -0
- data/lib/mongoid/relations/embedded/batchable.rb +3 -4
- data/lib/mongoid/relations/embedded/many.rb +7 -27
- data/lib/mongoid/relations/macros.rb +2 -4
- data/lib/mongoid/relations/many.rb +30 -31
- data/lib/mongoid/relations/metadata.rb +6 -75
- data/lib/mongoid/relations/nested_builder.rb +2 -2
- data/lib/mongoid/relations/options.rb +1 -0
- data/lib/mongoid/relations/polymorphic.rb +0 -1
- data/lib/mongoid/relations/proxy.rb +10 -32
- data/lib/mongoid/relations/referenced/in.rb +2 -18
- data/lib/mongoid/relations/referenced/many.rb +9 -22
- data/lib/mongoid/relations/referenced/many_to_many.rb +10 -33
- data/lib/mongoid/relations/referenced/one.rb +2 -21
- data/lib/mongoid/relations/synchronization.rb +3 -3
- data/lib/mongoid/relations/touchable.rb +33 -0
- data/lib/mongoid/{reloading.rb → reloadable.rb} +6 -4
- data/lib/mongoid/{scoping.rb → scopable.rb} +26 -3
- data/lib/mongoid/selectable.rb +59 -0
- data/lib/mongoid/{serialization.rb → serializable.rb} +10 -1
- data/lib/mongoid/sessions.rb +37 -345
- data/lib/mongoid/sessions/factory.rb +2 -0
- data/lib/mongoid/sessions/options.rb +176 -0
- data/lib/mongoid/sessions/storage_options.rb +140 -0
- data/lib/mongoid/sessions/thread_options.rb +19 -0
- data/lib/mongoid/sessions/validators/storage.rb +15 -1
- data/lib/mongoid/{sharding.rb → shardable.rb} +5 -1
- data/lib/mongoid/support/query_counter.rb +23 -0
- data/lib/mongoid/threaded.rb +0 -110
- data/lib/mongoid/threaded/lifecycle.rb +0 -28
- data/lib/mongoid/timestamps/updated/short.rb +2 -2
- data/lib/mongoid/{hierarchy.rb → traversable.rb} +9 -5
- data/lib/mongoid/{validations.rb → validatable.rb} +23 -9
- data/lib/mongoid/{validations → validatable}/associated.rb +3 -1
- data/lib/mongoid/{validations → validatable}/format.rb +1 -1
- data/lib/mongoid/{validations → validatable}/length.rb +1 -1
- data/lib/mongoid/{validations → validatable}/localizable.rb +1 -1
- data/lib/mongoid/{validations → validatable}/macros.rb +4 -3
- data/lib/mongoid/{validations → validatable}/presence.rb +1 -1
- data/lib/mongoid/{validations → validatable}/queryable.rb +1 -2
- data/lib/mongoid/{validations → validatable}/uniqueness.rb +3 -3
- data/lib/mongoid/version.rb +1 -1
- data/lib/rails/generators/mongoid/config/templates/mongoid.yml +9 -13
- data/lib/rails/generators/mongoid/model/model_generator.rb +0 -1
- data/lib/rails/generators/mongoid/model/templates/model.rb.tt +0 -3
- data/lib/rails/generators/mongoid_generator.rb +3 -40
- data/lib/rails/mongoid.rb +59 -57
- data/lib/support/ruby_version.rb +1 -1
- data/spec/app/models/account.rb +2 -6
- data/spec/app/models/acolyte.rb +1 -0
- data/spec/app/models/actor.rb +0 -1
- data/spec/app/models/address.rb +6 -1
- data/spec/app/models/animal.rb +1 -1
- data/spec/app/models/appointment.rb +2 -2
- data/spec/app/models/article.rb +1 -4
- data/spec/app/models/audio.rb +5 -0
- data/spec/app/models/author.rb +0 -2
- data/spec/app/models/band.rb +3 -2
- data/spec/app/models/bar.rb +1 -0
- data/spec/app/models/book.rb +1 -0
- data/spec/app/models/building.rb +0 -2
- data/spec/app/models/building_address.rb +0 -2
- data/spec/app/models/bus.rb +1 -1
- data/spec/app/models/canvas.rb +1 -1
- data/spec/app/models/contractor.rb +0 -2
- data/spec/app/models/country_code.rb +1 -1
- data/spec/app/models/definition.rb +2 -2
- data/spec/app/models/dragon.rb +4 -0
- data/spec/app/models/drug.rb +1 -3
- data/spec/app/models/dungeon.rb +4 -0
- data/spec/app/models/filesystem.rb +1 -0
- data/spec/app/models/fish.rb +0 -1
- data/spec/app/models/fruits.rb +6 -0
- data/spec/app/models/game.rb +0 -2
- data/spec/app/models/house.rb +0 -2
- data/spec/app/models/item.rb +1 -5
- data/spec/app/models/jar.rb +1 -1
- data/spec/app/models/label.rb +4 -4
- data/spec/app/models/login.rb +1 -1
- data/spec/app/models/movie.rb +1 -0
- data/spec/app/models/name.rb +3 -3
- data/spec/app/models/note.rb +1 -1
- data/spec/app/models/oscar.rb +1 -1
- data/spec/app/models/parent_doc.rb +1 -1
- data/spec/app/models/person.rb +13 -8
- data/spec/app/models/phone.rb +1 -3
- data/spec/app/models/player.rb +1 -1
- data/spec/app/models/post.rb +2 -1
- data/spec/app/models/quiz.rb +0 -3
- data/spec/app/models/record.rb +5 -5
- data/spec/app/models/registry.rb +1 -1
- data/spec/app/models/server.rb +1 -1
- data/spec/app/models/service.rb +3 -3
- data/spec/app/models/sound.rb +5 -0
- data/spec/app/models/template.rb +1 -1
- data/spec/app/models/title.rb +0 -1
- data/spec/app/models/track.rb +5 -5
- data/spec/app/models/tree.rb +1 -1
- data/spec/app/models/video.rb +0 -4
- data/spec/app/models/wiki_page.rb +1 -4
- data/spec/app/models/word.rb +3 -0
- data/spec/app/models/word_origin.rb +1 -1
- data/spec/config/mongoid.yml +7 -8
- data/spec/helpers.rb +18 -0
- data/spec/mongoid/atomic/modifiers_spec.rb +22 -22
- data/spec/mongoid/atomic/paths/embedded/many_spec.rb +8 -49
- data/spec/mongoid/atomic/paths/embedded/one_spec.rb +7 -49
- data/spec/mongoid/atomic/paths/root_spec.rb +3 -61
- data/spec/mongoid/atomic/paths_spec.rb +19 -19
- data/spec/mongoid/atomic_spec.rb +19 -19
- data/spec/mongoid/{nested_attributes_spec.rb → attributes/nested_spec.rb} +335 -448
- data/spec/mongoid/attributes/readonly_spec.rb +16 -16
- data/spec/mongoid/attributes_spec.rb +188 -434
- data/spec/mongoid/{dirty_spec.rb → changeable_spec.rb} +117 -148
- data/spec/mongoid/{components_spec.rb → composable_spec.rb} +3 -3
- data/spec/mongoid/config/environment_spec.rb +3 -3
- data/spec/mongoid/config/options_spec.rb +6 -6
- data/spec/mongoid/config_spec.rb +24 -48
- data/spec/mongoid/contextual/aggregable/memory_spec.rb +12 -12
- data/spec/mongoid/contextual/aggregable/mongo_spec.rb +46 -38
- data/spec/mongoid/contextual/atomic_spec.rb +60 -56
- data/spec/mongoid/contextual/find_and_modify_spec.rb +14 -14
- data/spec/mongoid/contextual/geo_near_spec.rb +22 -22
- data/spec/mongoid/contextual/map_reduce_spec.rb +27 -27
- data/spec/mongoid/contextual/memory_spec.rb +94 -94
- data/spec/mongoid/contextual/mongo_spec.rb +225 -139
- data/spec/mongoid/contextual/text_search_spec.rb +207 -0
- data/spec/mongoid/copyable_spec.rb +56 -68
- data/spec/mongoid/criteria/findable_spec.rb +991 -0
- data/spec/mongoid/{criterion/inspection_spec.rb → criteria/inspectable_spec.rb} +5 -5
- data/spec/mongoid/{criterion → criteria}/marshalable_spec.rb +2 -2
- data/spec/mongoid/criteria/modifiable_spec.rb +1063 -0
- data/spec/mongoid/{criterion/scoping_spec.rb → criteria/scopable_spec.rb} +31 -31
- data/spec/mongoid/criteria_spec.rb +530 -2207
- data/spec/mongoid/document_spec.rb +166 -120
- data/spec/mongoid/equality_spec.rb +22 -22
- data/spec/mongoid/errors/ambiguous_relationship_spec.rb +3 -3
- data/spec/mongoid/errors/callback_spec.rb +3 -3
- data/spec/mongoid/errors/delete_restriction_spec.rb +3 -3
- data/spec/mongoid/errors/document_not_found_spec.rb +11 -11
- data/spec/mongoid/errors/eager_load_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_collection_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_config_option_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_field_option_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_field_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_find_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_includes_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_index_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_options_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_path_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_scope_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_storage_options_spec.rb +3 -3
- data/spec/mongoid/errors/invalid_time_spec.rb +3 -3
- data/spec/mongoid/errors/inverse_not_found_spec.rb +3 -3
- data/spec/mongoid/errors/mixed_relations_spec.rb +3 -3
- data/spec/mongoid/errors/mixed_session_configuration_spec.rb +3 -3
- data/spec/mongoid/errors/mongoid_error_spec.rb +7 -7
- data/spec/mongoid/errors/nested_attributes_metadata_not_found_spec.rb +3 -3
- data/spec/mongoid/errors/no_environment_spec.rb +3 -3
- data/spec/mongoid/errors/no_map_reduce_output_spec.rb +3 -3
- data/spec/mongoid/errors/no_metadata_spec.rb +3 -3
- data/spec/mongoid/errors/no_parent_spec.rb +3 -3
- data/spec/mongoid/errors/no_session_config_spec.rb +3 -3
- data/spec/mongoid/errors/no_session_database_spec.rb +3 -3
- data/spec/mongoid/errors/no_session_hosts_spec.rb +3 -3
- data/spec/mongoid/errors/no_sessions_config_spec.rb +3 -3
- data/spec/mongoid/errors/readonly_attribute_spec.rb +3 -3
- data/spec/mongoid/errors/scope_overwrite_spec.rb +3 -3
- data/spec/mongoid/errors/too_many_nested_attribute_records_spec.rb +3 -3
- data/spec/mongoid/errors/unknown_attribute_spec.rb +5 -5
- data/spec/mongoid/errors/unsaved_document_spec.rb +3 -3
- data/spec/mongoid/errors/unsupported_javascript_spec.rb +3 -3
- data/spec/mongoid/errors/validations_spec.rb +7 -7
- data/spec/mongoid/extensions/array_spec.rb +61 -61
- data/spec/mongoid/extensions/big_decimal_spec.rb +11 -11
- data/spec/mongoid/extensions/binary_spec.rb +12 -12
- data/spec/mongoid/extensions/boolean_spec.rb +18 -18
- data/spec/mongoid/extensions/date_spec.rb +13 -13
- data/spec/mongoid/extensions/date_time_spec.rb +9 -9
- data/spec/mongoid/extensions/false_class_spec.rb +5 -5
- data/spec/mongoid/extensions/float_spec.rb +29 -15
- data/spec/mongoid/extensions/hash_spec.rb +29 -29
- data/spec/mongoid/extensions/integer_spec.rb +15 -15
- data/spec/mongoid/extensions/module_spec.rb +2 -2
- data/spec/mongoid/extensions/nil_class_spec.rb +1 -1
- data/spec/mongoid/extensions/object_id_spec.rb +134 -134
- data/spec/mongoid/extensions/object_spec.rb +26 -26
- data/spec/mongoid/extensions/range_spec.rb +61 -12
- data/spec/mongoid/extensions/regexp_spec.rb +4 -4
- data/spec/mongoid/extensions/set_spec.rb +4 -4
- data/spec/mongoid/extensions/string_spec.rb +35 -46
- data/spec/mongoid/extensions/symbol_spec.rb +9 -9
- data/spec/mongoid/extensions/time_spec.rb +49 -49
- data/spec/mongoid/extensions/time_with_zone_spec.rb +34 -34
- data/spec/mongoid/extensions/true_class_spec.rb +5 -5
- data/spec/mongoid/extensions_spec.rb +15 -0
- data/spec/mongoid/factory_spec.rb +15 -15
- data/spec/mongoid/fields/foreign_key_spec.rb +73 -66
- data/spec/mongoid/fields/internal/foreign_keys/array_spec.rb +15 -15
- data/spec/mongoid/fields/internal/foreign_keys/object_spec.rb +22 -22
- data/spec/mongoid/fields/localized_spec.rb +23 -23
- data/spec/mongoid/fields/standard_spec.rb +12 -12
- data/spec/mongoid/fields_spec.rb +168 -209
- data/spec/mongoid/{finders_spec.rb → findable_spec.rb} +62 -27
- data/spec/mongoid/indexable/specification_spec.rb +102 -0
- data/spec/mongoid/{indexes_spec.rb → indexable_spec.rb} +171 -51
- data/spec/mongoid/{inspection_spec.rb → inspectable_spec.rb} +6 -14
- data/spec/mongoid/{callbacks_spec.rb → interceptable_spec.rb} +105 -105
- data/spec/mongoid/log_subscriber_spec.rb +74 -0
- data/spec/mongoid/loggable_spec.rb +1 -1
- data/spec/mongoid/{matchers → matchable}/all_spec.rb +4 -4
- data/spec/mongoid/{matchers → matchable}/and_spec.rb +11 -11
- data/spec/mongoid/{matchers → matchable}/default_spec.rb +15 -15
- data/spec/mongoid/{matchers → matchable}/exists_spec.rb +5 -5
- data/spec/mongoid/{matchers → matchable}/gt_spec.rb +9 -8
- data/spec/mongoid/{matchers → matchable}/gte_spec.rb +7 -7
- data/spec/mongoid/matchable/in_spec.rb +49 -0
- data/spec/mongoid/{matchers → matchable}/lt_spec.rb +7 -7
- data/spec/mongoid/{matchers → matchable}/lte_spec.rb +7 -7
- data/spec/mongoid/{matchers → matchable}/ne_spec.rb +3 -3
- data/spec/mongoid/matchable/nin_spec.rb +48 -0
- data/spec/mongoid/{matchers → matchable}/or_spec.rb +6 -6
- data/spec/mongoid/{matchers → matchable}/size_spec.rb +3 -3
- data/spec/mongoid/{matchers_spec.rb → matchable_spec.rb} +41 -41
- data/spec/mongoid/persistable/creatable_spec.rb +512 -0
- data/spec/mongoid/persistable/deletable_spec.rb +205 -0
- data/spec/mongoid/persistable/destroyable_spec.rb +148 -0
- data/spec/mongoid/persistable/incrementable_spec.rb +173 -0
- data/spec/mongoid/persistable/logical_spec.rb +143 -0
- data/spec/mongoid/persistable/poppable_spec.rb +115 -0
- data/spec/mongoid/persistable/pullable_spec.rb +228 -0
- data/spec/mongoid/persistable/pushable_spec.rb +258 -0
- data/spec/mongoid/persistable/renamable_spec.rb +135 -0
- data/spec/mongoid/persistable/savable_spec.rb +432 -0
- data/spec/mongoid/persistable/settable_spec.rb +139 -0
- data/spec/mongoid/persistable/unsettable_spec.rb +155 -0
- data/spec/mongoid/persistable/updatable_spec.rb +558 -0
- data/spec/mongoid/persistable/upsertable_spec.rb +106 -0
- data/spec/mongoid/persistable_spec.rb +206 -0
- data/spec/mongoid/{atomic/positionable_spec.rb → positional_spec.rb} +19 -14
- data/spec/mongoid/railties/document_spec.rb +2 -2
- data/spec/mongoid/relations/accessors_spec.rb +53 -145
- data/spec/mongoid/relations/auto_save_spec.rb +36 -16
- data/spec/mongoid/relations/bindings/embedded/in_spec.rb +6 -6
- data/spec/mongoid/relations/bindings/embedded/many_spec.rb +2 -2
- data/spec/mongoid/relations/bindings/embedded/one_spec.rb +3 -3
- data/spec/mongoid/relations/bindings/referenced/in_spec.rb +12 -12
- data/spec/mongoid/relations/bindings/referenced/many_spec.rb +6 -6
- data/spec/mongoid/relations/bindings/referenced/many_to_many_spec.rb +9 -9
- data/spec/mongoid/relations/bindings/referenced/one_spec.rb +6 -6
- data/spec/mongoid/relations/builders/embedded/in_spec.rb +4 -4
- data/spec/mongoid/relations/builders/embedded/many_spec.rb +18 -18
- data/spec/mongoid/relations/builders/embedded/one_spec.rb +11 -11
- data/spec/mongoid/relations/builders/nested_attributes/many_spec.rb +12 -13
- data/spec/mongoid/relations/builders/nested_attributes/one_spec.rb +14 -14
- data/spec/mongoid/relations/builders/referenced/in_spec.rb +22 -33
- data/spec/mongoid/relations/builders/referenced/many_spec.rb +15 -15
- data/spec/mongoid/relations/builders/referenced/many_to_many_spec.rb +18 -18
- data/spec/mongoid/relations/builders/referenced/one_spec.rb +11 -24
- data/spec/mongoid/relations/builders_spec.rb +21 -21
- data/spec/mongoid/relations/cascading/delete_spec.rb +7 -7
- data/spec/mongoid/relations/cascading/destroy_spec.rb +2 -2
- data/spec/mongoid/relations/cascading/nullify_spec.rb +2 -2
- data/spec/mongoid/relations/cascading/restrict_spec.rb +3 -3
- data/spec/mongoid/relations/cascading_spec.rb +16 -16
- data/spec/mongoid/relations/constraint_spec.rb +8 -7
- data/spec/mongoid/relations/conversions_spec.rb +16 -14
- data/spec/mongoid/relations/counter_cache_spec.rb +85 -0
- data/spec/mongoid/relations/cyclic_spec.rb +18 -18
- data/spec/mongoid/relations/eager/belongs_to_spec.rb +154 -0
- data/spec/mongoid/relations/eager/has_and_belongs_to_many_spec.rb +143 -0
- data/spec/mongoid/relations/eager/has_many_spec.rb +207 -0
- data/spec/mongoid/relations/eager/has_one_spec.rb +163 -0
- data/spec/mongoid/relations/eager_spec.rb +228 -0
- data/spec/mongoid/relations/embedded/dirty_spec.rb +8 -8
- data/spec/mongoid/relations/embedded/in_spec.rb +55 -56
- data/spec/mongoid/relations/embedded/many_spec.rb +357 -367
- data/spec/mongoid/relations/embedded/one_spec.rb +98 -139
- data/spec/mongoid/relations/macros_spec.rb +108 -102
- data/spec/mongoid/relations/metadata_spec.rb +147 -241
- data/spec/mongoid/relations/options_spec.rb +1 -1
- data/spec/mongoid/relations/polymorphic_spec.rb +13 -17
- data/spec/mongoid/relations/proxy_spec.rb +2 -2
- data/spec/mongoid/relations/referenced/in_spec.rb +128 -303
- data/spec/mongoid/relations/referenced/many_spec.rb +379 -522
- data/spec/mongoid/relations/referenced/many_to_many_spec.rb +345 -417
- data/spec/mongoid/relations/referenced/one_spec.rb +148 -263
- data/spec/mongoid/relations/reflections_spec.rb +6 -6
- data/spec/mongoid/relations/synchronization_spec.rb +46 -50
- data/spec/mongoid/relations/targets/enumerable_spec.rb +116 -116
- data/spec/mongoid/relations/touchable_spec.rb +296 -0
- data/spec/mongoid/relations_spec.rb +16 -15
- data/spec/mongoid/{reloading_spec.rb → reloadable_spec.rb} +20 -60
- data/spec/mongoid/{scoping_spec.rb → scopable_spec.rb} +74 -126
- data/spec/mongoid/selectable_spec.rb +134 -0
- data/spec/mongoid/{serialization_spec.rb → serializable_spec.rb} +111 -82
- data/spec/mongoid/sessions/factory_spec.rb +49 -28
- data/spec/mongoid/sessions/mongo_uri_spec.rb +7 -7
- data/spec/mongoid/sessions/options_spec.rb +92 -0
- data/spec/mongoid/sessions_spec.rb +288 -177
- data/spec/mongoid/{sharding_spec.rb → shardable_spec.rb} +8 -8
- data/spec/mongoid/state_spec.rb +10 -10
- data/spec/mongoid/threaded_spec.rb +17 -70
- data/spec/mongoid/timestamps/created/short_spec.rb +6 -6
- data/spec/mongoid/timestamps/created_spec.rb +5 -5
- data/spec/mongoid/timestamps/updated/short_spec.rb +10 -10
- data/spec/mongoid/timestamps/updated_spec.rb +8 -12
- data/spec/mongoid/timestamps_spec.rb +7 -11
- data/spec/mongoid/{hierarchy_spec.rb → traversable_spec.rb} +19 -19
- data/spec/mongoid/{validations → validatable}/associated_spec.rb +18 -18
- data/spec/mongoid/{validations → validatable}/format_spec.rb +6 -6
- data/spec/mongoid/{validations → validatable}/length_spec.rb +7 -7
- data/spec/mongoid/{validations → validatable}/numericality_spec.rb +1 -1
- data/spec/mongoid/{validations → validatable}/presence_spec.rb +31 -38
- data/spec/mongoid/{validations → validatable}/uniqueness_spec.rb +126 -183
- data/spec/mongoid/{validations_spec.rb → validatable_spec.rb} +28 -28
- data/spec/mongoid_spec.rb +8 -8
- data/spec/rails/mongoid_spec.rb +72 -87
- data/spec/spec_helper.rb +19 -17
- metadata +261 -283
- data/lib/mongoid/atomic/positionable.rb +0 -73
- data/lib/mongoid/components.rb +0 -92
- data/lib/mongoid/config/inflections.rb +0 -6
- data/lib/mongoid/contextual/eager.rb +0 -158
- data/lib/mongoid/criterion/findable.rb +0 -179
- data/lib/mongoid/errors/versioning_not_on_root.rb +0 -23
- data/lib/mongoid/identity_map.rb +0 -163
- data/lib/mongoid/json.rb +0 -16
- data/lib/mongoid/matchers.rb +0 -32
- data/lib/mongoid/matchers/strategies.rb +0 -97
- data/lib/mongoid/multi_parameter_attributes.rb +0 -105
- data/lib/mongoid/nested_attributes.rb +0 -78
- data/lib/mongoid/observer.rb +0 -192
- data/lib/mongoid/paranoia.rb +0 -136
- data/lib/mongoid/persistence.rb +0 -357
- data/lib/mongoid/persistence/atomic.rb +0 -231
- data/lib/mongoid/persistence/atomic/add_to_set.rb +0 -47
- data/lib/mongoid/persistence/atomic/bit.rb +0 -35
- data/lib/mongoid/persistence/atomic/inc.rb +0 -45
- data/lib/mongoid/persistence/atomic/operation.rb +0 -154
- data/lib/mongoid/persistence/atomic/pop.rb +0 -32
- data/lib/mongoid/persistence/atomic/pull.rb +0 -32
- data/lib/mongoid/persistence/atomic/pull_all.rb +0 -32
- data/lib/mongoid/persistence/atomic/push.rb +0 -25
- data/lib/mongoid/persistence/atomic/push_all.rb +0 -25
- data/lib/mongoid/persistence/atomic/rename.rb +0 -30
- data/lib/mongoid/persistence/atomic/sets.rb +0 -28
- data/lib/mongoid/persistence/atomic/unset.rb +0 -27
- data/lib/mongoid/persistence/deletion.rb +0 -31
- data/lib/mongoid/persistence/insertion.rb +0 -38
- data/lib/mongoid/persistence/modification.rb +0 -35
- data/lib/mongoid/persistence/operations.rb +0 -214
- data/lib/mongoid/persistence/operations/embedded/insert.rb +0 -46
- data/lib/mongoid/persistence/operations/embedded/remove.rb +0 -43
- data/lib/mongoid/persistence/operations/insert.rb +0 -34
- data/lib/mongoid/persistence/operations/remove.rb +0 -33
- data/lib/mongoid/persistence/operations/update.rb +0 -59
- data/lib/mongoid/persistence/operations/upsert.rb +0 -28
- data/lib/mongoid/persistence/upsertion.rb +0 -31
- data/lib/mongoid/unit_of_work.rb +0 -61
- data/lib/mongoid/versioning.rb +0 -217
- data/lib/rack/mongoid.rb +0 -2
- data/lib/rack/mongoid/middleware/identity_map.rb +0 -39
- data/lib/rails/generators/mongoid/observer/observer_generator.rb +0 -17
- data/lib/rails/generators/mongoid/observer/templates/observer.rb.tt +0 -4
- data/spec/app/models/actor_observer.rb +0 -15
- data/spec/app/models/callback_recorder.rb +0 -25
- data/spec/app/models/draft.rb +0 -9
- data/spec/app/models/paranoid_phone.rb +0 -25
- data/spec/app/models/paranoid_post.rb +0 -36
- data/spec/app/models/phone_observer.rb +0 -6
- data/spec/mongoid/#atomic_spec.rb# +0 -365
- data/spec/mongoid/attributes/processing_spec.rb +0 -149
- data/spec/mongoid/criterion/destructive_spec.rb +0 -101
- data/spec/mongoid/criterion/modifiable_spec.rb +0 -409
- data/spec/mongoid/criterion/modification_spec.rb +0 -402
- data/spec/mongoid/errors/versioning_not_on_root_spec.rb +0 -29
- data/spec/mongoid/identity_map_spec.rb +0 -564
- data/spec/mongoid/json_spec.rb +0 -33
- data/spec/mongoid/matchers/in_spec.rb +0 -25
- data/spec/mongoid/matchers/nin_spec.rb +0 -25
- data/spec/mongoid/multi_parameter_attributes_spec.rb +0 -128
- data/spec/mongoid/observer_spec.rb +0 -290
- data/spec/mongoid/paranoia_spec.rb +0 -759
- data/spec/mongoid/persistence/atomic/add_to_set_spec.rb +0 -262
- data/spec/mongoid/persistence/atomic/bit_spec.rb +0 -88
- data/spec/mongoid/persistence/atomic/inc_spec.rb +0 -133
- data/spec/mongoid/persistence/atomic/pop_spec.rb +0 -111
- data/spec/mongoid/persistence/atomic/pull_all_spec.rb +0 -77
- data/spec/mongoid/persistence/atomic/pull_spec.rb +0 -80
- data/spec/mongoid/persistence/atomic/push_all_spec.rb +0 -77
- data/spec/mongoid/persistence/atomic/push_spec.rb +0 -77
- data/spec/mongoid/persistence/atomic/rename_spec.rb +0 -42
- data/spec/mongoid/persistence/atomic/sets_spec.rb +0 -154
- data/spec/mongoid/persistence/atomic/unset_spec.rb +0 -65
- data/spec/mongoid/persistence/atomic_spec.rb +0 -216
- data/spec/mongoid/persistence/operations/embedded/insert_spec.rb +0 -191
- data/spec/mongoid/persistence/operations/embedded/remove_spec.rb +0 -8
- data/spec/mongoid/persistence/operations/insert_spec.rb +0 -149
- data/spec/mongoid/persistence/operations/remove_spec.rb +0 -113
- data/spec/mongoid/persistence/operations/update_spec.rb +0 -141
- data/spec/mongoid/persistence/operations/upsert_spec.rb +0 -59
- data/spec/mongoid/persistence/operations_spec.rb +0 -313
- data/spec/mongoid/persistence_spec.rb +0 -2279
- data/spec/mongoid/unit_of_work_spec.rb +0 -196
- data/spec/mongoid/versioning_spec.rb +0 -540
- data/spec/rack/mongoid/middleware/identity_map_spec.rb +0 -72
data/spec/spec_helper.rb
CHANGED
@@ -4,8 +4,16 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
|
4
4
|
MODELS = File.join(File.dirname(__FILE__), "app/models")
|
5
5
|
$LOAD_PATH.unshift(MODELS)
|
6
6
|
|
7
|
+
if ENV["CI"]
|
8
|
+
require "coveralls"
|
9
|
+
Coveralls.wear! do
|
10
|
+
add_filter "spec"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
7
14
|
require "mongoid"
|
8
15
|
require "rspec"
|
16
|
+
require "helpers"
|
9
17
|
|
10
18
|
# These environment variables can be set if wanting to test against a database
|
11
19
|
# that is not on the local machine.
|
@@ -45,9 +53,12 @@ def mongohq_connectable?
|
|
45
53
|
ENV["MONGOHQ_REPL_PASS"].present?
|
46
54
|
end
|
47
55
|
|
48
|
-
def
|
56
|
+
def purge_database_alt!
|
49
57
|
session = Mongoid::Sessions.default
|
50
|
-
session.
|
58
|
+
session.use(database_id_alt)
|
59
|
+
session.collections.each do |collection|
|
60
|
+
collection.drop
|
61
|
+
end
|
51
62
|
end
|
52
63
|
|
53
64
|
# Set the database that the spec suite connects to.
|
@@ -71,20 +82,17 @@ module MyApp
|
|
71
82
|
end
|
72
83
|
end
|
73
84
|
|
85
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
86
|
+
inflect.irregular("canvas", "canvases")
|
87
|
+
inflect.singular("address_components", "address_component")
|
88
|
+
end
|
89
|
+
|
74
90
|
RSpec.configure do |config|
|
91
|
+
config.include Mongoid::SpecHelpers
|
75
92
|
|
76
93
|
# Drop all collections and clear the identity map before each spec.
|
77
94
|
config.before(:each) do
|
78
95
|
Mongoid.purge!
|
79
|
-
Mongoid::IdentityMap.clear
|
80
|
-
end
|
81
|
-
|
82
|
-
# On travis we are creating many different databases on each test run. We
|
83
|
-
# drop the database after the suite.
|
84
|
-
config.after(:suite) do
|
85
|
-
if ENV["CI"]
|
86
|
-
Mongoid::Threaded.sessions[:default].drop
|
87
|
-
end
|
88
96
|
end
|
89
97
|
|
90
98
|
# Filter out MongoHQ specs if we can't connect to it.
|
@@ -92,9 +100,3 @@ RSpec.configure do |config|
|
|
92
100
|
return true if value == :mongohq && !mongohq_connectable?
|
93
101
|
})
|
94
102
|
end
|
95
|
-
|
96
|
-
ActiveSupport::Inflector.inflections do |inflect|
|
97
|
-
inflect.singular("address_components", "address_component")
|
98
|
-
end
|
99
|
-
|
100
|
-
I18n.enforce_available_locales = false
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.alpha1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Durran Jordan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2013-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tzinfo
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.37
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.37
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: moped
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.0.beta4
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.0.beta4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: origin
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.0'
|
69
69
|
description: Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written
|
@@ -74,56 +74,48 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- CHANGELOG.md
|
78
|
-
- LICENSE
|
79
|
-
- README.md
|
80
|
-
- Rakefile
|
81
77
|
- lib/config/locales/en.yml
|
82
|
-
- lib/mongoid.rb
|
83
|
-
- lib/mongoid/atomic.rb
|
84
78
|
- lib/mongoid/atomic/modifiers.rb
|
85
|
-
- lib/mongoid/atomic/paths.rb
|
86
|
-
- lib/mongoid/atomic/paths/embedded.rb
|
87
79
|
- lib/mongoid/atomic/paths/embedded/many.rb
|
88
80
|
- lib/mongoid/atomic/paths/embedded/one.rb
|
81
|
+
- lib/mongoid/atomic/paths/embedded.rb
|
89
82
|
- lib/mongoid/atomic/paths/root.rb
|
90
|
-
- lib/mongoid/atomic/
|
91
|
-
- lib/mongoid/
|
83
|
+
- lib/mongoid/atomic/paths.rb
|
84
|
+
- lib/mongoid/atomic.rb
|
85
|
+
- lib/mongoid/attributes/dynamic.rb
|
86
|
+
- lib/mongoid/attributes/nested.rb
|
92
87
|
- lib/mongoid/attributes/processing.rb
|
93
88
|
- lib/mongoid/attributes/readonly.rb
|
94
|
-
- lib/mongoid/
|
95
|
-
- lib/mongoid/
|
96
|
-
- lib/mongoid/
|
89
|
+
- lib/mongoid/attributes.rb
|
90
|
+
- lib/mongoid/changeable.rb
|
91
|
+
- lib/mongoid/composable.rb
|
97
92
|
- lib/mongoid/config/environment.rb
|
98
|
-
- lib/mongoid/config/inflections.rb
|
99
93
|
- lib/mongoid/config/options.rb
|
100
|
-
- lib/mongoid/config/validators.rb
|
101
94
|
- lib/mongoid/config/validators/option.rb
|
102
95
|
- lib/mongoid/config/validators/session.rb
|
103
|
-
- lib/mongoid/
|
96
|
+
- lib/mongoid/config/validators.rb
|
97
|
+
- lib/mongoid/config.rb
|
104
98
|
- lib/mongoid/contextual/aggregable/memory.rb
|
105
99
|
- lib/mongoid/contextual/aggregable/mongo.rb
|
106
100
|
- lib/mongoid/contextual/atomic.rb
|
107
101
|
- lib/mongoid/contextual/command.rb
|
108
|
-
- lib/mongoid/contextual/eager.rb
|
109
102
|
- lib/mongoid/contextual/find_and_modify.rb
|
110
103
|
- lib/mongoid/contextual/geo_near.rb
|
111
104
|
- lib/mongoid/contextual/map_reduce.rb
|
112
105
|
- lib/mongoid/contextual/memory.rb
|
113
106
|
- lib/mongoid/contextual/mongo.rb
|
114
107
|
- lib/mongoid/contextual/queryable.rb
|
108
|
+
- lib/mongoid/contextual/text_search.rb
|
109
|
+
- lib/mongoid/contextual.rb
|
115
110
|
- lib/mongoid/copyable.rb
|
111
|
+
- lib/mongoid/criteria/findable.rb
|
112
|
+
- lib/mongoid/criteria/inspectable.rb
|
113
|
+
- lib/mongoid/criteria/marshalable.rb
|
114
|
+
- lib/mongoid/criteria/modifiable.rb
|
115
|
+
- lib/mongoid/criteria/scopable.rb
|
116
116
|
- lib/mongoid/criteria.rb
|
117
|
-
- lib/mongoid/criteria/#findable.rb#
|
118
|
-
- lib/mongoid/criterion/findable.rb
|
119
|
-
- lib/mongoid/criterion/inspection.rb
|
120
|
-
- lib/mongoid/criterion/marshalable.rb
|
121
|
-
- lib/mongoid/criterion/modifiable.rb
|
122
|
-
- lib/mongoid/criterion/scoping.rb
|
123
|
-
- lib/mongoid/dirty.rb
|
124
117
|
- lib/mongoid/document.rb
|
125
118
|
- lib/mongoid/equality.rb
|
126
|
-
- lib/mongoid/errors.rb
|
127
119
|
- lib/mongoid/errors/ambiguous_relationship.rb
|
128
120
|
- lib/mongoid/errors/callback.rb
|
129
121
|
- lib/mongoid/errors/delete_restriction.rb
|
@@ -142,6 +134,7 @@ files:
|
|
142
134
|
- lib/mongoid/errors/invalid_set_polymorphic_relation.rb
|
143
135
|
- lib/mongoid/errors/invalid_storage_options.rb
|
144
136
|
- lib/mongoid/errors/invalid_time.rb
|
137
|
+
- lib/mongoid/errors/invalid_value.rb
|
145
138
|
- lib/mongoid/errors/inverse_not_found.rb
|
146
139
|
- lib/mongoid/errors/mixed_relations.rb
|
147
140
|
- lib/mongoid/errors/mixed_session_configuration.rb
|
@@ -163,9 +156,8 @@ files:
|
|
163
156
|
- lib/mongoid/errors/unsaved_document.rb
|
164
157
|
- lib/mongoid/errors/unsupported_javascript.rb
|
165
158
|
- lib/mongoid/errors/validations.rb
|
166
|
-
- lib/mongoid/errors
|
159
|
+
- lib/mongoid/errors.rb
|
167
160
|
- lib/mongoid/evolvable.rb
|
168
|
-
- lib/mongoid/extensions.rb
|
169
161
|
- lib/mongoid/extensions/array.rb
|
170
162
|
- lib/mongoid/extensions/big_decimal.rb
|
171
163
|
- lib/mongoid/extensions/boolean.rb
|
@@ -187,73 +179,58 @@ files:
|
|
187
179
|
- lib/mongoid/extensions/time.rb
|
188
180
|
- lib/mongoid/extensions/time_with_zone.rb
|
189
181
|
- lib/mongoid/extensions/true_class.rb
|
182
|
+
- lib/mongoid/extensions.rb
|
190
183
|
- lib/mongoid/factory.rb
|
191
|
-
- lib/mongoid/fields.rb
|
192
184
|
- lib/mongoid/fields/foreign_key.rb
|
193
185
|
- lib/mongoid/fields/localized.rb
|
194
186
|
- lib/mongoid/fields/standard.rb
|
195
|
-
- lib/mongoid/fields/validators.rb
|
196
187
|
- lib/mongoid/fields/validators/macro.rb
|
197
|
-
- lib/mongoid/
|
198
|
-
- lib/mongoid/
|
199
|
-
- lib/mongoid/
|
200
|
-
- lib/mongoid/
|
201
|
-
- lib/mongoid/
|
202
|
-
- lib/mongoid/
|
203
|
-
- lib/mongoid/
|
188
|
+
- lib/mongoid/fields/validators.rb
|
189
|
+
- lib/mongoid/fields.rb
|
190
|
+
- lib/mongoid/findable.rb
|
191
|
+
- lib/mongoid/indexable/specification.rb
|
192
|
+
- lib/mongoid/indexable/validators/options.rb
|
193
|
+
- lib/mongoid/indexable.rb
|
194
|
+
- lib/mongoid/inspectable.rb
|
195
|
+
- lib/mongoid/interceptable.rb
|
196
|
+
- lib/mongoid/log_subscriber.rb
|
204
197
|
- lib/mongoid/loggable.rb
|
205
|
-
- lib/mongoid/
|
206
|
-
- lib/mongoid/
|
207
|
-
- lib/mongoid/
|
208
|
-
- lib/mongoid/
|
209
|
-
- lib/mongoid/
|
210
|
-
- lib/mongoid/
|
211
|
-
- lib/mongoid/
|
212
|
-
- lib/mongoid/
|
213
|
-
- lib/mongoid/
|
214
|
-
- lib/mongoid/
|
215
|
-
- lib/mongoid/
|
216
|
-
- lib/mongoid/
|
217
|
-
- lib/mongoid/
|
218
|
-
- lib/mongoid/
|
219
|
-
- lib/mongoid/
|
220
|
-
- lib/mongoid/
|
221
|
-
- lib/mongoid/
|
222
|
-
- lib/mongoid/
|
223
|
-
- lib/mongoid/
|
224
|
-
- lib/mongoid/
|
225
|
-
- lib/mongoid/
|
226
|
-
- lib/mongoid/
|
227
|
-
- lib/mongoid/
|
228
|
-
- lib/mongoid/
|
229
|
-
- lib/mongoid/
|
230
|
-
- lib/mongoid/
|
231
|
-
- lib/mongoid/
|
232
|
-
- lib/mongoid/
|
233
|
-
- lib/mongoid/
|
234
|
-
- lib/mongoid/
|
235
|
-
- lib/mongoid/persistence/atomic/rename.rb
|
236
|
-
- lib/mongoid/persistence/atomic/sets.rb
|
237
|
-
- lib/mongoid/persistence/atomic/unset.rb
|
238
|
-
- lib/mongoid/persistence/deletion.rb
|
239
|
-
- lib/mongoid/persistence/insertion.rb
|
240
|
-
- lib/mongoid/persistence/modification.rb
|
241
|
-
- lib/mongoid/persistence/operations.rb
|
242
|
-
- lib/mongoid/persistence/operations/embedded/insert.rb
|
243
|
-
- lib/mongoid/persistence/operations/embedded/remove.rb
|
244
|
-
- lib/mongoid/persistence/operations/insert.rb
|
245
|
-
- lib/mongoid/persistence/operations/remove.rb
|
246
|
-
- lib/mongoid/persistence/operations/update.rb
|
247
|
-
- lib/mongoid/persistence/operations/upsert.rb
|
248
|
-
- lib/mongoid/persistence/upsertion.rb
|
198
|
+
- lib/mongoid/matchable/all.rb
|
199
|
+
- lib/mongoid/matchable/and.rb
|
200
|
+
- lib/mongoid/matchable/default.rb
|
201
|
+
- lib/mongoid/matchable/exists.rb
|
202
|
+
- lib/mongoid/matchable/gt.rb
|
203
|
+
- lib/mongoid/matchable/gte.rb
|
204
|
+
- lib/mongoid/matchable/in.rb
|
205
|
+
- lib/mongoid/matchable/lt.rb
|
206
|
+
- lib/mongoid/matchable/lte.rb
|
207
|
+
- lib/mongoid/matchable/ne.rb
|
208
|
+
- lib/mongoid/matchable/nin.rb
|
209
|
+
- lib/mongoid/matchable/or.rb
|
210
|
+
- lib/mongoid/matchable/size.rb
|
211
|
+
- lib/mongoid/matchable.rb
|
212
|
+
- lib/mongoid/persistable/creatable.rb
|
213
|
+
- lib/mongoid/persistable/deletable.rb
|
214
|
+
- lib/mongoid/persistable/destroyable.rb
|
215
|
+
- lib/mongoid/persistable/incrementable.rb
|
216
|
+
- lib/mongoid/persistable/logical.rb
|
217
|
+
- lib/mongoid/persistable/poppable.rb
|
218
|
+
- lib/mongoid/persistable/pullable.rb
|
219
|
+
- lib/mongoid/persistable/pushable.rb
|
220
|
+
- lib/mongoid/persistable/renamable.rb
|
221
|
+
- lib/mongoid/persistable/savable.rb
|
222
|
+
- lib/mongoid/persistable/settable.rb
|
223
|
+
- lib/mongoid/persistable/unsettable.rb
|
224
|
+
- lib/mongoid/persistable/updatable.rb
|
225
|
+
- lib/mongoid/persistable/upsertable.rb
|
226
|
+
- lib/mongoid/persistable.rb
|
227
|
+
- lib/mongoid/positional.rb
|
249
228
|
- lib/mongoid/railtie.rb
|
250
229
|
- lib/mongoid/railties/database.rake
|
251
230
|
- lib/mongoid/railties/document.rb
|
252
|
-
- lib/mongoid/relations.rb
|
253
231
|
- lib/mongoid/relations/accessors.rb
|
254
232
|
- lib/mongoid/relations/auto_save.rb
|
255
233
|
- lib/mongoid/relations/binding.rb
|
256
|
-
- lib/mongoid/relations/bindings.rb
|
257
234
|
- lib/mongoid/relations/bindings/embedded/in.rb
|
258
235
|
- lib/mongoid/relations/bindings/embedded/many.rb
|
259
236
|
- lib/mongoid/relations/bindings/embedded/one.rb
|
@@ -261,8 +238,8 @@ files:
|
|
261
238
|
- lib/mongoid/relations/bindings/referenced/many.rb
|
262
239
|
- lib/mongoid/relations/bindings/referenced/many_to_many.rb
|
263
240
|
- lib/mongoid/relations/bindings/referenced/one.rb
|
241
|
+
- lib/mongoid/relations/bindings.rb
|
264
242
|
- lib/mongoid/relations/builder.rb
|
265
|
-
- lib/mongoid/relations/builders.rb
|
266
243
|
- lib/mongoid/relations/builders/embedded/in.rb
|
267
244
|
- lib/mongoid/relations/builders/embedded/many.rb
|
268
245
|
- lib/mongoid/relations/builders/embedded/one.rb
|
@@ -272,15 +249,22 @@ files:
|
|
272
249
|
- lib/mongoid/relations/builders/referenced/many.rb
|
273
250
|
- lib/mongoid/relations/builders/referenced/many_to_many.rb
|
274
251
|
- lib/mongoid/relations/builders/referenced/one.rb
|
275
|
-
- lib/mongoid/relations/
|
252
|
+
- lib/mongoid/relations/builders.rb
|
276
253
|
- lib/mongoid/relations/cascading/delete.rb
|
277
254
|
- lib/mongoid/relations/cascading/destroy.rb
|
278
255
|
- lib/mongoid/relations/cascading/nullify.rb
|
279
256
|
- lib/mongoid/relations/cascading/restrict.rb
|
257
|
+
- lib/mongoid/relations/cascading.rb
|
280
258
|
- lib/mongoid/relations/constraint.rb
|
281
259
|
- lib/mongoid/relations/conversions.rb
|
282
260
|
- lib/mongoid/relations/counter_cache.rb
|
283
261
|
- lib/mongoid/relations/cyclic.rb
|
262
|
+
- lib/mongoid/relations/eager/base.rb
|
263
|
+
- lib/mongoid/relations/eager/belongs_to.rb
|
264
|
+
- lib/mongoid/relations/eager/has_and_belongs_to_many.rb
|
265
|
+
- lib/mongoid/relations/eager/has_many.rb
|
266
|
+
- lib/mongoid/relations/eager/has_one.rb
|
267
|
+
- lib/mongoid/relations/eager.rb
|
284
268
|
- lib/mongoid/relations/embedded/batchable.rb
|
285
269
|
- lib/mongoid/relations/embedded/in.rb
|
286
270
|
- lib/mongoid/relations/embedded/many.rb
|
@@ -300,55 +284,60 @@ files:
|
|
300
284
|
- lib/mongoid/relations/referenced/one.rb
|
301
285
|
- lib/mongoid/relations/reflections.rb
|
302
286
|
- lib/mongoid/relations/synchronization.rb
|
303
|
-
- lib/mongoid/relations/targets.rb
|
304
287
|
- lib/mongoid/relations/targets/enumerable.rb
|
288
|
+
- lib/mongoid/relations/targets.rb
|
305
289
|
- lib/mongoid/relations/touchable.rb
|
306
|
-
- lib/mongoid/
|
307
|
-
- lib/mongoid/
|
308
|
-
- lib/mongoid/
|
309
|
-
- lib/mongoid/
|
290
|
+
- lib/mongoid/relations.rb
|
291
|
+
- lib/mongoid/reloadable.rb
|
292
|
+
- lib/mongoid/scopable.rb
|
293
|
+
- lib/mongoid/selectable.rb
|
294
|
+
- lib/mongoid/serializable.rb
|
310
295
|
- lib/mongoid/sessions/factory.rb
|
311
296
|
- lib/mongoid/sessions/mongo_uri.rb
|
312
|
-
- lib/mongoid/sessions/
|
297
|
+
- lib/mongoid/sessions/options.rb
|
298
|
+
- lib/mongoid/sessions/storage_options.rb
|
299
|
+
- lib/mongoid/sessions/thread_options.rb
|
313
300
|
- lib/mongoid/sessions/validators/storage.rb
|
314
|
-
- lib/mongoid/
|
301
|
+
- lib/mongoid/sessions/validators.rb
|
302
|
+
- lib/mongoid/sessions.rb
|
303
|
+
- lib/mongoid/shardable.rb
|
315
304
|
- lib/mongoid/state.rb
|
316
|
-
- lib/mongoid/
|
305
|
+
- lib/mongoid/support/query_counter.rb
|
317
306
|
- lib/mongoid/threaded/lifecycle.rb
|
318
|
-
- lib/mongoid/
|
319
|
-
- lib/mongoid/timestamps/created.rb
|
307
|
+
- lib/mongoid/threaded.rb
|
320
308
|
- lib/mongoid/timestamps/created/short.rb
|
309
|
+
- lib/mongoid/timestamps/created.rb
|
321
310
|
- lib/mongoid/timestamps/short.rb
|
322
311
|
- lib/mongoid/timestamps/timeless.rb
|
323
|
-
- lib/mongoid/timestamps/updated.rb
|
324
312
|
- lib/mongoid/timestamps/updated/short.rb
|
325
|
-
- lib/mongoid/
|
326
|
-
- lib/mongoid/
|
327
|
-
- lib/mongoid/
|
328
|
-
- lib/mongoid/
|
329
|
-
- lib/mongoid/
|
330
|
-
- lib/mongoid/
|
331
|
-
- lib/mongoid/
|
332
|
-
- lib/mongoid/
|
333
|
-
- lib/mongoid/
|
334
|
-
- lib/mongoid/
|
313
|
+
- lib/mongoid/timestamps/updated.rb
|
314
|
+
- lib/mongoid/timestamps.rb
|
315
|
+
- lib/mongoid/traversable.rb
|
316
|
+
- lib/mongoid/validatable/associated.rb
|
317
|
+
- lib/mongoid/validatable/format.rb
|
318
|
+
- lib/mongoid/validatable/length.rb
|
319
|
+
- lib/mongoid/validatable/localizable.rb
|
320
|
+
- lib/mongoid/validatable/macros.rb
|
321
|
+
- lib/mongoid/validatable/presence.rb
|
322
|
+
- lib/mongoid/validatable/queryable.rb
|
323
|
+
- lib/mongoid/validatable/uniqueness.rb
|
324
|
+
- lib/mongoid/validatable.rb
|
335
325
|
- lib/mongoid/version.rb
|
336
|
-
- lib/mongoid
|
337
|
-
- lib/rack/mongoid.rb
|
338
|
-
- lib/rack/mongoid/middleware/identity_map.rb
|
326
|
+
- lib/mongoid.rb
|
339
327
|
- lib/rails/generators/mongoid/config/config_generator.rb
|
340
328
|
- lib/rails/generators/mongoid/config/templates/mongoid.yml
|
341
329
|
- lib/rails/generators/mongoid/model/model_generator.rb
|
342
330
|
- lib/rails/generators/mongoid/model/templates/model.rb.tt
|
343
|
-
- lib/rails/generators/mongoid/observer/observer_generator.rb
|
344
|
-
- lib/rails/generators/mongoid/observer/templates/observer.rb.tt
|
345
331
|
- lib/rails/generators/mongoid_generator.rb
|
346
332
|
- lib/rails/mongoid.rb
|
347
333
|
- lib/support/ruby_version.rb
|
334
|
+
- CHANGELOG.md
|
335
|
+
- LICENSE
|
336
|
+
- README.md
|
337
|
+
- Rakefile
|
348
338
|
- spec/app/models/account.rb
|
349
339
|
- spec/app/models/acolyte.rb
|
350
340
|
- spec/app/models/actor.rb
|
351
|
-
- spec/app/models/actor_observer.rb
|
352
341
|
- spec/app/models/actress.rb
|
353
342
|
- spec/app/models/address.rb
|
354
343
|
- spec/app/models/address_component.rb
|
@@ -363,6 +352,7 @@ files:
|
|
363
352
|
- spec/app/models/article.rb
|
364
353
|
- spec/app/models/artist.rb
|
365
354
|
- spec/app/models/artwork.rb
|
355
|
+
- spec/app/models/audio.rb
|
366
356
|
- spec/app/models/augmentation.rb
|
367
357
|
- spec/app/models/author.rb
|
368
358
|
- spec/app/models/band.rb
|
@@ -378,7 +368,6 @@ files:
|
|
378
368
|
- spec/app/models/building_address.rb
|
379
369
|
- spec/app/models/bus.rb
|
380
370
|
- spec/app/models/business.rb
|
381
|
-
- spec/app/models/callback_recorder.rb
|
382
371
|
- spec/app/models/callback_test.rb
|
383
372
|
- spec/app/models/canvas.rb
|
384
373
|
- spec/app/models/car.rb
|
@@ -402,9 +391,10 @@ files:
|
|
402
391
|
- spec/app/models/doctor.rb
|
403
392
|
- spec/app/models/dog.rb
|
404
393
|
- spec/app/models/dokument.rb
|
405
|
-
- spec/app/models/
|
394
|
+
- spec/app/models/dragon.rb
|
406
395
|
- spec/app/models/driver.rb
|
407
396
|
- spec/app/models/drug.rb
|
397
|
+
- spec/app/models/dungeon.rb
|
408
398
|
- spec/app/models/email.rb
|
409
399
|
- spec/app/models/employer.rb
|
410
400
|
- spec/app/models/entry.rb
|
@@ -459,8 +449,6 @@ files:
|
|
459
449
|
- spec/app/models/page.rb
|
460
450
|
- spec/app/models/page_question.rb
|
461
451
|
- spec/app/models/palette.rb
|
462
|
-
- spec/app/models/paranoid_phone.rb
|
463
|
-
- spec/app/models/paranoid_post.rb
|
464
452
|
- spec/app/models/parent.rb
|
465
453
|
- spec/app/models/parent_doc.rb
|
466
454
|
- spec/app/models/passport.rb
|
@@ -471,7 +459,6 @@ files:
|
|
471
459
|
- spec/app/models/pet.rb
|
472
460
|
- spec/app/models/pet_owner.rb
|
473
461
|
- spec/app/models/phone.rb
|
474
|
-
- spec/app/models/phone_observer.rb
|
475
462
|
- spec/app/models/pizza.rb
|
476
463
|
- spec/app/models/player.rb
|
477
464
|
- spec/app/models/post.rb
|
@@ -504,6 +491,7 @@ files:
|
|
504
491
|
- spec/app/models/short_quiz.rb
|
505
492
|
- spec/app/models/slave.rb
|
506
493
|
- spec/app/models/song.rb
|
494
|
+
- spec/app/models/sound.rb
|
507
495
|
- spec/app/models/square.rb
|
508
496
|
- spec/app/models/strategy.rb
|
509
497
|
- spec/app/models/sub_item.rb
|
@@ -535,19 +523,18 @@ files:
|
|
535
523
|
- spec/app/models/word_origin.rb
|
536
524
|
- spec/app/models/writer.rb
|
537
525
|
- spec/config/mongoid.yml
|
538
|
-
- spec/
|
526
|
+
- spec/helpers.rb
|
539
527
|
- spec/mongoid/atomic/modifiers_spec.rb
|
540
528
|
- spec/mongoid/atomic/paths/embedded/many_spec.rb
|
541
529
|
- spec/mongoid/atomic/paths/embedded/one_spec.rb
|
542
530
|
- spec/mongoid/atomic/paths/root_spec.rb
|
543
531
|
- spec/mongoid/atomic/paths_spec.rb
|
544
|
-
- spec/mongoid/atomic/positionable_spec.rb
|
545
532
|
- spec/mongoid/atomic_spec.rb
|
546
|
-
- spec/mongoid/attributes/
|
533
|
+
- spec/mongoid/attributes/nested_spec.rb
|
547
534
|
- spec/mongoid/attributes/readonly_spec.rb
|
548
535
|
- spec/mongoid/attributes_spec.rb
|
549
|
-
- spec/mongoid/
|
550
|
-
- spec/mongoid/
|
536
|
+
- spec/mongoid/changeable_spec.rb
|
537
|
+
- spec/mongoid/composable_spec.rb
|
551
538
|
- spec/mongoid/config/environment_spec.rb
|
552
539
|
- spec/mongoid/config/options_spec.rb
|
553
540
|
- spec/mongoid/config_spec.rb
|
@@ -559,15 +546,14 @@ files:
|
|
559
546
|
- spec/mongoid/contextual/map_reduce_spec.rb
|
560
547
|
- spec/mongoid/contextual/memory_spec.rb
|
561
548
|
- spec/mongoid/contextual/mongo_spec.rb
|
549
|
+
- spec/mongoid/contextual/text_search_spec.rb
|
562
550
|
- spec/mongoid/copyable_spec.rb
|
551
|
+
- spec/mongoid/criteria/findable_spec.rb
|
552
|
+
- spec/mongoid/criteria/inspectable_spec.rb
|
553
|
+
- spec/mongoid/criteria/marshalable_spec.rb
|
554
|
+
- spec/mongoid/criteria/modifiable_spec.rb
|
555
|
+
- spec/mongoid/criteria/scopable_spec.rb
|
563
556
|
- spec/mongoid/criteria_spec.rb
|
564
|
-
- spec/mongoid/criterion/destructive_spec.rb
|
565
|
-
- spec/mongoid/criterion/inspection_spec.rb
|
566
|
-
- spec/mongoid/criterion/marshalable_spec.rb
|
567
|
-
- spec/mongoid/criterion/modifiable_spec.rb
|
568
|
-
- spec/mongoid/criterion/modification_spec.rb
|
569
|
-
- spec/mongoid/criterion/scoping_spec.rb
|
570
|
-
- spec/mongoid/dirty_spec.rb
|
571
557
|
- spec/mongoid/document_spec.rb
|
572
558
|
- spec/mongoid/equality_spec.rb
|
573
559
|
- spec/mongoid/errors/ambiguous_relationship_spec.rb
|
@@ -608,7 +594,6 @@ files:
|
|
608
594
|
- spec/mongoid/errors/unsaved_document_spec.rb
|
609
595
|
- spec/mongoid/errors/unsupported_javascript_spec.rb
|
610
596
|
- spec/mongoid/errors/validations_spec.rb
|
611
|
-
- spec/mongoid/errors/versioning_not_on_root_spec.rb
|
612
597
|
- spec/mongoid/extensions/array_spec.rb
|
613
598
|
- spec/mongoid/extensions/big_decimal_spec.rb
|
614
599
|
- spec/mongoid/extensions/binary_spec.rb
|
@@ -631,6 +616,7 @@ files:
|
|
631
616
|
- spec/mongoid/extensions/time_spec.rb
|
632
617
|
- spec/mongoid/extensions/time_with_zone_spec.rb
|
633
618
|
- spec/mongoid/extensions/true_class_spec.rb
|
619
|
+
- spec/mongoid/extensions_spec.rb
|
634
620
|
- spec/mongoid/factory_spec.rb
|
635
621
|
- spec/mongoid/fields/foreign_key_spec.rb
|
636
622
|
- spec/mongoid/fields/internal/foreign_keys/array_spec.rb
|
@@ -638,51 +624,43 @@ files:
|
|
638
624
|
- spec/mongoid/fields/localized_spec.rb
|
639
625
|
- spec/mongoid/fields/standard_spec.rb
|
640
626
|
- spec/mongoid/fields_spec.rb
|
641
|
-
- spec/mongoid/
|
642
|
-
- spec/mongoid/
|
643
|
-
- spec/mongoid/
|
644
|
-
- spec/mongoid/
|
645
|
-
- spec/mongoid/
|
646
|
-
- spec/mongoid/
|
627
|
+
- spec/mongoid/findable_spec.rb
|
628
|
+
- spec/mongoid/indexable/specification_spec.rb
|
629
|
+
- spec/mongoid/indexable_spec.rb
|
630
|
+
- spec/mongoid/inspectable_spec.rb
|
631
|
+
- spec/mongoid/interceptable_spec.rb
|
632
|
+
- spec/mongoid/log_subscriber_spec.rb
|
647
633
|
- spec/mongoid/loggable_spec.rb
|
648
|
-
- spec/mongoid/
|
649
|
-
- spec/mongoid/
|
650
|
-
- spec/mongoid/
|
651
|
-
- spec/mongoid/
|
652
|
-
- spec/mongoid/
|
653
|
-
- spec/mongoid/
|
654
|
-
- spec/mongoid/
|
655
|
-
- spec/mongoid/
|
656
|
-
- spec/mongoid/
|
657
|
-
- spec/mongoid/
|
658
|
-
- spec/mongoid/
|
659
|
-
- spec/mongoid/
|
660
|
-
- spec/mongoid/
|
661
|
-
- spec/mongoid/
|
662
|
-
- spec/mongoid/
|
663
|
-
- spec/mongoid/
|
664
|
-
- spec/mongoid/
|
665
|
-
- spec/mongoid/
|
666
|
-
- spec/mongoid/
|
667
|
-
- spec/mongoid/
|
668
|
-
- spec/mongoid/
|
669
|
-
- spec/mongoid/
|
670
|
-
- spec/mongoid/
|
671
|
-
- spec/mongoid/
|
672
|
-
- spec/mongoid/
|
673
|
-
- spec/mongoid/
|
674
|
-
- spec/mongoid/
|
675
|
-
- spec/mongoid/
|
676
|
-
- spec/mongoid/
|
677
|
-
- spec/mongoid/
|
678
|
-
- spec/mongoid/persistence/operations/embedded/insert_spec.rb
|
679
|
-
- spec/mongoid/persistence/operations/embedded/remove_spec.rb
|
680
|
-
- spec/mongoid/persistence/operations/insert_spec.rb
|
681
|
-
- spec/mongoid/persistence/operations/remove_spec.rb
|
682
|
-
- spec/mongoid/persistence/operations/update_spec.rb
|
683
|
-
- spec/mongoid/persistence/operations/upsert_spec.rb
|
684
|
-
- spec/mongoid/persistence/operations_spec.rb
|
685
|
-
- spec/mongoid/persistence_spec.rb
|
634
|
+
- spec/mongoid/matchable/all_spec.rb
|
635
|
+
- spec/mongoid/matchable/and_spec.rb
|
636
|
+
- spec/mongoid/matchable/default_spec.rb
|
637
|
+
- spec/mongoid/matchable/exists_spec.rb
|
638
|
+
- spec/mongoid/matchable/gt_spec.rb
|
639
|
+
- spec/mongoid/matchable/gte_spec.rb
|
640
|
+
- spec/mongoid/matchable/in_spec.rb
|
641
|
+
- spec/mongoid/matchable/lt_spec.rb
|
642
|
+
- spec/mongoid/matchable/lte_spec.rb
|
643
|
+
- spec/mongoid/matchable/ne_spec.rb
|
644
|
+
- spec/mongoid/matchable/nin_spec.rb
|
645
|
+
- spec/mongoid/matchable/or_spec.rb
|
646
|
+
- spec/mongoid/matchable/size_spec.rb
|
647
|
+
- spec/mongoid/matchable_spec.rb
|
648
|
+
- spec/mongoid/persistable/creatable_spec.rb
|
649
|
+
- spec/mongoid/persistable/deletable_spec.rb
|
650
|
+
- spec/mongoid/persistable/destroyable_spec.rb
|
651
|
+
- spec/mongoid/persistable/incrementable_spec.rb
|
652
|
+
- spec/mongoid/persistable/logical_spec.rb
|
653
|
+
- spec/mongoid/persistable/poppable_spec.rb
|
654
|
+
- spec/mongoid/persistable/pullable_spec.rb
|
655
|
+
- spec/mongoid/persistable/pushable_spec.rb
|
656
|
+
- spec/mongoid/persistable/renamable_spec.rb
|
657
|
+
- spec/mongoid/persistable/savable_spec.rb
|
658
|
+
- spec/mongoid/persistable/settable_spec.rb
|
659
|
+
- spec/mongoid/persistable/unsettable_spec.rb
|
660
|
+
- spec/mongoid/persistable/updatable_spec.rb
|
661
|
+
- spec/mongoid/persistable/upsertable_spec.rb
|
662
|
+
- spec/mongoid/persistable_spec.rb
|
663
|
+
- spec/mongoid/positional_spec.rb
|
686
664
|
- spec/mongoid/railties/document_spec.rb
|
687
665
|
- spec/mongoid/relations/accessors_spec.rb
|
688
666
|
- spec/mongoid/relations/auto_save_spec.rb
|
@@ -712,6 +690,11 @@ files:
|
|
712
690
|
- spec/mongoid/relations/conversions_spec.rb
|
713
691
|
- spec/mongoid/relations/counter_cache_spec.rb
|
714
692
|
- spec/mongoid/relations/cyclic_spec.rb
|
693
|
+
- spec/mongoid/relations/eager/belongs_to_spec.rb
|
694
|
+
- spec/mongoid/relations/eager/has_and_belongs_to_many_spec.rb
|
695
|
+
- spec/mongoid/relations/eager/has_many_spec.rb
|
696
|
+
- spec/mongoid/relations/eager/has_one_spec.rb
|
697
|
+
- spec/mongoid/relations/eager_spec.rb
|
715
698
|
- spec/mongoid/relations/embedded/dirty_spec.rb
|
716
699
|
- spec/mongoid/relations/embedded/in_spec.rb
|
717
700
|
- spec/mongoid/relations/embedded/many_spec.rb
|
@@ -728,14 +711,17 @@ files:
|
|
728
711
|
- spec/mongoid/relations/reflections_spec.rb
|
729
712
|
- spec/mongoid/relations/synchronization_spec.rb
|
730
713
|
- spec/mongoid/relations/targets/enumerable_spec.rb
|
714
|
+
- spec/mongoid/relations/touchable_spec.rb
|
731
715
|
- spec/mongoid/relations_spec.rb
|
732
|
-
- spec/mongoid/
|
733
|
-
- spec/mongoid/
|
734
|
-
- spec/mongoid/
|
716
|
+
- spec/mongoid/reloadable_spec.rb
|
717
|
+
- spec/mongoid/scopable_spec.rb
|
718
|
+
- spec/mongoid/selectable_spec.rb
|
719
|
+
- spec/mongoid/serializable_spec.rb
|
735
720
|
- spec/mongoid/sessions/factory_spec.rb
|
736
721
|
- spec/mongoid/sessions/mongo_uri_spec.rb
|
722
|
+
- spec/mongoid/sessions/options_spec.rb
|
737
723
|
- spec/mongoid/sessions_spec.rb
|
738
|
-
- spec/mongoid/
|
724
|
+
- spec/mongoid/shardable_spec.rb
|
739
725
|
- spec/mongoid/state_spec.rb
|
740
726
|
- spec/mongoid/threaded_spec.rb
|
741
727
|
- spec/mongoid/timestamps/created/short_spec.rb
|
@@ -744,17 +730,15 @@ files:
|
|
744
730
|
- spec/mongoid/timestamps/updated/short_spec.rb
|
745
731
|
- spec/mongoid/timestamps/updated_spec.rb
|
746
732
|
- spec/mongoid/timestamps_spec.rb
|
747
|
-
- spec/mongoid/
|
748
|
-
- spec/mongoid/
|
749
|
-
- spec/mongoid/
|
750
|
-
- spec/mongoid/
|
751
|
-
- spec/mongoid/
|
752
|
-
- spec/mongoid/
|
753
|
-
- spec/mongoid/
|
754
|
-
- spec/mongoid/
|
755
|
-
- spec/mongoid/versioning_spec.rb
|
733
|
+
- spec/mongoid/traversable_spec.rb
|
734
|
+
- spec/mongoid/validatable/associated_spec.rb
|
735
|
+
- spec/mongoid/validatable/format_spec.rb
|
736
|
+
- spec/mongoid/validatable/length_spec.rb
|
737
|
+
- spec/mongoid/validatable/numericality_spec.rb
|
738
|
+
- spec/mongoid/validatable/presence_spec.rb
|
739
|
+
- spec/mongoid/validatable/uniqueness_spec.rb
|
740
|
+
- spec/mongoid/validatable_spec.rb
|
756
741
|
- spec/mongoid_spec.rb
|
757
|
-
- spec/rack/mongoid/middleware/identity_map_spec.rb
|
758
742
|
- spec/rails/mongoid_spec.rb
|
759
743
|
- spec/spec_helper.rb
|
760
744
|
homepage: http://mongoid.org
|
@@ -767,17 +751,17 @@ require_paths:
|
|
767
751
|
- lib
|
768
752
|
required_ruby_version: !ruby/object:Gem::Requirement
|
769
753
|
requirements:
|
770
|
-
- -
|
754
|
+
- - '>='
|
771
755
|
- !ruby/object:Gem::Version
|
772
756
|
version: '1.9'
|
773
757
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
774
758
|
requirements:
|
775
|
-
- -
|
759
|
+
- - '>='
|
776
760
|
- !ruby/object:Gem::Version
|
777
761
|
version: 1.3.6
|
778
762
|
requirements: []
|
779
763
|
rubyforge_project: mongoid
|
780
|
-
rubygems_version: 2.
|
764
|
+
rubygems_version: 2.1.11
|
781
765
|
signing_key:
|
782
766
|
specification_version: 4
|
783
767
|
summary: Elegant Persistance in Ruby for MongoDB.
|
@@ -785,7 +769,6 @@ test_files:
|
|
785
769
|
- spec/app/models/account.rb
|
786
770
|
- spec/app/models/acolyte.rb
|
787
771
|
- spec/app/models/actor.rb
|
788
|
-
- spec/app/models/actor_observer.rb
|
789
772
|
- spec/app/models/actress.rb
|
790
773
|
- spec/app/models/address.rb
|
791
774
|
- spec/app/models/address_component.rb
|
@@ -800,6 +783,7 @@ test_files:
|
|
800
783
|
- spec/app/models/article.rb
|
801
784
|
- spec/app/models/artist.rb
|
802
785
|
- spec/app/models/artwork.rb
|
786
|
+
- spec/app/models/audio.rb
|
803
787
|
- spec/app/models/augmentation.rb
|
804
788
|
- spec/app/models/author.rb
|
805
789
|
- spec/app/models/band.rb
|
@@ -815,7 +799,6 @@ test_files:
|
|
815
799
|
- spec/app/models/building_address.rb
|
816
800
|
- spec/app/models/bus.rb
|
817
801
|
- spec/app/models/business.rb
|
818
|
-
- spec/app/models/callback_recorder.rb
|
819
802
|
- spec/app/models/callback_test.rb
|
820
803
|
- spec/app/models/canvas.rb
|
821
804
|
- spec/app/models/car.rb
|
@@ -839,9 +822,10 @@ test_files:
|
|
839
822
|
- spec/app/models/doctor.rb
|
840
823
|
- spec/app/models/dog.rb
|
841
824
|
- spec/app/models/dokument.rb
|
842
|
-
- spec/app/models/
|
825
|
+
- spec/app/models/dragon.rb
|
843
826
|
- spec/app/models/driver.rb
|
844
827
|
- spec/app/models/drug.rb
|
828
|
+
- spec/app/models/dungeon.rb
|
845
829
|
- spec/app/models/email.rb
|
846
830
|
- spec/app/models/employer.rb
|
847
831
|
- spec/app/models/entry.rb
|
@@ -896,8 +880,6 @@ test_files:
|
|
896
880
|
- spec/app/models/page.rb
|
897
881
|
- spec/app/models/page_question.rb
|
898
882
|
- spec/app/models/palette.rb
|
899
|
-
- spec/app/models/paranoid_phone.rb
|
900
|
-
- spec/app/models/paranoid_post.rb
|
901
883
|
- spec/app/models/parent.rb
|
902
884
|
- spec/app/models/parent_doc.rb
|
903
885
|
- spec/app/models/passport.rb
|
@@ -908,7 +890,6 @@ test_files:
|
|
908
890
|
- spec/app/models/pet.rb
|
909
891
|
- spec/app/models/pet_owner.rb
|
910
892
|
- spec/app/models/phone.rb
|
911
|
-
- spec/app/models/phone_observer.rb
|
912
893
|
- spec/app/models/pizza.rb
|
913
894
|
- spec/app/models/player.rb
|
914
895
|
- spec/app/models/post.rb
|
@@ -941,6 +922,7 @@ test_files:
|
|
941
922
|
- spec/app/models/short_quiz.rb
|
942
923
|
- spec/app/models/slave.rb
|
943
924
|
- spec/app/models/song.rb
|
925
|
+
- spec/app/models/sound.rb
|
944
926
|
- spec/app/models/square.rb
|
945
927
|
- spec/app/models/strategy.rb
|
946
928
|
- spec/app/models/sub_item.rb
|
@@ -972,19 +954,18 @@ test_files:
|
|
972
954
|
- spec/app/models/word_origin.rb
|
973
955
|
- spec/app/models/writer.rb
|
974
956
|
- spec/config/mongoid.yml
|
975
|
-
- spec/
|
957
|
+
- spec/helpers.rb
|
976
958
|
- spec/mongoid/atomic/modifiers_spec.rb
|
977
959
|
- spec/mongoid/atomic/paths/embedded/many_spec.rb
|
978
960
|
- spec/mongoid/atomic/paths/embedded/one_spec.rb
|
979
961
|
- spec/mongoid/atomic/paths/root_spec.rb
|
980
962
|
- spec/mongoid/atomic/paths_spec.rb
|
981
|
-
- spec/mongoid/atomic/positionable_spec.rb
|
982
963
|
- spec/mongoid/atomic_spec.rb
|
983
|
-
- spec/mongoid/attributes/
|
964
|
+
- spec/mongoid/attributes/nested_spec.rb
|
984
965
|
- spec/mongoid/attributes/readonly_spec.rb
|
985
966
|
- spec/mongoid/attributes_spec.rb
|
986
|
-
- spec/mongoid/
|
987
|
-
- spec/mongoid/
|
967
|
+
- spec/mongoid/changeable_spec.rb
|
968
|
+
- spec/mongoid/composable_spec.rb
|
988
969
|
- spec/mongoid/config/environment_spec.rb
|
989
970
|
- spec/mongoid/config/options_spec.rb
|
990
971
|
- spec/mongoid/config_spec.rb
|
@@ -996,15 +977,14 @@ test_files:
|
|
996
977
|
- spec/mongoid/contextual/map_reduce_spec.rb
|
997
978
|
- spec/mongoid/contextual/memory_spec.rb
|
998
979
|
- spec/mongoid/contextual/mongo_spec.rb
|
980
|
+
- spec/mongoid/contextual/text_search_spec.rb
|
999
981
|
- spec/mongoid/copyable_spec.rb
|
982
|
+
- spec/mongoid/criteria/findable_spec.rb
|
983
|
+
- spec/mongoid/criteria/inspectable_spec.rb
|
984
|
+
- spec/mongoid/criteria/marshalable_spec.rb
|
985
|
+
- spec/mongoid/criteria/modifiable_spec.rb
|
986
|
+
- spec/mongoid/criteria/scopable_spec.rb
|
1000
987
|
- spec/mongoid/criteria_spec.rb
|
1001
|
-
- spec/mongoid/criterion/destructive_spec.rb
|
1002
|
-
- spec/mongoid/criterion/inspection_spec.rb
|
1003
|
-
- spec/mongoid/criterion/marshalable_spec.rb
|
1004
|
-
- spec/mongoid/criterion/modifiable_spec.rb
|
1005
|
-
- spec/mongoid/criterion/modification_spec.rb
|
1006
|
-
- spec/mongoid/criterion/scoping_spec.rb
|
1007
|
-
- spec/mongoid/dirty_spec.rb
|
1008
988
|
- spec/mongoid/document_spec.rb
|
1009
989
|
- spec/mongoid/equality_spec.rb
|
1010
990
|
- spec/mongoid/errors/ambiguous_relationship_spec.rb
|
@@ -1045,7 +1025,6 @@ test_files:
|
|
1045
1025
|
- spec/mongoid/errors/unsaved_document_spec.rb
|
1046
1026
|
- spec/mongoid/errors/unsupported_javascript_spec.rb
|
1047
1027
|
- spec/mongoid/errors/validations_spec.rb
|
1048
|
-
- spec/mongoid/errors/versioning_not_on_root_spec.rb
|
1049
1028
|
- spec/mongoid/extensions/array_spec.rb
|
1050
1029
|
- spec/mongoid/extensions/big_decimal_spec.rb
|
1051
1030
|
- spec/mongoid/extensions/binary_spec.rb
|
@@ -1068,6 +1047,7 @@ test_files:
|
|
1068
1047
|
- spec/mongoid/extensions/time_spec.rb
|
1069
1048
|
- spec/mongoid/extensions/time_with_zone_spec.rb
|
1070
1049
|
- spec/mongoid/extensions/true_class_spec.rb
|
1050
|
+
- spec/mongoid/extensions_spec.rb
|
1071
1051
|
- spec/mongoid/factory_spec.rb
|
1072
1052
|
- spec/mongoid/fields/foreign_key_spec.rb
|
1073
1053
|
- spec/mongoid/fields/internal/foreign_keys/array_spec.rb
|
@@ -1075,51 +1055,43 @@ test_files:
|
|
1075
1055
|
- spec/mongoid/fields/localized_spec.rb
|
1076
1056
|
- spec/mongoid/fields/standard_spec.rb
|
1077
1057
|
- spec/mongoid/fields_spec.rb
|
1078
|
-
- spec/mongoid/
|
1079
|
-
- spec/mongoid/
|
1080
|
-
- spec/mongoid/
|
1081
|
-
- spec/mongoid/
|
1082
|
-
- spec/mongoid/
|
1083
|
-
- spec/mongoid/
|
1058
|
+
- spec/mongoid/findable_spec.rb
|
1059
|
+
- spec/mongoid/indexable/specification_spec.rb
|
1060
|
+
- spec/mongoid/indexable_spec.rb
|
1061
|
+
- spec/mongoid/inspectable_spec.rb
|
1062
|
+
- spec/mongoid/interceptable_spec.rb
|
1063
|
+
- spec/mongoid/log_subscriber_spec.rb
|
1084
1064
|
- spec/mongoid/loggable_spec.rb
|
1085
|
-
- spec/mongoid/
|
1086
|
-
- spec/mongoid/
|
1087
|
-
- spec/mongoid/
|
1088
|
-
- spec/mongoid/
|
1089
|
-
- spec/mongoid/
|
1090
|
-
- spec/mongoid/
|
1091
|
-
- spec/mongoid/
|
1092
|
-
- spec/mongoid/
|
1093
|
-
- spec/mongoid/
|
1094
|
-
- spec/mongoid/
|
1095
|
-
- spec/mongoid/
|
1096
|
-
- spec/mongoid/
|
1097
|
-
- spec/mongoid/
|
1098
|
-
- spec/mongoid/
|
1099
|
-
- spec/mongoid/
|
1100
|
-
- spec/mongoid/
|
1101
|
-
- spec/mongoid/
|
1102
|
-
- spec/mongoid/
|
1103
|
-
- spec/mongoid/
|
1104
|
-
- spec/mongoid/
|
1105
|
-
- spec/mongoid/
|
1106
|
-
- spec/mongoid/
|
1107
|
-
- spec/mongoid/
|
1108
|
-
- spec/mongoid/
|
1109
|
-
- spec/mongoid/
|
1110
|
-
- spec/mongoid/
|
1111
|
-
- spec/mongoid/
|
1112
|
-
- spec/mongoid/
|
1113
|
-
- spec/mongoid/
|
1114
|
-
- spec/mongoid/
|
1115
|
-
- spec/mongoid/persistence/operations/embedded/insert_spec.rb
|
1116
|
-
- spec/mongoid/persistence/operations/embedded/remove_spec.rb
|
1117
|
-
- spec/mongoid/persistence/operations/insert_spec.rb
|
1118
|
-
- spec/mongoid/persistence/operations/remove_spec.rb
|
1119
|
-
- spec/mongoid/persistence/operations/update_spec.rb
|
1120
|
-
- spec/mongoid/persistence/operations/upsert_spec.rb
|
1121
|
-
- spec/mongoid/persistence/operations_spec.rb
|
1122
|
-
- spec/mongoid/persistence_spec.rb
|
1065
|
+
- spec/mongoid/matchable/all_spec.rb
|
1066
|
+
- spec/mongoid/matchable/and_spec.rb
|
1067
|
+
- spec/mongoid/matchable/default_spec.rb
|
1068
|
+
- spec/mongoid/matchable/exists_spec.rb
|
1069
|
+
- spec/mongoid/matchable/gt_spec.rb
|
1070
|
+
- spec/mongoid/matchable/gte_spec.rb
|
1071
|
+
- spec/mongoid/matchable/in_spec.rb
|
1072
|
+
- spec/mongoid/matchable/lt_spec.rb
|
1073
|
+
- spec/mongoid/matchable/lte_spec.rb
|
1074
|
+
- spec/mongoid/matchable/ne_spec.rb
|
1075
|
+
- spec/mongoid/matchable/nin_spec.rb
|
1076
|
+
- spec/mongoid/matchable/or_spec.rb
|
1077
|
+
- spec/mongoid/matchable/size_spec.rb
|
1078
|
+
- spec/mongoid/matchable_spec.rb
|
1079
|
+
- spec/mongoid/persistable/creatable_spec.rb
|
1080
|
+
- spec/mongoid/persistable/deletable_spec.rb
|
1081
|
+
- spec/mongoid/persistable/destroyable_spec.rb
|
1082
|
+
- spec/mongoid/persistable/incrementable_spec.rb
|
1083
|
+
- spec/mongoid/persistable/logical_spec.rb
|
1084
|
+
- spec/mongoid/persistable/poppable_spec.rb
|
1085
|
+
- spec/mongoid/persistable/pullable_spec.rb
|
1086
|
+
- spec/mongoid/persistable/pushable_spec.rb
|
1087
|
+
- spec/mongoid/persistable/renamable_spec.rb
|
1088
|
+
- spec/mongoid/persistable/savable_spec.rb
|
1089
|
+
- spec/mongoid/persistable/settable_spec.rb
|
1090
|
+
- spec/mongoid/persistable/unsettable_spec.rb
|
1091
|
+
- spec/mongoid/persistable/updatable_spec.rb
|
1092
|
+
- spec/mongoid/persistable/upsertable_spec.rb
|
1093
|
+
- spec/mongoid/persistable_spec.rb
|
1094
|
+
- spec/mongoid/positional_spec.rb
|
1123
1095
|
- spec/mongoid/railties/document_spec.rb
|
1124
1096
|
- spec/mongoid/relations/accessors_spec.rb
|
1125
1097
|
- spec/mongoid/relations/auto_save_spec.rb
|
@@ -1149,6 +1121,11 @@ test_files:
|
|
1149
1121
|
- spec/mongoid/relations/conversions_spec.rb
|
1150
1122
|
- spec/mongoid/relations/counter_cache_spec.rb
|
1151
1123
|
- spec/mongoid/relations/cyclic_spec.rb
|
1124
|
+
- spec/mongoid/relations/eager/belongs_to_spec.rb
|
1125
|
+
- spec/mongoid/relations/eager/has_and_belongs_to_many_spec.rb
|
1126
|
+
- spec/mongoid/relations/eager/has_many_spec.rb
|
1127
|
+
- spec/mongoid/relations/eager/has_one_spec.rb
|
1128
|
+
- spec/mongoid/relations/eager_spec.rb
|
1152
1129
|
- spec/mongoid/relations/embedded/dirty_spec.rb
|
1153
1130
|
- spec/mongoid/relations/embedded/in_spec.rb
|
1154
1131
|
- spec/mongoid/relations/embedded/many_spec.rb
|
@@ -1165,14 +1142,17 @@ test_files:
|
|
1165
1142
|
- spec/mongoid/relations/reflections_spec.rb
|
1166
1143
|
- spec/mongoid/relations/synchronization_spec.rb
|
1167
1144
|
- spec/mongoid/relations/targets/enumerable_spec.rb
|
1145
|
+
- spec/mongoid/relations/touchable_spec.rb
|
1168
1146
|
- spec/mongoid/relations_spec.rb
|
1169
|
-
- spec/mongoid/
|
1170
|
-
- spec/mongoid/
|
1171
|
-
- spec/mongoid/
|
1147
|
+
- spec/mongoid/reloadable_spec.rb
|
1148
|
+
- spec/mongoid/scopable_spec.rb
|
1149
|
+
- spec/mongoid/selectable_spec.rb
|
1150
|
+
- spec/mongoid/serializable_spec.rb
|
1172
1151
|
- spec/mongoid/sessions/factory_spec.rb
|
1173
1152
|
- spec/mongoid/sessions/mongo_uri_spec.rb
|
1153
|
+
- spec/mongoid/sessions/options_spec.rb
|
1174
1154
|
- spec/mongoid/sessions_spec.rb
|
1175
|
-
- spec/mongoid/
|
1155
|
+
- spec/mongoid/shardable_spec.rb
|
1176
1156
|
- spec/mongoid/state_spec.rb
|
1177
1157
|
- spec/mongoid/threaded_spec.rb
|
1178
1158
|
- spec/mongoid/timestamps/created/short_spec.rb
|
@@ -1181,16 +1161,14 @@ test_files:
|
|
1181
1161
|
- spec/mongoid/timestamps/updated/short_spec.rb
|
1182
1162
|
- spec/mongoid/timestamps/updated_spec.rb
|
1183
1163
|
- spec/mongoid/timestamps_spec.rb
|
1184
|
-
- spec/mongoid/
|
1185
|
-
- spec/mongoid/
|
1186
|
-
- spec/mongoid/
|
1187
|
-
- spec/mongoid/
|
1188
|
-
- spec/mongoid/
|
1189
|
-
- spec/mongoid/
|
1190
|
-
- spec/mongoid/
|
1191
|
-
- spec/mongoid/
|
1192
|
-
- spec/mongoid/versioning_spec.rb
|
1164
|
+
- spec/mongoid/traversable_spec.rb
|
1165
|
+
- spec/mongoid/validatable/associated_spec.rb
|
1166
|
+
- spec/mongoid/validatable/format_spec.rb
|
1167
|
+
- spec/mongoid/validatable/length_spec.rb
|
1168
|
+
- spec/mongoid/validatable/numericality_spec.rb
|
1169
|
+
- spec/mongoid/validatable/presence_spec.rb
|
1170
|
+
- spec/mongoid/validatable/uniqueness_spec.rb
|
1171
|
+
- spec/mongoid/validatable_spec.rb
|
1193
1172
|
- spec/mongoid_spec.rb
|
1194
|
-
- spec/rack/mongoid/middleware/identity_map_spec.rb
|
1195
1173
|
- spec/rails/mongoid_spec.rb
|
1196
1174
|
- spec/spec_helper.rb
|