mongoo 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -63,6 +63,7 @@ require "mongoo/base"
63
63
 
64
64
  require "mongoo/embedded/base"
65
65
  require "mongoo/embedded/hash_proxy"
66
+ require "mongoo/embedded/array_proxy"
66
67
 
67
68
  require "mongoo/mongohash"
68
69
  require "mongoo/identity_map"
@@ -12,20 +12,22 @@ module Mongoo::Attributes
12
12
  end
13
13
  end
14
14
 
15
- def attributes_tree
15
+ def attributes_tree(tree_opts={})
16
16
  tree = {}
17
17
  self.attributes.each do |name, opts|
18
- parts = name.split(".")
19
- curr_branch = tree
20
- while part = parts.shift
21
- if !parts.empty?
22
- curr_branch[part.to_s] ||= {}
23
- curr_branch = curr_branch[part.to_s]
24
- else
25
- curr_branch[part.to_s] = opts[:type]
18
+ unless tree_opts[:only_definable] == true && opts[:define_methods] == false
19
+ parts = name.split(".")
20
+ curr_branch = tree
21
+ while part = parts.shift
22
+ if !parts.empty?
23
+ curr_branch[part.to_s] ||= {}
24
+ curr_branch = curr_branch[part.to_s]
25
+ else
26
+ curr_branch[part.to_s] = opts[:type]
27
+ end
26
28
  end
27
- end
28
- end
29
+ end # unless
30
+ end # self.attributes
29
31
  tree
30
32
  end
31
33
 
@@ -8,7 +8,7 @@ module Mongoo
8
8
  end
9
9
 
10
10
  def define_attribute_methods
11
- @klass.attributes_tree.each do |name, val|
11
+ @klass.attributes_tree(only_definable: true).each do |name, val|
12
12
  if val.is_a?(Hash)
13
13
  blk = Proc.new { Mongoo::AttributeProxy.new(val, [name], self) }
14
14
  @klass.send(:define_method, name, &blk)
@@ -0,0 +1,71 @@
1
+ module Mongoo
2
+ module Embedded
3
+ class ArrayProxy
4
+
5
+ def initialize(doc, array, klass)
6
+ @doc = doc
7
+ @array = array
8
+ @klass = klass
9
+ end
10
+
11
+ def build(hash, i=nil)
12
+ @klass.new(@doc, hash, i)
13
+ end
14
+
15
+ def raw
16
+ @array
17
+ end
18
+
19
+ def [](i)
20
+ build raw[i], i
21
+ end
22
+
23
+ def delete_at(i)
24
+ raw.delete_at(i)
25
+ end
26
+
27
+ def []=(i,o)
28
+ raw[i] = o.to_hash
29
+ end
30
+
31
+ def each
32
+ raw.each_with_index { |v,i| yield(i, build(v, i)) }
33
+ end
34
+
35
+ def size
36
+ raw.size
37
+ end
38
+
39
+ def keys
40
+ (0..size-1).to_a
41
+ end
42
+
43
+ def first
44
+ raw.first
45
+ end
46
+
47
+ def last
48
+ raw.last
49
+ end
50
+
51
+ def all
52
+ raw
53
+ end
54
+
55
+ alias :to_a :all
56
+
57
+ def push(obj)
58
+ raw << obj.to_hash; raw.index(obj.to_hash)
59
+ end
60
+
61
+ def <<(obj)
62
+ push(obj.to_hash)
63
+ end
64
+
65
+ def empty?
66
+ raw.empty?
67
+ end
68
+
69
+ end # ArrayProxy
70
+ end # Embedded
71
+ end # Mongoo
@@ -11,6 +11,10 @@ module Mongoo
11
11
  Mongoo::Embedded::HashProxy.new(self, attrib, klass)
12
12
  end
13
13
 
14
+ def embedded_array_proxy(attrib, klass)
15
+ Mongoo::Embedded::ArrayProxy.new(self, attrib, klass)
16
+ end
17
+
14
18
  def embedded_doc(attrib, klass)
15
19
  klass.new(self, attrib)
16
20
  end
