mongoo 0.4.0 → 0.4.1

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -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.merge({"_id" => get("_id")}).inspect}\n update_hash: #{update_hash.inspect}\n opts: #{opts.inspect}\n"
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.merge({"_id" => get("_id")}), update_hash, opts)
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoo}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
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"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mongoo
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.0
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: 2193445635464889624
200
+ hash: -4412299614803515068
201
201
  segments:
202
202
  - 0
203
203
  version: "0"