mongodb-mongo 0.10 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -77,6 +77,7 @@ module XGen
77
77
  def save(object)
78
78
  if id = object[:_id] || object['_id']
79
79
  repsert({:_id => id}, object)
80
+ id
80
81
  else
81
82
  insert(object)
82
83
  end
@@ -79,7 +79,7 @@ TEST_FILES = ['tests/mongo-qa/_common.rb',
79
79
 
80
80
  Gem::Specification.new do |s|
81
81
  s.name = 'mongo'
82
- s.version = '0.10'
82
+ s.version = '0.10.1'
83
83
  s.platform = Gem::Platform::RUBY
84
84
  s.summary = 'Ruby driver for the 10gen Mongo DB'
85
85
  s.description = 'A Ruby driver for the 10gen Mongo DB. For more information about Mongo, see http://www.mongodb.org.'
data/tests/test_db_api.rb CHANGED
@@ -48,7 +48,7 @@ class DBAPITest < Test::Unit::TestCase
48
48
 
49
49
  def test_insert_multiple
50
50
  ids = @@coll.insert({'a' => 2}, {'b' => 3})
51
-
51
+
52
52
  ids.each do |i|
53
53
  assert_kind_of ObjectID, i
54
54
  end
@@ -619,10 +619,11 @@ class DBAPITest < Test::Unit::TestCase
619
619
 
620
620
  a = {"hello" => "world"}
621
621
 
622
- assert_kind_of ObjectID, @@coll.save(a)
622
+ id = @@coll.save(a)
623
+ assert_kind_of ObjectID, id
623
624
  assert_equal 1, @@coll.count
624
625
 
625
- @@coll.save(@@coll.find_first)
626
+ assert_equal id, @@coll.save(@@coll.find_first)
626
627
  assert_equal 1, @@coll.count
627
628
 
628
629
  assert_equal "world", @@coll.find_first()["hello"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongodb-mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.10"
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Menard