mongoid 1.1.4 → 1.2.0
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.
- data/HISTORY +69 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/mongoid.rb +39 -13
- data/lib/mongoid/associations.rb +1 -0
- data/lib/mongoid/associations/has_many.rb +19 -3
- data/lib/mongoid/attributes.rb +6 -1
- data/lib/mongoid/collection.rb +106 -0
- data/lib/mongoid/collections/cyclic_iterator.rb +34 -0
- data/lib/mongoid/collections/master.rb +28 -0
- data/lib/mongoid/collections/mimic.rb +46 -0
- data/lib/mongoid/collections/operations.rb +39 -0
- data/lib/mongoid/collections/slaves.rb +44 -0
- data/lib/mongoid/commands.rb +1 -0
- data/lib/mongoid/config.rb +61 -9
- data/lib/mongoid/contexts/enumerable.rb +24 -15
- data/lib/mongoid/contexts/mongo.rb +25 -31
- data/lib/mongoid/contexts/paging.rb +2 -2
- data/lib/mongoid/criteria.rb +48 -7
- data/lib/mongoid/criterion/exclusion.rb +2 -0
- data/lib/mongoid/criterion/optional.rb +2 -2
- data/lib/mongoid/cursor.rb +82 -0
- data/lib/mongoid/document.rb +12 -13
- data/lib/mongoid/errors.rb +35 -4
- data/lib/mongoid/extensions.rb +1 -0
- data/lib/mongoid/extensions/array/aliasing.rb +4 -0
- data/lib/mongoid/extensions/string/inflections.rb +44 -1
- data/lib/mongoid/factory.rb +17 -0
- data/lib/mongoid/finders.rb +7 -2
- data/lib/mongoid/matchers/default.rb +6 -0
- data/lib/mongoid/matchers/gt.rb +1 -1
- data/lib/mongoid/matchers/gte.rb +1 -1
- data/lib/mongoid/matchers/lt.rb +1 -1
- data/lib/mongoid/matchers/lte.rb +1 -1
- data/mongoid.gemspec +30 -5
- data/perf/benchmark.rb +5 -3
- data/spec/integration/mongoid/associations_spec.rb +12 -0
- data/spec/integration/mongoid/contexts/enumerable_spec.rb +20 -0
- data/spec/integration/mongoid/criteria_spec.rb +28 -0
- data/spec/integration/mongoid/document_spec.rb +1 -1
- data/spec/integration/mongoid/inheritance_spec.rb +2 -2
- data/spec/models/person.rb +1 -1
- data/spec/spec_helper.rb +9 -4
- data/spec/unit/mongoid/associations/has_many_spec.rb +19 -0
- data/spec/unit/mongoid/associations_spec.rb +9 -0
- data/spec/unit/mongoid/attributes_spec.rb +4 -4
- data/spec/unit/mongoid/collection_spec.rb +113 -0
- data/spec/unit/mongoid/collections/cyclic_iterator_spec.rb +75 -0
- data/spec/unit/mongoid/collections/master_spec.rb +41 -0
- data/spec/unit/mongoid/collections/mimic_spec.rb +43 -0
- data/spec/unit/mongoid/collections/slaves_spec.rb +81 -0
- data/spec/unit/mongoid/commands_spec.rb +7 -0
- data/spec/unit/mongoid/config_spec.rb +52 -1
- data/spec/unit/mongoid/contexts/enumerable_spec.rb +38 -12
- data/spec/unit/mongoid/contexts/mongo_spec.rb +38 -31
- data/spec/unit/mongoid/criteria_spec.rb +20 -12
- data/spec/unit/mongoid/criterion/exclusion_spec.rb +26 -0
- data/spec/unit/mongoid/criterion/optional_spec.rb +13 -0
- data/spec/unit/mongoid/cursor_spec.rb +74 -0
- data/spec/unit/mongoid/document_spec.rb +4 -5
- data/spec/unit/mongoid/errors_spec.rb +5 -9
- data/spec/unit/mongoid/extensions/string/inflections_spec.rb +21 -2
- data/spec/unit/mongoid/factory_spec.rb +16 -0
- data/spec/unit/mongoid_spec.rb +4 -4
- metadata +28 -3
@@ -54,8 +54,8 @@ module Mongoid #:nodoc:
|
|
54
54
|
# Returns the offset option. If a per_page option is in the list then it
|
55
55
|
# will replace it with a skip parameter and return the same value. Defaults
|
56
56
|
# to 20 if nothing was provided.
|
57
|
-
def offset
|
58
|
-
@options[:skip]
|
57
|
+
def offset(*args)
|
58
|
+
args.size > 0 ? skip(args.first) : @options[:skip]
|
59
59
|
end
|
60
60
|
|
61
61
|
# Adds a criterion to the +Criteria+ that specifies the sort order of
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Mongoid #:nodoc
|
3
|
+
class Cursor
|
4
|
+
include Enumerable
|
5
|
+
# Operations on the Mongo::Cursor object that will not get overriden by the
|
6
|
+
# Mongoid::Cursor are defined here.
|
7
|
+
OPERATIONS = [
|
8
|
+
:admin,
|
9
|
+
:close,
|
10
|
+
:closed?,
|
11
|
+
:count,
|
12
|
+
:explain,
|
13
|
+
:fields,
|
14
|
+
:full_collection_name,
|
15
|
+
:hint,
|
16
|
+
:limit,
|
17
|
+
:order,
|
18
|
+
:query_options_hash,
|
19
|
+
:query_opts,
|
20
|
+
:selector,
|
21
|
+
:skip,
|
22
|
+
:snapshot,
|
23
|
+
:sort,
|
24
|
+
:timeout
|
25
|
+
]
|
26
|
+
|
27
|
+
attr_reader :collection
|
28
|
+
|
29
|
+
# The operations above will all delegate to the proxied Mongo::Cursor.
|
30
|
+
#
|
31
|
+
# Example:
|
32
|
+
#
|
33
|
+
# <tt>cursor.close</tt>
|
34
|
+
OPERATIONS.each do |name|
|
35
|
+
define_method(name) { |*args| @cursor.send(name, *args) }
|
36
|
+
end
|
37
|
+
|
38
|
+
# Iterate over each document in the cursor and yield to it.
|
39
|
+
#
|
40
|
+
# Example:
|
41
|
+
#
|
42
|
+
# <tt>cursor.each { |doc| p doc.title }</tt>
|
43
|
+
def each
|
44
|
+
@cursor.each do |document|
|
45
|
+
yield Mongoid::Factory.build(document)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Create the new +Mongoid::Cursor+.
|
50
|
+
#
|
51
|
+
# Options:
|
52
|
+
#
|
53
|
+
# collection: The Mongoid::Collection instance.
|
54
|
+
# cursor: The Mongo::Cursor to be proxied.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# <tt>Mongoid::Cursor.new(collection, cursor)</tt>
|
59
|
+
def initialize(collection, cursor)
|
60
|
+
@collection, @cursor = collection, cursor
|
61
|
+
end
|
62
|
+
|
63
|
+
# Return the next document in the cursor. Will instantiate a new Mongoid
|
64
|
+
# document with the attributes.
|
65
|
+
#
|
66
|
+
# Example:
|
67
|
+
#
|
68
|
+
# <tt>cursor.next_document</tt>
|
69
|
+
def next_document
|
70
|
+
Mongoid::Factory.build(@cursor.next_document)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns an array of all the documents in the cursor.
|
74
|
+
#
|
75
|
+
# Example:
|
76
|
+
#
|
77
|
+
# <tt>cursor.to_a</tt>
|
78
|
+
def to_a
|
79
|
+
@cursor.to_a.collect { |attrs| Mongoid::Factory.build(attrs) }
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
data/lib/mongoid/document.rb
CHANGED
@@ -33,7 +33,7 @@ module Mongoid #:nodoc:
|
|
33
33
|
# Returns: <tt>Mongo::Collection</tt>
|
34
34
|
def collection
|
35
35
|
raise Errors::InvalidCollection.new(self) if embedded
|
36
|
-
self._collection ||= Mongoid.
|
36
|
+
self._collection ||= Mongoid::Collection.new(self.collection_name)
|
37
37
|
add_indexes; self._collection
|
38
38
|
end
|
39
39
|
|
@@ -94,7 +94,7 @@ module Mongoid #:nodoc:
|
|
94
94
|
# <tt>Person.store_in :populdation</tt>
|
95
95
|
def store_in(name)
|
96
96
|
self.collection_name = name.to_s
|
97
|
-
self._collection = Mongoid.
|
97
|
+
self._collection = Mongoid::Collection.new(name.to_s)
|
98
98
|
end
|
99
99
|
|
100
100
|
# Returns all types to query for when using this class as the base.
|
@@ -170,14 +170,6 @@ module Mongoid #:nodoc:
|
|
170
170
|
identify
|
171
171
|
end
|
172
172
|
|
173
|
-
# apply default values to attributes - calling procs as required
|
174
|
-
def attributes_with_defaults(attributes = {})
|
175
|
-
default_values = defaults.merge(attributes)
|
176
|
-
default_values.each_pair do |key, val|
|
177
|
-
default_values[key] = val.call if val.respond_to?(:call)
|
178
|
-
end
|
179
|
-
end
|
180
|
-
|
181
173
|
# Returns the class name plus its attributes.
|
182
174
|
def inspect
|
183
175
|
attrs = fields.map { |name, field| "#{name}: #{@attributes[name].inspect}" } * ", "
|
@@ -262,7 +254,7 @@ module Mongoid #:nodoc:
|
|
262
254
|
# Example:
|
263
255
|
#
|
264
256
|
# <tt>person.to_json</tt>
|
265
|
-
def to_json(options=nil)
|
257
|
+
def to_json(options = nil)
|
266
258
|
attributes.to_json(options)
|
267
259
|
end
|
268
260
|
|
@@ -292,8 +284,15 @@ module Mongoid #:nodoc:
|
|
292
284
|
clear ? @attributes.delete(name) : @attributes.insert(name, attrs)
|
293
285
|
notify
|
294
286
|
end
|
295
|
-
end
|
296
287
|
|
288
|
+
protected
|
289
|
+
# apply default values to attributes - calling procs as required
|
290
|
+
def attributes_with_defaults(attributes = {})
|
291
|
+
default_values = defaults.merge(attributes)
|
292
|
+
default_values.each_pair do |key, val|
|
293
|
+
default_values[key] = val.call if val.respond_to?(:call)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
297
|
end
|
298
|
-
|
299
298
|
end
|
data/lib/mongoid/errors.rb
CHANGED
@@ -3,7 +3,12 @@ module Mongoid #:nodoc
|
|
3
3
|
module Errors #:nodoc
|
4
4
|
|
5
5
|
# Raised when querying the database for a document by a specific id which
|
6
|
-
# does not exist.
|
6
|
+
# does not exist. If multiple ids were passed then it will display all of
|
7
|
+
# those.
|
8
|
+
#
|
9
|
+
# Example:
|
10
|
+
#
|
11
|
+
# <tt>DocumentNotFound.new(Person, ["1", "2"])</tt>
|
7
12
|
class DocumentNotFound < RuntimeError
|
8
13
|
def initialize(klass, ids)
|
9
14
|
@klass, @identifier = klass, ids.is_a?(Array) ? ids.join(", ") : ids
|
@@ -14,12 +19,34 @@ module Mongoid #:nodoc
|
|
14
19
|
end
|
15
20
|
|
16
21
|
# Raised when invalid options are passed into a constructor or method.
|
22
|
+
#
|
23
|
+
# Example:
|
24
|
+
#
|
25
|
+
# <tt>InvalidOptions.new</tt>
|
17
26
|
class InvalidOptions < RuntimeError; end
|
18
27
|
|
19
|
-
# Raised when the database connection has not been set up
|
20
|
-
|
28
|
+
# Raised when the database connection has not been set up properly, either
|
29
|
+
# by attempting to set an object on the db that is not a +Mongo::DB+, or
|
30
|
+
# not setting anything at all.
|
31
|
+
#
|
32
|
+
# Example:
|
33
|
+
#
|
34
|
+
# <tt>InvalidDatabase.new("Not a DB")</tt>
|
35
|
+
class InvalidDatabase < RuntimeError
|
36
|
+
def initialize(database)
|
37
|
+
@database = database
|
38
|
+
end
|
39
|
+
def message
|
40
|
+
"Database should be a Mongo::DB, not #{@database.class.name}"
|
41
|
+
end
|
42
|
+
end
|
21
43
|
|
22
|
-
# Raised when a persisence method ending in ! fails validation.
|
44
|
+
# Raised when a persisence method ending in ! fails validation. The message
|
45
|
+
# will contain the full error messages from the +Document+ in question.
|
46
|
+
#
|
47
|
+
# Example:
|
48
|
+
#
|
49
|
+
# <tt>Validations.new(person.errors)</tt>
|
23
50
|
class Validations < RuntimeError
|
24
51
|
def initialize(errors)
|
25
52
|
@errors = errors
|
@@ -31,6 +58,10 @@ module Mongoid #:nodoc
|
|
31
58
|
|
32
59
|
# This error is raised when trying to access a Mongo::Collection from an
|
33
60
|
# embedded document.
|
61
|
+
#
|
62
|
+
# Example:
|
63
|
+
#
|
64
|
+
# <tt>InvalidCollection.new(Address)</tt>
|
34
65
|
class InvalidCollection < RuntimeError
|
35
66
|
def initialize(klass)
|
36
67
|
@klass = klass
|
data/lib/mongoid/extensions.rb
CHANGED
@@ -10,6 +10,44 @@ module Mongoid #:nodoc:
|
|
10
10
|
inflect.irregular("canvas", "canvases")
|
11
11
|
end
|
12
12
|
|
13
|
+
# Represents how special characters will get converted when creating a
|
14
|
+
# composite key that should be unique and part of a url.
|
15
|
+
CHAR_CONV = {
|
16
|
+
" " => "-",
|
17
|
+
"!" => "-excl-",
|
18
|
+
"\"" => "-bckslsh-",
|
19
|
+
"#" => "-hash-",
|
20
|
+
"$" => "-dol-",
|
21
|
+
"%" => "-perc-",
|
22
|
+
"&" => "-and-",
|
23
|
+
"'" => "-quo-",
|
24
|
+
"(" => "-oparen-",
|
25
|
+
")" => "-cparen-",
|
26
|
+
"*" => "-astx-",
|
27
|
+
"+" => "-plus-",
|
28
|
+
"," => "-comma-",
|
29
|
+
"-" => "-dash-",
|
30
|
+
"." => "-period-",
|
31
|
+
"/" => "-fwdslsh-",
|
32
|
+
":" => "-colon-",
|
33
|
+
";" => "-semicol-",
|
34
|
+
"<" => "-lt-",
|
35
|
+
"=" => "-eq-",
|
36
|
+
">" => "-gt-",
|
37
|
+
"?" => "-ques-",
|
38
|
+
"@" => "-at-",
|
39
|
+
"[" => "-obrck-",
|
40
|
+
"\\" => "-bckslsh-",
|
41
|
+
"]" => "-clbrck-",
|
42
|
+
"^" => "-carat-",
|
43
|
+
"_" => "-undscr-",
|
44
|
+
"`" => "-bcktick-",
|
45
|
+
"{" => "-ocurly-",
|
46
|
+
"|" => "-pipe-",
|
47
|
+
"}" => "-clcurly-",
|
48
|
+
"~" => "-tilda-"
|
49
|
+
}
|
50
|
+
|
13
51
|
REVERSALS = {
|
14
52
|
"asc" => "desc",
|
15
53
|
"ascending" => "descending",
|
@@ -22,7 +60,12 @@ module Mongoid #:nodoc:
|
|
22
60
|
end
|
23
61
|
|
24
62
|
def identify
|
25
|
-
|
63
|
+
if Mongoid.parameterize_keys
|
64
|
+
key = ""
|
65
|
+
each_char { |c| key += (CHAR_CONV[c] || c.downcase) }; key
|
66
|
+
else
|
67
|
+
self
|
68
|
+
end
|
26
69
|
end
|
27
70
|
|
28
71
|
def labelize
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Mongoid #:nodoc:
|
3
|
+
class Factory #:nodoc:
|
4
|
+
# Builds a new +Document+ from the supplied attributes.
|
5
|
+
#
|
6
|
+
# Example:
|
7
|
+
#
|
8
|
+
# <tt>Mongoid::Factory.build(Person, {})</tt>
|
9
|
+
#
|
10
|
+
# Options:
|
11
|
+
#
|
12
|
+
# attributes: The +Document+ attributes.
|
13
|
+
def self.build(attributes)
|
14
|
+
attributes["_type"].constantize.instantiate(attributes)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/mongoid/finders.rb
CHANGED
@@ -63,7 +63,7 @@ module Mongoid #:nodoc:
|
|
63
63
|
#
|
64
64
|
# <tt>Person.find_or_create_by(:attribute => "value")</tt>
|
65
65
|
def find_or_create_by(attrs = {})
|
66
|
-
|
66
|
+
find_or(:create, attrs)
|
67
67
|
end
|
68
68
|
|
69
69
|
# Find the first +Document+ given the conditions, or instantiates a new document
|
@@ -75,7 +75,7 @@ module Mongoid #:nodoc:
|
|
75
75
|
#
|
76
76
|
# <tt>Person.find_or_initialize_by(:attribute => "value")</tt>
|
77
77
|
def find_or_initialize_by(attrs = {})
|
78
|
-
|
78
|
+
find_or(:new, attrs)
|
79
79
|
end
|
80
80
|
|
81
81
|
# Find the first +Document+ given the conditions.
|
@@ -215,5 +215,10 @@ module Mongoid #:nodoc:
|
|
215
215
|
Criteria.new(self).where(selector)
|
216
216
|
end
|
217
217
|
|
218
|
+
protected
|
219
|
+
# Find the first object or create/initialize it.
|
220
|
+
def find_or(method, attrs = {})
|
221
|
+
first(:conditions => attrs) || send(method, attrs)
|
222
|
+
end
|
218
223
|
end
|
219
224
|
end
|
@@ -12,9 +12,15 @@ module Mongoid #:nodoc:
|
|
12
12
|
end
|
13
13
|
|
14
14
|
protected
|
15
|
+
# Return the first value in the hash.
|
15
16
|
def first(value)
|
16
17
|
value.values.first
|
17
18
|
end
|
19
|
+
|
20
|
+
# If object exists then compare, else return false
|
21
|
+
def determine(value, operator)
|
22
|
+
@attribute ? @attribute.send(operator, first(value)) : false
|
23
|
+
end
|
18
24
|
end
|
19
25
|
end
|
20
26
|
end
|
data/lib/mongoid/matchers/gt.rb
CHANGED
data/lib/mongoid/matchers/gte.rb
CHANGED
data/lib/mongoid/matchers/lt.rb
CHANGED
data/lib/mongoid/matchers/lte.rb
CHANGED
data/mongoid.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mongoid}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Durran Jordan"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-02-07}
|
13
13
|
s.email = %q{durran@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.rdoc"
|
@@ -35,6 +35,12 @@ Gem::Specification.new do |s|
|
|
35
35
|
"lib/mongoid/associations/proxy.rb",
|
36
36
|
"lib/mongoid/attributes.rb",
|
37
37
|
"lib/mongoid/callbacks.rb",
|
38
|
+
"lib/mongoid/collection.rb",
|
39
|
+
"lib/mongoid/collections/cyclic_iterator.rb",
|
40
|
+
"lib/mongoid/collections/master.rb",
|
41
|
+
"lib/mongoid/collections/mimic.rb",
|
42
|
+
"lib/mongoid/collections/operations.rb",
|
43
|
+
"lib/mongoid/collections/slaves.rb",
|
38
44
|
"lib/mongoid/commands.rb",
|
39
45
|
"lib/mongoid/commands/create.rb",
|
40
46
|
"lib/mongoid/commands/delete.rb",
|
@@ -54,10 +60,12 @@ Gem::Specification.new do |s|
|
|
54
60
|
"lib/mongoid/criterion/exclusion.rb",
|
55
61
|
"lib/mongoid/criterion/inclusion.rb",
|
56
62
|
"lib/mongoid/criterion/optional.rb",
|
63
|
+
"lib/mongoid/cursor.rb",
|
57
64
|
"lib/mongoid/document.rb",
|
58
65
|
"lib/mongoid/errors.rb",
|
59
66
|
"lib/mongoid/extensions.rb",
|
60
67
|
"lib/mongoid/extensions/array/accessors.rb",
|
68
|
+
"lib/mongoid/extensions/array/aliasing.rb",
|
61
69
|
"lib/mongoid/extensions/array/assimilation.rb",
|
62
70
|
"lib/mongoid/extensions/array/conversions.rb",
|
63
71
|
"lib/mongoid/extensions/array/parentization.rb",
|
@@ -78,6 +86,7 @@ Gem::Specification.new do |s|
|
|
78
86
|
"lib/mongoid/extensions/string/inflections.rb",
|
79
87
|
"lib/mongoid/extensions/symbol/inflections.rb",
|
80
88
|
"lib/mongoid/extensions/time/conversions.rb",
|
89
|
+
"lib/mongoid/factory.rb",
|
81
90
|
"lib/mongoid/field.rb",
|
82
91
|
"lib/mongoid/fields.rb",
|
83
92
|
"lib/mongoid/finders.rb",
|
@@ -105,6 +114,7 @@ Gem::Specification.new do |s|
|
|
105
114
|
"spec/integration/mongoid/associations_spec.rb",
|
106
115
|
"spec/integration/mongoid/attributes_spec.rb",
|
107
116
|
"spec/integration/mongoid/commands_spec.rb",
|
117
|
+
"spec/integration/mongoid/contexts/enumerable_spec.rb",
|
108
118
|
"spec/integration/mongoid/criteria_spec.rb",
|
109
119
|
"spec/integration/mongoid/document_spec.rb",
|
110
120
|
"spec/integration/mongoid/extensions_spec.rb",
|
@@ -142,6 +152,11 @@ Gem::Specification.new do |s|
|
|
142
152
|
"spec/unit/mongoid/associations_spec.rb",
|
143
153
|
"spec/unit/mongoid/attributes_spec.rb",
|
144
154
|
"spec/unit/mongoid/callbacks_spec.rb",
|
155
|
+
"spec/unit/mongoid/collection_spec.rb",
|
156
|
+
"spec/unit/mongoid/collections/cyclic_iterator_spec.rb",
|
157
|
+
"spec/unit/mongoid/collections/master_spec.rb",
|
158
|
+
"spec/unit/mongoid/collections/mimic_spec.rb",
|
159
|
+
"spec/unit/mongoid/collections/slaves_spec.rb",
|
145
160
|
"spec/unit/mongoid/commands/create_spec.rb",
|
146
161
|
"spec/unit/mongoid/commands/delete_all_spec.rb",
|
147
162
|
"spec/unit/mongoid/commands/delete_spec.rb",
|
@@ -157,6 +172,7 @@ Gem::Specification.new do |s|
|
|
157
172
|
"spec/unit/mongoid/criterion/exclusion_spec.rb",
|
158
173
|
"spec/unit/mongoid/criterion/inclusion_spec.rb",
|
159
174
|
"spec/unit/mongoid/criterion/optional_spec.rb",
|
175
|
+
"spec/unit/mongoid/cursor_spec.rb",
|
160
176
|
"spec/unit/mongoid/document_spec.rb",
|
161
177
|
"spec/unit/mongoid/errors_spec.rb",
|
162
178
|
"spec/unit/mongoid/extensions/array/accessors_spec.rb",
|
@@ -180,6 +196,7 @@ Gem::Specification.new do |s|
|
|
180
196
|
"spec/unit/mongoid/extensions/string/inflections_spec.rb",
|
181
197
|
"spec/unit/mongoid/extensions/symbol/inflections_spec.rb",
|
182
198
|
"spec/unit/mongoid/extensions/time/conversions_spec.rb",
|
199
|
+
"spec/unit/mongoid/factory_spec.rb",
|
183
200
|
"spec/unit/mongoid/field_spec.rb",
|
184
201
|
"spec/unit/mongoid/fields_spec.rb",
|
185
202
|
"spec/unit/mongoid/finders_spec.rb",
|
@@ -213,6 +230,7 @@ Gem::Specification.new do |s|
|
|
213
230
|
"spec/integration/mongoid/associations_spec.rb",
|
214
231
|
"spec/integration/mongoid/attributes_spec.rb",
|
215
232
|
"spec/integration/mongoid/commands_spec.rb",
|
233
|
+
"spec/integration/mongoid/contexts/enumerable_spec.rb",
|
216
234
|
"spec/integration/mongoid/criteria_spec.rb",
|
217
235
|
"spec/integration/mongoid/document_spec.rb",
|
218
236
|
"spec/integration/mongoid/extensions_spec.rb",
|
@@ -249,6 +267,11 @@ Gem::Specification.new do |s|
|
|
249
267
|
"spec/unit/mongoid/associations_spec.rb",
|
250
268
|
"spec/unit/mongoid/attributes_spec.rb",
|
251
269
|
"spec/unit/mongoid/callbacks_spec.rb",
|
270
|
+
"spec/unit/mongoid/collection_spec.rb",
|
271
|
+
"spec/unit/mongoid/collections/cyclic_iterator_spec.rb",
|
272
|
+
"spec/unit/mongoid/collections/master_spec.rb",
|
273
|
+
"spec/unit/mongoid/collections/mimic_spec.rb",
|
274
|
+
"spec/unit/mongoid/collections/slaves_spec.rb",
|
252
275
|
"spec/unit/mongoid/commands/create_spec.rb",
|
253
276
|
"spec/unit/mongoid/commands/delete_all_spec.rb",
|
254
277
|
"spec/unit/mongoid/commands/delete_spec.rb",
|
@@ -264,6 +287,7 @@ Gem::Specification.new do |s|
|
|
264
287
|
"spec/unit/mongoid/criterion/exclusion_spec.rb",
|
265
288
|
"spec/unit/mongoid/criterion/inclusion_spec.rb",
|
266
289
|
"spec/unit/mongoid/criterion/optional_spec.rb",
|
290
|
+
"spec/unit/mongoid/cursor_spec.rb",
|
267
291
|
"spec/unit/mongoid/document_spec.rb",
|
268
292
|
"spec/unit/mongoid/errors_spec.rb",
|
269
293
|
"spec/unit/mongoid/extensions/array/accessors_spec.rb",
|
@@ -287,6 +311,7 @@ Gem::Specification.new do |s|
|
|
287
311
|
"spec/unit/mongoid/extensions/string/inflections_spec.rb",
|
288
312
|
"spec/unit/mongoid/extensions/symbol/inflections_spec.rb",
|
289
313
|
"spec/unit/mongoid/extensions/time/conversions_spec.rb",
|
314
|
+
"spec/unit/mongoid/factory_spec.rb",
|
290
315
|
"spec/unit/mongoid/field_spec.rb",
|
291
316
|
"spec/unit/mongoid/fields_spec.rb",
|
292
317
|
"spec/unit/mongoid/finders_spec.rb",
|
@@ -320,14 +345,14 @@ Gem::Specification.new do |s|
|
|
320
345
|
s.add_runtime_dependency(%q<activesupport>, ["<= 2.3.5"])
|
321
346
|
s.add_runtime_dependency(%q<mongo>, [">= 0.18.2"])
|
322
347
|
s.add_runtime_dependency(%q<durran-validatable>, [">= 2.0.1"])
|
323
|
-
s.add_runtime_dependency(%q<
|
348
|
+
s.add_runtime_dependency(%q<will_paginate>, [">= 2.3.11"])
|
324
349
|
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
325
350
|
s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
|
326
351
|
else
|
327
352
|
s.add_dependency(%q<activesupport>, ["<= 2.3.5"])
|
328
353
|
s.add_dependency(%q<mongo>, [">= 0.18.2"])
|
329
354
|
s.add_dependency(%q<durran-validatable>, [">= 2.0.1"])
|
330
|
-
s.add_dependency(%q<
|
355
|
+
s.add_dependency(%q<will_paginate>, [">= 2.3.11"])
|
331
356
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
332
357
|
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
333
358
|
end
|
@@ -335,7 +360,7 @@ Gem::Specification.new do |s|
|
|
335
360
|
s.add_dependency(%q<activesupport>, ["<= 2.3.5"])
|
336
361
|
s.add_dependency(%q<mongo>, [">= 0.18.2"])
|
337
362
|
s.add_dependency(%q<durran-validatable>, [">= 2.0.1"])
|
338
|
-
s.add_dependency(%q<
|
363
|
+
s.add_dependency(%q<will_paginate>, [">= 2.3.11"])
|
339
364
|
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
340
365
|
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
341
366
|
end
|