mongoo 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mongoo/persistence.rb +3 -3
- data/mongoo.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/mongoo/persistence.rb
CHANGED
@@ -186,9 +186,9 @@ module Mongoo
|
|
186
186
|
return true if update_hash.empty?
|
187
187
|
update_query_hash = build_update_query_hash(persisted_mongohash.to_key_value, self.changelog)
|
188
188
|
if Mongoo.verbose_debug
|
189
|
-
puts "\n* update_query_hash: #{update_query_hash.
|
189
|
+
puts "\n* update_query_hash: #{update_query_hash.inspect}\n update_hash: #{update_hash.inspect}\n opts: #{opts.inspect}\n"
|
190
190
|
end
|
191
|
-
ret = self.collection.update(update_query_hash
|
191
|
+
ret = self.collection.update(update_query_hash, update_hash, opts)
|
192
192
|
if !ret.is_a?(Hash) || (ret["updatedExisting"] && ret["n"] == 1)
|
193
193
|
set_persisted_mongohash(mongohash)
|
194
194
|
@persisted = true
|
@@ -253,7 +253,7 @@ module Mongoo
|
|
253
253
|
protected :build_update_hash
|
254
254
|
|
255
255
|
def build_update_query_hash(persisted_mongohash_kv, changelog)
|
256
|
-
update_query_hash = {}
|
256
|
+
update_query_hash = { "_id" => get("_id") }
|
257
257
|
changelog.each do |op, k, v|
|
258
258
|
if persisted_val = persisted_mongohash_kv[k]
|
259
259
|
if persisted_val == []
|
data/mongoo.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mongoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ben Myles
|
@@ -197,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
197
|
requirements:
|
198
198
|
- - ">="
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
hash:
|
200
|
+
hash: -4412299614803515068
|
201
201
|
segments:
|
202
202
|
- 0
|
203
203
|
version: "0"
|