em-mongo 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/em-mongo/collection.rb +1 -1
- data/lib/em-mongo.rb +0 -6
- data/spec/collection_spec.rb +1 -2
- metadata +2 -2
data/lib/em-mongo/collection.rb
CHANGED
data/lib/em-mongo.rb
CHANGED
@@ -14,12 +14,6 @@ module EM::Mongo
|
|
14
14
|
NAME = 'em-mongo'
|
15
15
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
16
16
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
17
|
-
|
18
|
-
class Util
|
19
|
-
def self.unique_id
|
20
|
-
BSON::ObjectID.new.to_s
|
21
|
-
end
|
22
|
-
end
|
23
17
|
end
|
24
18
|
|
25
19
|
require File.join(EM::Mongo::LIBPATH, "em-mongo/connection")
|
data/spec/collection_spec.rb
CHANGED
@@ -24,8 +24,7 @@ describe EMMongo::Collection do
|
|
24
24
|
EM::Spec::Mongo.collection do |collection|
|
25
25
|
obj = collection.insert('hello' => 'world')
|
26
26
|
obj.keys.should include '_id'
|
27
|
-
obj['_id'].should be_a_kind_of
|
28
|
-
obj['_id'].length.should == 24
|
27
|
+
obj['_id'].should be_a_kind_of(BSON::ObjectID)
|
29
28
|
EM::Spec::Mongo.close
|
30
29
|
end
|
31
30
|
end
|