chhean-mongoid 2.0.1.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. data/MIT_LICENSE +20 -0
  2. data/README.rdoc +49 -0
  3. data/lib/mongoid.rb +139 -0
  4. data/lib/mongoid/associations.rb +327 -0
  5. data/lib/mongoid/associations/embedded_in.rb +72 -0
  6. data/lib/mongoid/associations/embeds_many.rb +262 -0
  7. data/lib/mongoid/associations/embeds_one.rb +95 -0
  8. data/lib/mongoid/associations/foreign_key.rb +35 -0
  9. data/lib/mongoid/associations/meta_data.rb +29 -0
  10. data/lib/mongoid/associations/options.rb +73 -0
  11. data/lib/mongoid/associations/proxy.rb +33 -0
  12. data/lib/mongoid/associations/referenced_in.rb +71 -0
  13. data/lib/mongoid/associations/references_many.rb +243 -0
  14. data/lib/mongoid/associations/references_many_as_array.rb +78 -0
  15. data/lib/mongoid/associations/references_one.rb +116 -0
  16. data/lib/mongoid/attributes.rb +226 -0
  17. data/lib/mongoid/callbacks.rb +17 -0
  18. data/lib/mongoid/collection.rb +120 -0
  19. data/lib/mongoid/collections.rb +41 -0
  20. data/lib/mongoid/collections/cyclic_iterator.rb +34 -0
  21. data/lib/mongoid/collections/master.rb +29 -0
  22. data/lib/mongoid/collections/operations.rb +41 -0
  23. data/lib/mongoid/collections/slaves.rb +45 -0
  24. data/lib/mongoid/components.rb +32 -0
  25. data/lib/mongoid/config.rb +237 -0
  26. data/lib/mongoid/contexts.rb +24 -0
  27. data/lib/mongoid/contexts/enumerable.rb +151 -0
  28. data/lib/mongoid/contexts/ids.rb +25 -0
  29. data/lib/mongoid/contexts/mongo.rb +285 -0
  30. data/lib/mongoid/contexts/paging.rb +50 -0
  31. data/lib/mongoid/criteria.rb +230 -0
  32. data/lib/mongoid/criterion/complex.rb +21 -0
  33. data/lib/mongoid/criterion/exclusion.rb +65 -0
  34. data/lib/mongoid/criterion/inclusion.rb +110 -0
  35. data/lib/mongoid/criterion/optional.rb +136 -0
  36. data/lib/mongoid/cursor.rb +82 -0
  37. data/lib/mongoid/deprecation.rb +22 -0
  38. data/lib/mongoid/dirty.rb +254 -0
  39. data/lib/mongoid/document.rb +264 -0
  40. data/lib/mongoid/errors.rb +124 -0
  41. data/lib/mongoid/extensions.rb +106 -0
  42. data/lib/mongoid/extensions/array/accessors.rb +17 -0
  43. data/lib/mongoid/extensions/array/aliasing.rb +4 -0
  44. data/lib/mongoid/extensions/array/assimilation.rb +26 -0
  45. data/lib/mongoid/extensions/array/conversions.rb +27 -0
  46. data/lib/mongoid/extensions/array/parentization.rb +13 -0
  47. data/lib/mongoid/extensions/big_decimal/conversions.rb +19 -0
  48. data/lib/mongoid/extensions/binary/conversions.rb +17 -0
  49. data/lib/mongoid/extensions/boolean/conversions.rb +22 -0
  50. data/lib/mongoid/extensions/date/conversions.rb +24 -0
  51. data/lib/mongoid/extensions/datetime/conversions.rb +12 -0
  52. data/lib/mongoid/extensions/float/conversions.rb +20 -0
  53. data/lib/mongoid/extensions/hash/accessors.rb +38 -0
  54. data/lib/mongoid/extensions/hash/assimilation.rb +39 -0
  55. data/lib/mongoid/extensions/hash/conversions.rb +45 -0
  56. data/lib/mongoid/extensions/hash/criteria_helpers.rb +20 -0
  57. data/lib/mongoid/extensions/hash/scoping.rb +12 -0
  58. data/lib/mongoid/extensions/integer/conversions.rb +20 -0
  59. data/lib/mongoid/extensions/nil/assimilation.rb +17 -0
  60. data/lib/mongoid/extensions/object/conversions.rb +27 -0
  61. data/lib/mongoid/extensions/objectid/conversions.rb +15 -0
  62. data/lib/mongoid/extensions/proc/scoping.rb +12 -0
  63. data/lib/mongoid/extensions/set/conversions.rb +20 -0
  64. data/lib/mongoid/extensions/string/conversions.rb +15 -0
  65. data/lib/mongoid/extensions/string/inflections.rb +97 -0
  66. data/lib/mongoid/extensions/symbol/inflections.rb +39 -0
  67. data/lib/mongoid/extensions/time_conversions.rb +35 -0
  68. data/lib/mongoid/extras.rb +61 -0
  69. data/lib/mongoid/factory.rb +20 -0
  70. data/lib/mongoid/field.rb +80 -0
  71. data/lib/mongoid/fields.rb +61 -0
  72. data/lib/mongoid/finders.rb +144 -0
  73. data/lib/mongoid/identity.rb +39 -0
  74. data/lib/mongoid/indexes.rb +27 -0
  75. data/lib/mongoid/javascript.rb +21 -0
  76. data/lib/mongoid/javascript/functions.yml +37 -0
  77. data/lib/mongoid/matchers.rb +35 -0
  78. data/lib/mongoid/matchers/all.rb +11 -0
  79. data/lib/mongoid/matchers/default.rb +26 -0
  80. data/lib/mongoid/matchers/exists.rb +13 -0
  81. data/lib/mongoid/matchers/gt.rb +11 -0
  82. data/lib/mongoid/matchers/gte.rb +11 -0
  83. data/lib/mongoid/matchers/in.rb +11 -0
  84. data/lib/mongoid/matchers/lt.rb +11 -0
  85. data/lib/mongoid/matchers/lte.rb +11 -0
  86. data/lib/mongoid/matchers/ne.rb +11 -0
  87. data/lib/mongoid/matchers/nin.rb +11 -0
  88. data/lib/mongoid/matchers/size.rb +11 -0
  89. data/lib/mongoid/memoization.rb +33 -0
  90. data/lib/mongoid/named_scope.rb +37 -0
  91. data/lib/mongoid/observable.rb +30 -0
  92. data/lib/mongoid/paths.rb +62 -0
  93. data/lib/mongoid/persistence.rb +218 -0
  94. data/lib/mongoid/persistence/command.rb +39 -0
  95. data/lib/mongoid/persistence/insert.rb +47 -0
  96. data/lib/mongoid/persistence/insert_embedded.rb +38 -0
  97. data/lib/mongoid/persistence/remove.rb +39 -0
  98. data/lib/mongoid/persistence/remove_all.rb +37 -0
  99. data/lib/mongoid/persistence/remove_embedded.rb +50 -0
  100. data/lib/mongoid/persistence/update.rb +63 -0
  101. data/lib/mongoid/railtie.rb +54 -0
  102. data/lib/mongoid/railties/database.rake +37 -0
  103. data/lib/mongoid/scope.rb +75 -0
  104. data/lib/mongoid/state.rb +32 -0
  105. data/lib/mongoid/timestamps.rb +27 -0
  106. data/lib/mongoid/validations.rb +51 -0
  107. data/lib/mongoid/validations/associated.rb +32 -0
  108. data/lib/mongoid/validations/locale/en.yml +4 -0
  109. data/lib/mongoid/validations/uniqueness.rb +50 -0
  110. data/lib/mongoid/version.rb +4 -0
  111. data/lib/mongoid/versioning.rb +27 -0
  112. data/lib/rails/generators/mongoid/config/config_generator.rb +41 -0
  113. data/lib/rails/generators/mongoid/config/templates/mongoid.yml +24 -0
  114. data/lib/rails/generators/mongoid/model/model_generator.rb +24 -0
  115. data/lib/rails/generators/mongoid/model/templates/model.rb +15 -0
  116. data/lib/rails/generators/mongoid_generator.rb +61 -0
  117. metadata +284 -0
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module State #:nodoc:
4
+ # Returns true if the +Document+ has not been persisted to the database,
5
+ # false if it has. This is determined by the variable @new_record
6
+ # and NOT if the object has an id.
7
+ def new_record?
8
+ @new_record == true
9
+ end
10
+
11
+ # Sets the new_record boolean - used after document is saved.
12
+ def new_record=(saved)
13
+ @new_record = saved
14
+ end
15
+
16
+ # Checks if the document has been saved to the database.
17
+ def persisted?
18
+ !new_record?
19
+ end
20
+
21
+ # Returns true if the +Document+ has been succesfully destroyed, and false if it hasn't.
22
+ # This is determined by the variable @destroyed and NOT by checking the database.
23
+ def destroyed?
24
+ @destroyed == true
25
+ end
26
+
27
+ # Sets the destroyed boolean - used after document is destroyed.
28
+ def destroyed=(destroyed)
29
+ @destroyed = destroyed && true
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,27 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Timestamps
4
+ extend ActiveSupport::Concern
5
+ included do
6
+ field :created_at, :type => Time
7
+ field :updated_at, :type => Time
8
+ set_callback :create, :before, :set_created_at
9
+ set_callback :save, :before, :set_updated_at
10
+ end
11
+
12
+ module InstanceMethods
13
+
14
+ # Update the created_at field on the Document to the current time. This is
15
+ # only called on create.
16
+ def set_created_at
17
+ self.created_at = Time.now.utc if !created_at
18
+ end
19
+
20
+ # Update the updated_at field on the Document to the current time.
21
+ # This is only called on create and on save.
22
+ def set_updated_at
23
+ self.updated_at = Time.now.utc
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,51 @@
1
+ # encoding: utf-8
2
+ require "mongoid/validations/associated"
3
+ require "mongoid/validations/uniqueness"
4
+
5
+ I18n.load_path << File.join(
6
+ File.dirname(__FILE__), "validations", "locale", "en.yml"
7
+ )
8
+
9
+ module Mongoid #:nodoc:
10
+ # This module provides additional validations that ActiveModel does not
11
+ # provide: validates_associated and validates_uniqueness_of
12
+ module Validations
13
+ extend ActiveSupport::Concern
14
+ included do
15
+ include ActiveModel::Validations
16
+ end
17
+
18
+ module ClassMethods #:nodoc:
19
+ # Validates whether or not an association is valid or not. Will correctly
20
+ # handle has one and has many associations.
21
+ #
22
+ # Example:
23
+ #
24
+ # class Person
25
+ # include Mongoid::Document
26
+ # embeds_one :name
27
+ # embeds_many :addresses
28
+ #
29
+ # validates_associated :name, :addresses
30
+ # end
31
+ def validates_associated(*args)
32
+ validates_with(AssociatedValidator, _merge_attributes(args))
33
+ end
34
+
35
+ # Validates whether or not a field is unique against the documents in the
36
+ # database.
37
+ #
38
+ # Example:
39
+ #
40
+ # class Person
41
+ # include Mongoid::Document
42
+ # field :title
43
+ #
44
+ # validates_uniqueness_of :title
45
+ # end
46
+ def validates_uniqueness_of(*args)
47
+ validates_with(UniquenessValidator, _merge_attributes(args))
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Validations #:nodoc:
4
+ # Validates whether or not an association is valid or not. Will correctly
5
+ # handle has one and has many associations.
6
+ #
7
+ # Example:
8
+ #
9
+ # class Person
10
+ # include Mongoid::Document
11
+ # embeds_one :name
12
+ # embeds_many :addresses
13
+ #
14
+ # validates_associated :name, :addresses
15
+ # end
16
+ class AssociatedValidator < ActiveModel::EachValidator
17
+
18
+ # Validates that the associations provided are either all nil or all
19
+ # valid. If neither is true then the appropriate errors will be added to
20
+ # the parent document.
21
+ #
22
+ # Example:
23
+ #
24
+ # <tt>validator.validate_each(document, :name, name)</tt>
25
+ def validate_each(document, attribute, value)
26
+ values = value.is_a?(Array) ? value : [ value ]
27
+ return if values.collect { |doc| doc.nil? || doc.valid? }.all?
28
+ document.errors.add(attribute, :invalid, :default => options[:message], :value => value)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ errors:
3
+ messages:
4
+ taken: "is already taken"
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ module Validations #:nodoc:
4
+ # Validates whether or not a field is unique against the documents in the
5
+ # database.
6
+ #
7
+ # Example:
8
+ #
9
+ # class Person
10
+ # include Mongoid::Document
11
+ # field :title
12
+ #
13
+ # validates_uniqueness_of :title
14
+ # end
15
+ #
16
+ # :in option allows to set external collection to check in
17
+ # :field option allows to set custom attribute name
18
+ #
19
+ class UniquenessValidator < ActiveModel::EachValidator
20
+ def validate_each(document, attribute, value)
21
+ if options.has_key? :field
22
+ conditions = {options[:field] => value}
23
+ else
24
+ conditions = {attribute => value}
25
+ end
26
+
27
+ conditions[options[:scope]] = document.attributes[options[:scope]] if options.has_key?(:scope) && !options[:scope].blank?
28
+
29
+ if options.has_key? :in
30
+ scope = options[:in].classify.constantize
31
+ else
32
+ scope = document.class
33
+ end
34
+
35
+ return if scope.where(conditions).empty?
36
+
37
+ if (document.new_record? || key_changed?(document)) || options.has_key?(:in)
38
+ document.errors.add(attribute, :taken, :default => options[:message], :value => value)
39
+ end
40
+ end
41
+
42
+ protected
43
+ def key_changed?(document)
44
+ (document.primary_key || {}).each do |key|
45
+ return true if document.send("#{key}_changed?")
46
+ end; false
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,4 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc
3
+ VERSION = "2.0.0.beta6"
4
+ end
@@ -0,0 +1,27 @@
1
+ # encoding: utf-8
2
+ module Mongoid #:nodoc:
3
+ # Include this module to get automatic versioning of root level documents.
4
+ # This will add a version field to the +Document+ and a has_many association
5
+ # with all the versions contained in it.
6
+ module Versioning
7
+ extend ActiveSupport::Concern
8
+ included do
9
+ field :version, :type => Integer, :default => 1
10
+ embeds_many :versions, :class_name => self.name
11
+ set_callback :save, :before, :revise
12
+ end
13
+ module InstanceMethods
14
+ # Create a new version of the +Document+. This will load the previous
15
+ # document from the database and set it as the next version before saving
16
+ # the current document. It then increments the version number.
17
+ def revise
18
+ last_version = self.class.first(:conditions => { :_id => id, :version => version })
19
+ if last_version
20
+ self.versions << last_version.clone
21
+ self.version = version + 1
22
+ @modifications["versions"] = [ nil, @attributes["versions"] ] if @modifications
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,41 @@
1
+ # encoding: utf-8
2
+ require 'rails/generators/mongoid_generator'
3
+
4
+ module Mongoid
5
+ module Generators
6
+ class ConfigGenerator < Rails::Generators::Base
7
+ desc "Creates a Mongoid configuration file at config/mongoid.yml"
8
+
9
+ argument :database_name, :type => :string, :optional => true
10
+
11
+ def self.source_root
12
+ @_mongoid_source_root ||= File.expand_path("../templates", __FILE__)
13
+ end
14
+
15
+ def app_name
16
+ Rails::Application.subclasses.first.parent.to_s.underscore
17
+ end
18
+
19
+ def create_config_file
20
+ template 'mongoid.yml', File.join('config', "mongoid.yml")
21
+ end
22
+
23
+ def inject_mongoid_into_application
24
+ config_application_path = File.join("config", "application.rb")
25
+ config_contents = File.read(config_application_path)
26
+
27
+ mongoid_require = "\n\nrequire 'mongoid/railtie'"
28
+
29
+ # check to see if its already been included
30
+ return if config_contents.include?(mongoid_require)
31
+
32
+ if config_contents.include?("require 'rails/all'")
33
+ inject_into_file config_application_path, mongoid_require, :after => "require 'rails/all'"
34
+ elsif config_contents.include?("require \"action_controller/railtie\"")
35
+ inject_into_file config_application_path, mongoid_require, :after => "require \"action_controller/railtie\""
36
+ end
37
+ end
38
+
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,24 @@
1
+ defaults: &defaults
2
+ host: localhost
3
+ # slaves:
4
+ # - host: slave1.local
5
+ # port: 27018
6
+ # - host: slave2.local
7
+ # port: 27019
8
+
9
+ development:
10
+ <<: *defaults
11
+ database: <%= database_name || app_name %>_development
12
+
13
+ test:
14
+ <<: *defaults
15
+ database: <%= database_name || app_name %>_test
16
+
17
+ # set these environment variables on your prod server
18
+ production:
19
+ <<: *defaults
20
+ host: <%%= ENV['MONGOID_HOST'] %>
21
+ port: <%%= ENV['MONGOID_PORT'] %>
22
+ username: <%%= ENV['MONGOID_USERNAME'] %>
23
+ password: <%%= ENV['MONGOID_PASSWORD'] %>
24
+ database: <%%= ENV['MONGOID_DATABASE'] %>
@@ -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", 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,15 @@
1
+ class <%= class_name %><%= " < #{options[:parent].classify}" if options[:parent] %>
2
+ <% unless options[:parent] -%>
3
+ include Mongoid::Document
4
+ <% end -%>
5
+ <% if options[:timestamps] -%>
6
+ include Mongoid::Timestamps
7
+ <% end -%>
8
+ <%= 'include Mongoid::Versioning' if options[:versioning] -%>
9
+ <% attributes.reject{|attr| attr.reference?}.each do |attribute| -%>
10
+ field :<%= attribute.name %>, :type => <%= attribute.type_class %>
11
+ <% end -%>
12
+ <% attributes.select{|attr| attr.reference? }.each do |attribute| -%>
13
+ embedded_in :<%= attribute.name%>, :inverse_of => :<%= class_name.tableize %>
14
+ <% end -%>
15
+ end
@@ -0,0 +1,61 @@
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
+ end
14
+
15
+ class ActiveModel < ::Rails::Generators::ActiveModel #:nodoc:
16
+ def self.all(klass)
17
+ "#{klass}.all"
18
+ end
19
+
20
+ def self.find(klass, params=nil)
21
+ "#{klass}.find(#{params})"
22
+ end
23
+
24
+ def self.build(klass, params=nil)
25
+ if params
26
+ "#{klass}.new(#{params})"
27
+ else
28
+ "#{klass}.new"
29
+ end
30
+ end
31
+
32
+ def save
33
+ "#{name}.save"
34
+ end
35
+
36
+ def update_attributes(params=nil)
37
+ "#{name}.update_attributes(#{params})"
38
+ end
39
+
40
+ def errors
41
+ "#{name}.errors"
42
+ end
43
+
44
+ def destroy
45
+ "#{name}.destroy"
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ module Rails
52
+ module Generators
53
+ class GeneratedAttribute #:nodoc:
54
+ def type_class
55
+ return "Time" if type.to_s == "datetime"
56
+ return "String" if type.to_s == "text"
57
+ return type.to_s.camelcase
58
+ end
59
+ end
60
+ end
61
+ end
metadata ADDED
@@ -0,0 +1,284 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chhean-mongoid
3
+ version: !ruby/object:Gem::Version
4
+ hash: -1848230039
5
+ prerelease: true
6
+ segments:
7
+ - 2
8
+ - 0
9
+ - 1
10
+ - beta1
11
+ version: 2.0.1.beta1
12
+ platform: ruby
13
+ authors:
14
+ - Durran Jordan
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2010-06-04 00:00:00 -04:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: activemodel
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - "="
29
+ - !ruby/object:Gem::Version
30
+ hash: -1848230021
31
+ segments:
32
+ - 3
33
+ - 0
34
+ - 0
35
+ - beta3
36
+ version: 3.0.0.beta3
37
+ type: :runtime
38
+ version_requirements: *id001
39
+ - !ruby/object:Gem::Dependency
40
+ name: will_paginate
41
+ prerelease: false
42
+ requirement: &id002 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - "="
46
+ - !ruby/object:Gem::Version
47
+ hash: 961915916
48
+ segments:
49
+ - 3
50
+ - 0
51
+ - pre
52
+ version: 3.0.pre
53
+ type: :runtime
54
+ version_requirements: *id002
55
+ - !ruby/object:Gem::Dependency
56
+ name: mongo
57
+ prerelease: false
58
+ requirement: &id003 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ hash: 21
64
+ segments:
65
+ - 1
66
+ - 0
67
+ - 1
68
+ version: 1.0.1
69
+ type: :runtime
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: bson
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ hash: 21
80
+ segments:
81
+ - 1
82
+ - 0
83
+ - 1
84
+ version: 1.0.1
85
+ type: :runtime
86
+ version_requirements: *id004
87
+ - !ruby/object:Gem::Dependency
88
+ name: rspec
89
+ prerelease: false
90
+ requirement: &id005 !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - "="
94
+ - !ruby/object:Gem::Version
95
+ hash: 62196467
96
+ segments:
97
+ - 2
98
+ - 0
99
+ - 0
100
+ - beta
101
+ - 8
102
+ version: 2.0.0.beta.8
103
+ type: :development
104
+ version_requirements: *id005
105
+ - !ruby/object:Gem::Dependency
106
+ name: mocha
107
+ prerelease: false
108
+ requirement: &id006 !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - "="
112
+ - !ruby/object:Gem::Version
113
+ hash: 43
114
+ segments:
115
+ - 0
116
+ - 9
117
+ - 8
118
+ version: 0.9.8
119
+ type: :development
120
+ version_requirements: *id006
121
+ description: Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.
122
+ email:
123
+ - durran@gmail.com
124
+ executables: []
125
+
126
+ extensions: []
127
+
128
+ extra_rdoc_files: []
129
+
130
+ files:
131
+ - lib/mongoid/associations/embedded_in.rb
132
+ - lib/mongoid/associations/embeds_many.rb
133
+ - lib/mongoid/associations/embeds_one.rb
134
+ - lib/mongoid/associations/foreign_key.rb
135
+ - lib/mongoid/associations/meta_data.rb
136
+ - lib/mongoid/associations/options.rb
137
+ - lib/mongoid/associations/proxy.rb
138
+ - lib/mongoid/associations/referenced_in.rb
139
+ - lib/mongoid/associations/references_many.rb
140
+ - lib/mongoid/associations/references_many_as_array.rb
141
+ - lib/mongoid/associations/references_one.rb
142
+ - lib/mongoid/associations.rb
143
+ - lib/mongoid/attributes.rb
144
+ - lib/mongoid/callbacks.rb
145
+ - lib/mongoid/collection.rb
146
+ - lib/mongoid/collections/cyclic_iterator.rb
147
+ - lib/mongoid/collections/master.rb
148
+ - lib/mongoid/collections/operations.rb
149
+ - lib/mongoid/collections/slaves.rb
150
+ - lib/mongoid/collections.rb
151
+ - lib/mongoid/components.rb
152
+ - lib/mongoid/config.rb
153
+ - lib/mongoid/contexts/enumerable.rb
154
+ - lib/mongoid/contexts/ids.rb
155
+ - lib/mongoid/contexts/mongo.rb
156
+ - lib/mongoid/contexts/paging.rb
157
+ - lib/mongoid/contexts.rb
158
+ - lib/mongoid/criteria.rb
159
+ - lib/mongoid/criterion/complex.rb
160
+ - lib/mongoid/criterion/exclusion.rb
161
+ - lib/mongoid/criterion/inclusion.rb
162
+ - lib/mongoid/criterion/optional.rb
163
+ - lib/mongoid/cursor.rb
164
+ - lib/mongoid/deprecation.rb
165
+ - lib/mongoid/dirty.rb
166
+ - lib/mongoid/document.rb
167
+ - lib/mongoid/errors.rb
168
+ - lib/mongoid/extensions/array/accessors.rb
169
+ - lib/mongoid/extensions/array/aliasing.rb
170
+ - lib/mongoid/extensions/array/assimilation.rb
171
+ - lib/mongoid/extensions/array/conversions.rb
172
+ - lib/mongoid/extensions/array/parentization.rb
173
+ - lib/mongoid/extensions/big_decimal/conversions.rb
174
+ - lib/mongoid/extensions/binary/conversions.rb
175
+ - lib/mongoid/extensions/boolean/conversions.rb
176
+ - lib/mongoid/extensions/date/conversions.rb
177
+ - lib/mongoid/extensions/datetime/conversions.rb
178
+ - lib/mongoid/extensions/float/conversions.rb
179
+ - lib/mongoid/extensions/hash/accessors.rb
180
+ - lib/mongoid/extensions/hash/assimilation.rb
181
+ - lib/mongoid/extensions/hash/conversions.rb
182
+ - lib/mongoid/extensions/hash/criteria_helpers.rb
183
+ - lib/mongoid/extensions/hash/scoping.rb
184
+ - lib/mongoid/extensions/integer/conversions.rb
185
+ - lib/mongoid/extensions/nil/assimilation.rb
186
+ - lib/mongoid/extensions/object/conversions.rb
187
+ - lib/mongoid/extensions/objectid/conversions.rb
188
+ - lib/mongoid/extensions/proc/scoping.rb
189
+ - lib/mongoid/extensions/set/conversions.rb
190
+ - lib/mongoid/extensions/string/conversions.rb
191
+ - lib/mongoid/extensions/string/inflections.rb
192
+ - lib/mongoid/extensions/symbol/inflections.rb
193
+ - lib/mongoid/extensions/time_conversions.rb
194
+ - lib/mongoid/extensions.rb
195
+ - lib/mongoid/extras.rb
196
+ - lib/mongoid/factory.rb
197
+ - lib/mongoid/field.rb
198
+ - lib/mongoid/fields.rb
199
+ - lib/mongoid/finders.rb
200
+ - lib/mongoid/identity.rb
201
+ - lib/mongoid/indexes.rb
202
+ - lib/mongoid/javascript/functions.yml
203
+ - lib/mongoid/javascript.rb
204
+ - lib/mongoid/matchers/all.rb
205
+ - lib/mongoid/matchers/default.rb
206
+ - lib/mongoid/matchers/exists.rb
207
+ - lib/mongoid/matchers/gt.rb
208
+ - lib/mongoid/matchers/gte.rb
209
+ - lib/mongoid/matchers/in.rb
210
+ - lib/mongoid/matchers/lt.rb
211
+ - lib/mongoid/matchers/lte.rb
212
+ - lib/mongoid/matchers/ne.rb
213
+ - lib/mongoid/matchers/nin.rb
214
+ - lib/mongoid/matchers/size.rb
215
+ - lib/mongoid/matchers.rb
216
+ - lib/mongoid/memoization.rb
217
+ - lib/mongoid/named_scope.rb
218
+ - lib/mongoid/observable.rb
219
+ - lib/mongoid/paths.rb
220
+ - lib/mongoid/persistence/command.rb
221
+ - lib/mongoid/persistence/insert.rb
222
+ - lib/mongoid/persistence/insert_embedded.rb
223
+ - lib/mongoid/persistence/remove.rb
224
+ - lib/mongoid/persistence/remove_all.rb
225
+ - lib/mongoid/persistence/remove_embedded.rb
226
+ - lib/mongoid/persistence/update.rb
227
+ - lib/mongoid/persistence.rb
228
+ - lib/mongoid/railtie.rb
229
+ - lib/mongoid/railties/database.rake
230
+ - lib/mongoid/scope.rb
231
+ - lib/mongoid/state.rb
232
+ - lib/mongoid/timestamps.rb
233
+ - lib/mongoid/validations/associated.rb
234
+ - lib/mongoid/validations/locale/en.yml
235
+ - lib/mongoid/validations/uniqueness.rb
236
+ - lib/mongoid/validations.rb
237
+ - lib/mongoid/version.rb
238
+ - lib/mongoid/versioning.rb
239
+ - lib/mongoid.rb
240
+ - lib/rails/generators/mongoid/config/config_generator.rb
241
+ - lib/rails/generators/mongoid/config/templates/mongoid.yml
242
+ - lib/rails/generators/mongoid/model/model_generator.rb
243
+ - lib/rails/generators/mongoid/model/templates/model.rb
244
+ - lib/rails/generators/mongoid_generator.rb
245
+ - MIT_LICENSE
246
+ - README.rdoc
247
+ has_rdoc: true
248
+ homepage: http://mongoid.org
249
+ licenses: []
250
+
251
+ post_install_message:
252
+ rdoc_options: []
253
+
254
+ require_paths:
255
+ - lib
256
+ required_ruby_version: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ">="
260
+ - !ruby/object:Gem::Version
261
+ hash: 3
262
+ segments:
263
+ - 0
264
+ version: "0"
265
+ required_rubygems_version: !ruby/object:Gem::Requirement
266
+ none: false
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ hash: 23
271
+ segments:
272
+ - 1
273
+ - 3
274
+ - 6
275
+ version: 1.3.6
276
+ requirements: []
277
+
278
+ rubyforge_project: mongoid
279
+ rubygems_version: 1.3.7
280
+ signing_key:
281
+ specification_version: 3
282
+ summary: Elegent Persistance in Ruby for MongoDB.
283
+ test_files: []
284
+