em-mongo 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/em-mongo/connection.rb +1 -2
- data/lib/em-mongo.rb +1 -1
- data/spec/collection_spec.rb +1 -1
- metadata +3 -3
data/lib/em-mongo/connection.rb
CHANGED
@@ -194,12 +194,11 @@ module EM::Mongo
|
|
194
194
|
#puts "response header #{result_flags} #{cursor_id} #{starting_from} #{number_returned}"
|
195
195
|
|
196
196
|
# Documents
|
197
|
-
docs = number_returned.
|
197
|
+
docs = (1..number_returned).map do
|
198
198
|
size= peek_size(@buffer)
|
199
199
|
buf = BSON::ByteBuffer.new(@buffer.get(size))
|
200
200
|
BSON::BSON_CODER.deserialize(buf)
|
201
201
|
end
|
202
|
-
|
203
202
|
[response_to,docs]
|
204
203
|
end
|
205
204
|
|
data/lib/em-mongo.rb
CHANGED
data/spec/collection_spec.rb
CHANGED
@@ -55,7 +55,7 @@ describe EMMongo::Collection do
|
|
55
55
|
it 'should find all objects' do
|
56
56
|
EM::Spec::Mongo.collection do |collection|
|
57
57
|
collection.insert('one' => 'one')
|
58
|
-
|
58
|
+
collection.insert('two' => 'two')
|
59
59
|
collection.find do |res|
|
60
60
|
res.size.should >= 2
|
61
61
|
EM::Spec::Mongo.close
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 10
|
9
|
+
version: 0.2.10
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- bcg
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-21 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|