@@ -12,17 +12,26 @@ module Mongoo
12
12
  end
13
13
 
14
14
  def define_embeds_many_method(attrib_key, opts)
15
+ embed_type = opts[:type]
16
+ embed_type ||= :hash
17
+
15
18
  as = attrib_key
16
- attrib_key = "embedded_#{attrib_key}"
19
+ attrib_key = "#{attrib_key}"
17
20
 
18
- attribute(attrib_key, :type => :hash)
21
+ attribute(attrib_key, :type => embed_type, :define_methods => false)
19
22
 
20
23
  blk = Proc.new {
21
24
  if val = instance_variable_get("@#{as}")
22
25
  val
23
26
  else
24
- instance_variable_set("@#{as}",
25
- embedded_hash_proxy(get_or_set(attrib_key,{}), eval(opts[:class])))
27
+ case embed_type
28
+ when :hash then
29
+ instance_variable_set("@#{as}",
30
+ embedded_hash_proxy(get_or_set(attrib_key,{}), eval(opts[:class])))
31
+ when :array then
32
+ instance_variable_set("@#{as}",
33
+ embedded_array_proxy(get_or_set(attrib_key,[]), eval(opts[:class])))
34
+ end
26
35
  end
27
36
  }
28
37
  @klass.send(:define_method, as, &blk)
@@ -45,9 +54,9 @@ module Mongoo
45
54
 
46
55
  def define_embeds_one_method(attrib_key, opts)
47
56
  as = attrib_key
48
- attrib_key = "embedded_#{attrib_key}"
57
+ attrib_key = "#{attrib_key}"
49
58
 
50
- attribute(attrib_key, :type => :hash)
59
+ attribute(attrib_key, :type => :hash, :define_methods => false)
51
60
 
