mongoo 0.4.7 → 0.4.8
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 +1 -0
- data/mongoo.gemspec +1 -1
- data/test/test_mongoo.rb +14 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.8
|
data/lib/mongoo/persistence.rb
CHANGED
data/mongoo.gemspec
CHANGED
data/test/test_mongoo.rb
CHANGED
@@ -413,5 +413,19 @@ class TestMongoo < Test::Unit::TestCase
|
|
413
413
|
assert_equal "Ben Myles", p.name
|
414
414
|
assert_equal ["skydiving", "coding", "swimming"], p.interests
|
415
415
|
end
|
416
|
+
|
417
|
+
should "be just one _id key after insert" do
|
418
|
+
p = Person.new(name: "Ben")
|
419
|
+
p.insert!
|
420
|
+
assert p.mongohash.has_key?('_id')
|
421
|
+
assert !p.mongohash.has_key?(:_id)
|
422
|
+
p.name = "Ben Myles"
|
423
|
+
p.update!
|
424
|
+
assert p.mongohash.has_key?('_id')
|
425
|
+
assert !p.mongohash.has_key?(:_id)
|
426
|
+
p = Person.find_one(p.id)
|
427
|
+
assert p.mongohash.has_key?('_id')
|
428
|
+
assert !p.mongohash.has_key?(:_id)
|
429
|
+
end
|
416
430
|
end
|
417
431
|
|
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.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ben Myles
|
@@ -189,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
189
|
requirements:
|
190
190
|
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
hash:
|
192
|
+
hash: 3583778272833589372
|
193
193
|
segments:
|
194
194
|
- 0
|
195
195
|
version: "0"
|