52
61
  blk = Proc.new {
53
62
  if val = instance_variable_get("@#{as}")
@@ -10,15 +10,14 @@ module Mongoo
10
10
  end
11
11
 
12
12
  def define_grid_fs_file_method(name, opts)
13
- attrib_name = "gridfs_#{name}"
14
- attribute(attrib_name, :type => :hash)
13
+ attribute(name, :type => :hash, :define_methods => false)
15
14
 
16
15
  blk = Proc.new {
17
16
  if file = instance_variable_get("@#{name}")
18
17
  file
19
18
  else
20
19
  db_lambda = opts[:db] || lambda { self.db }
21
- container = get_or_set(attrib_name, {})
20
+ container = get_or_set(name, {})
22
21
  file = Mongoo::GridFs::File.new(container, db_lambda)
23
22
  instance_variable_set("@#{name}", file)
24
23
  end
@@ -27,15 +26,14 @@ module Mongoo
27
26
  end # define_grid_fs_file_methods
28
27
 
29
28
  def define_grid_fs_files_method(name, opts)
30
- attrib_name = "gridfs_#{name}"
31
- attribute(attrib_name, :type => :hash)
29
+ attribute(name, :type => :hash, :define_methods => false)
32
30
 
33
31
  blk = Proc.new {
34
32
  if files = instance_variable_get("@#{name}")
35
33
  files
36
34
  else
37
35
  db_lambda = opts[:db] || lambda { self.db }
38
- container = get_or_set(attrib_name, {})
36
+ container = get_or_set(name, {})
39
37
  files = Mongoo::GridFs::Files.new(container, db_lambda)
40
38
  instance_variable_set("@#{name}", files)
41
39
  end
@@ -24,16 +24,22 @@ module Mongoo
24
24
  end
25
25
  end
26
26
 
27
+ def cast_value(v)
28
+ if v.is_a?(Mongoo::Embedded::Base)
29
+ return v.to_hash
30
+ end; v
31
+ end
32
+
27
33
  def inc(k, v=1)
28
34
  v = sanitize_value(k,v)
29
35
  @queue["$inc"] ||= {}
30
- @queue["$inc"]["#{@key_prefix}#{k}"] = v
36
+ @queue["$inc"]["#{@key_prefix}#{k}"] = cast_value(v)
31
37
  end
32
38
 
33
39
  def set(k,v)
34
40
  v = sanitize_value(k,v)
35
41
  @queue["$set"] ||= {}
36
- @queue["$set"]["#{@key_prefix}#{k}"] = v
42
+ @queue["$set"]["#{@key_prefix}#{k}"] = cast_value(v)
37
43
  end
38
44
 
39
45
  def unset(k)
@@ -43,17 +49,17 @@ module Mongoo
43
49
 
44
50
  def push(k, v)
45
51
  @queue["$push"] ||= {}
46
- @queue["$push"]["#{@key_prefix}#{k}"] = v
52
+ @queue["$push"]["#{@key_prefix}#{k}"] = cast_value(v)
47
53
  end
48
54
 
49
55
  def push_all(k, v)
50
56
  @queue["$pushAll"] ||= {}
51
- @queue["$pushAll"]["#{@key_prefix}#{k}"] = v
57
+ @queue["$pushAll"]["#{@key_prefix}#{k}"] = cast_value(v)
52
58
  end
53
59
 
54
60
  def add_to_set(k,v)
55
61
  @queue["$addToSet"] ||= {}
56
- @queue["$addToSet"]["#{@key_prefix}#{k}"] = v
62
+ @queue["$addToSet"]["#{@key_prefix}#{k}"] = cast_value(v)
57
63
  end
58
64
 
59
65
  def pop(k)
@@ -63,12 +69,12 @@ module Mongoo
63
69
 
64
70
  def pull(k, v)
65
71
  @queue["$pull"] ||= {}
66
- @queue["$pull"]["#{@key_prefix}#{k}"] = v
72
+ @queue["$pull"]["#{@key_prefix}#{k}"] = cast_value(v)
67
73
  end
68
74
 
69
75
  def pull_all(k, v)
70
76
  @queue["$pullAll"] ||= {}
71
- @queue["$pullAll"]["#{@key_prefix}#{k}"] = v
77
+ @queue["$pullAll"]["#{@key_prefix}#{k}"] = cast_value(v)
72
78
  end
73
79
 
74
80
  def run!
@@ -112,35 +118,71 @@ module Mongoo
112
118
  @doc.mongohash.dot_delete( k )
113
119
  @doc.persisted_mongohash.dot_delete( k )
114
120
  when "$push" then
115
- new_val = (@doc.persisted_mongohash.dot_get(k) || []) + [v]
116
- @doc.mongohash.dot_set( k, new_val )
117
- @doc.persisted_mongohash.dot_set( k, new_val )
121
+ unless @doc.persisted_mongohash.dot_get(k)
122
+ @doc.persisted_mongohash.dot_set(k, [])
123
+ end
124
+ unless @doc.mongohash.dot_get(k)
125
+ @doc.mongohash.dot_set(k, [])
126
+ end
127
+
128
+ @doc.persisted_mongohash.dot_get(k) << v
129
+ @doc.mongohash.dot_get(k) << v
118
130
  when "$pushAll" then
119
- new_val = (@doc.persisted_mongohash.dot_get(k) || []) + v
120
- @doc.mongohash.dot_set( k, new_val )
121
- @doc.persisted_mongohash.dot_set( k, new_val )
131
+ unless @doc.persisted_mongohash.dot_get(k)
132
+ @doc.persisted_mongohash.dot_set(k, [])
133
+ end
134
+ unless @doc.mongohash.dot_get(k)
135
+ @doc.mongohash.dot_set(k, [])
136
+ end
137
+
138
+ @doc.persisted_mongohash.dot_get(k).concat(v)
139
+ @doc.mongohash.dot_get(k).concat(v)
122
140
  when "$addToSet" then
123
- new_val = (@doc.persisted_mongohash.dot_get(k) || [])
124
- new_val << v unless new_val.include?(v)
125
- @doc.mongohash.dot_set(k, new_val)
126
- @doc.persisted_mongohash.dot_set(k, new_val)
141
+ unless @doc.persisted_mongohash.dot_get(k)
142
+ @doc.persisted_mongohash.dot_set(k, [])
143
+ end
144
+ unless @doc.mongohash.dot_get(k)
145
+ @doc.mongohash.dot_set(k, [])
146
+ end
147
+
148
+ unless @doc.persisted_mongohash.dot_get(k).include?(v)
149
+ @doc.persisted_mongohash.dot_get(k) << v
150
+ end
151
+ unless @doc.mongohash.dot_get(k).include?(v)
152
+ @doc.mongohash.dot_get(k) << v
153
+ end
127
154
  when "$pop" then
128
- new_val = (@doc.persisted_mongohash.dot_get(k) || [])
129
- new_val.pop
130
- @doc.mongohash.dot_set(k, new_val)
131
- @doc.persisted_mongohash.dot_set(k, new_val)
155
+ unless @doc.persisted_mongohash.dot_get(k)
156
+ @doc.persisted_mongohash.dot_set(k, [])
157
+ end
158
+ unless @doc.mongohash.dot_get(k)
159
+ @doc.mongohash.dot_set(k, [])
160
+ end
161
+
162
+ @doc.persisted_mongohash.dot_get(k).pop
163
+ @doc.mongohash.dot_get(k).pop
132
164
  when "$pull" then
133
- new_val = (@doc.persisted_mongohash.dot_get(k) || [])
134
- new_val.delete(v)
135
- @doc.mongohash.dot_set(k, new_val)
136
- @doc.persisted_mongohash.dot_set(k, new_val)
165
+ unless @doc.persisted_mongohash.dot_get(k)
166
+ @doc.persisted_mongohash.dot_set(k, [])
167
+ end
168
+ unless @doc.mongohash.dot_get(k)
169
+ @doc.mongohash.dot_set(k, [])
170
+ end
171
+
172
+ @doc.persisted_mongohash.dot_get(k).delete(v)
173
+ @doc.mongohash.dot_get(k).delete(v)
137
174
  when "$pullAll" then
138
- new_val = (@doc.persisted_mongohash.dot_get(k) || [])
175
+ unless @doc.persisted_mongohash.dot_get(k)
176
+ @doc.persisted_mongohash.dot_set(k, [])
177
+ end
178
+ unless @doc.mongohash.dot_get(k)
179
+ @doc.mongohash.dot_set(k, [])
180
+ end
181
+
139
182
  v.each do |val|
140
- new_val.delete(val)
183
+ @doc.persisted_mongohash.dot_get(k).delete(val)
184
+ @doc.mongohash.dot_get(k).delete(val)
141
185
  end
142
- @doc.mongohash.dot_set(k, new_val)
143
- @doc.persisted_mongohash.dot_set(k, new_val)
144
186
  end
145
187
  end
146
188
  end # @queue.each
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoo}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Myles"]
12
- s.date = %q{2011-06-15}
12
+ s.date = %q{2011-06-16}
13
13
  s.description = %q{Simple object mapper for MongoDB}
14
14
  s.email = %q{ben.myles@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
35
35
  "lib/mongoo/core.rb",
36
36
  "lib/mongoo/cursor.rb",
37
37
  "lib/mongoo/describe_dsl.rb",
38
+ "lib/mongoo/embedded/array_proxy.rb",
38
39
  "lib/mongoo/embedded/base.rb",
39
40
  "lib/mongoo/embedded/core_mixin.rb",
40
41
  "lib/mongoo/embedded/describe_dsl.rb",
@@ -1,5 +1,19 @@
1
1
  require 'helper'
2
2
 
3
+ class Customer < Mongoo::Base
4
+ describe do |d|
5
+ d.attribute "name", :type => :string
6
+ d.embeds_many "addresses", :class => "Customer::Address", :type => :array
7
+ end
8
+ end
9
+
10
+ class Customer::Address < Mongoo::Embedded::Base
11
+ describe do |d|
12
+ d.attribute "street", :type => :string
13
+ d.attribute "city", :type => :string
14
+ end
15
+ end
16
+
3
17
  class Book < Mongoo::Base
4
18
  describe do |d|
5
19
  d.attribute "title", :type => :string
@@ -45,6 +59,7 @@ end
45
59
  class TestEmbedded < Test::Unit::TestCase
46
60
  def setup
47
61
  Book.collection.drop
62
+ Customer.collection.drop
48
63
  end
49
64
 
50
65
  should "be able to work with embedded doc hashes" do
@@ -71,11 +86,11 @@ class TestEmbedded < Test::Unit::TestCase
71
86
  b = Book.new(title: "BASE Jumping Basics")
72
87
  b.sample_chapter = Book::Chapter.new(b, {})
73
88
  b.sample_chapter.title = "Understanding the Risks"
74
- assert_equal "Understanding the Risks", b.g('embedded_sample_chapter')['title']
89
+ assert_equal "Understanding the Risks", b.g('sample_chapter')['title']
75
90
  b.insert!
76
91
  b = Book.find_one(b.id)
77
92
  assert_equal "Understanding the Risks", b.sample_chapter.title
78
- assert_equal "Understanding the Risks", b.g('embedded_sample_chapter')['title']
93
+ assert_equal "Understanding the Risks", b.g('sample_chapter')['title']
79
94
  end
80
95
 
81
96
  should "validate embedded docs and can have nested embeds" do
@@ -85,7 +100,7 @@ class TestEmbedded < Test::Unit::TestCase
85
100
  purchase_id = BSON::ObjectId.new.to_s
86
101
  b.purchases[purchase_id] = b.purchases.build({})
87
102
  assert !b.valid?
88
- assert_equal({:"embedded_purchases.#{purchase_id}.payment_type"=>["can't be blank"]}, b.errors)
103
+ assert_equal({:"purchases.#{purchase_id}.payment_type"=>["can't be blank"]}, b.errors)
89
104
  b.purchases[purchase_id].payment_type = "Cash"
90
105
  assert b.valid?
91
106
  b.update!
@@ -96,14 +111,14 @@ class TestEmbedded < Test::Unit::TestCase
96
111
  b.purchases[purchase_id].customer = Book::Purchase::Customer.new(b.purchases[purchase_id], name: "Jiminy")
97
112
  assert_equal "Jiminy", b.purchases[purchase_id].customer.name
98
113
  assert !b.valid?
99
- assert_equal({:"embedded_purchases.#{purchase_id}.embedded_customer.phone"=>["can't be blank"]}, b.errors)
114
+ assert_equal({:"purchases.#{purchase_id}.customer.phone"=>["can't be blank"]}, b.errors)
100
115
  b.purchases[purchase_id].customer.phone = "123"
101
116
  assert b.valid?
102
117
  b.update!
103
118
  b = Book.find_one(b.id)
104
119
  assert_equal "Jiminy", b.purchases[purchase_id].customer.name
105
120
  b.purchases[purchase_id].customer = nil
106
- assert_equal [[:unset, "embedded_purchases.#{purchase_id}.embedded_customer", 1]], b.changelog
121
+ assert_equal [[:unset, "purchases.#{purchase_id}.customer", 1]], b.changelog
107
122
  b.update!
108
123
  b = Book.find_one(b.id)
109
124
  assert_nil b.purchases[purchase_id].customer
@@ -183,4 +198,46 @@ class TestEmbedded < Test::Unit::TestCase
183
198
  assert_nothing_raised { BSON::ObjectId(key) }
184
199
  assert_equal doc, b.purchases[key]
185
200
  end
201
+
202
+ should "be able to have an embedded array doc" do
203
+ c = Customer.new(name: "Ben")
204
+ assert c.addresses.empty?
205
+ c.insert!
206
+
207
+ address = c.addresses.build(street: "123 Street", city: "Metropolis")
208
+ c.addresses << address
209
+ assert_equal address, c.addresses.first
210
+ assert_equal address, c.addresses[0]
211
+ assert_equal 1, c.addresses.size
212
+
213
+ c.update!
214
+ assert_equal address, c.addresses.first
215
+ assert_equal address, c.addresses[0]
216
+ assert_equal 1, c.addresses.size
217
+ c = Customer.find_one(c.id)
218
+ assert_equal address, c.addresses.first
219
+ assert_equal address, c.addresses[0]
220
+ assert_equal 1, c.addresses.size
221
+
222
+ market_st = c.addresses.build(street: "Market Street", city: "San Francisco")
223
+ c.mod! do |m|
224
+ m.push "addresses", market_st.to_hash
225
+ end
226
+
227
+ assert_equal 2, c.addresses.size
228
+ assert_equal market_st, c.addresses.last
229
+ c = Customer.find_one(c.id)
230
+ assert_equal address, c.addresses.first
231
+ assert_equal address, c.addresses[0]
232
+ assert_equal 2, c.addresses.size
233
+ assert_equal market_st, c.addresses[1]
234
+ assert_equal market_st, c.addresses.last
235
+
236
+ c.mod! do |m|
237
+ m.pull 'addresses', market_st
238
+ end
239
+
240
+ assert_equal 1, c.addresses.size
241
+ assert_equal [address], c.addresses.to_a
242
+ end
186
243
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-15 00:00:00.000000000 -07:00
12
+ date: 2011-06-16 00:00:00.000000000 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n
17
- requirement: &2151903140 !ruby/object:Gem::Requirement
17
+ requirement: &2151897700 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.4.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2151903140
25
+ version_requirements: *2151897700
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activesupport
28
- requirement: &2151900000 !ruby/object:Gem::Requirement
28
+ requirement: &2151896280 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.0.3
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2151900000
36
+ version_requirements: *2151896280
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activemodel
39
- requirement: &2151898100 !ruby/object:Gem::Requirement
39
+ requirement: &2151894080 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.0.3
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2151898100
47
+ version_requirements: *2151894080
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: mongo
50
- requirement: &2151896120 !ruby/object:Gem::Requirement
50
+ requirement: &2151892200 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.3.1
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2151896120
58
+ version_requirements: *2151892200
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: ruby-debug19
61
- requirement: &2151894800 !ruby/object:Gem::Requirement
61
+ requirement: &2151889420 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2151894800
69
+ version_requirements: *2151889420
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: shoulda
72
- requirement: &2151893220 !ruby/object:Gem::Requirement
72
+ requirement: &2151888040 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2151893220
80
+ version_requirements: *2151888040
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: bundler
83
- requirement: &2151890660 !ruby/object:Gem::Requirement
83
+ requirement: &2151885940 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.0.0
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2151890660
91
+ version_requirements: *2151885940
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: jeweler
94
- requirement: &2151888260 !ruby/object:Gem::Requirement
94
+ requirement: &2151883000 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 1.5.1
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *2151888260
102
+ version_requirements: *2151883000
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rcov
105
- requirement: &2151886260 !ruby/object:Gem::Requirement
105
+ requirement: &2151879760 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *2151886260
113
+ version_requirements: *2151879760
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: perftools.rb
116
- requirement: &2151884580 !ruby/object:Gem::Requirement
116
+ requirement: &2151877780 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: '0'
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *2151884580
124
+ version_requirements: *2151877780
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bson_ext
127
- requirement: &2151882580 !ruby/object:Gem::Requirement
127
+ requirement: &2151876520 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ~>
@@ -132,7 +132,7 @@ dependencies:
132
132
  version: 1.3.1
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *2151882580
135
+ version_requirements: *2151876520
136
136
  description: Simple object mapper for MongoDB
137
137
  email: ben.myles@gmail.com
138
138
  executables: []
@@ -159,6 +159,7 @@ files:
159
159
  - lib/mongoo/core.rb
160
160
  - lib/mongoo/cursor.rb
161
161
  - lib/mongoo/describe_dsl.rb
162
+ - lib/mongoo/embedded/array_proxy.rb
162
163
  - lib/mongoo/embedded/base.rb
163
164
  - lib/mongoo/embedded/core_mixin.rb
164
165
  - lib/mongoo/embedded/describe_dsl.rb
@@ -196,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
197
  version: '0'
197
198
  segments:
198
199
  - 0
199
- hash: -1842464465711727650
200
+ hash: 2808617450618615822
200
201
  required_rubygems_version: !ruby/object:Gem::Requirement
201
202
  none: false
202
203
  requirements: