mongo_light 0.0.4 → 0.0.5

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.
@@ -15,14 +15,10 @@ module MongoLight
15
15
  found.nil? ? nil : self.new(unmap(found))
16
16
  end
17
17
  def find_one(selector = {}, opts={})
18
- found = collection.find_one(map(selector))
19
- if found.nil?
20
- return nil
21
- end
22
- if opts.delete(:raw)
23
- return unmap(found, true)
24
- end
25
- self.new(unmap(found))
18
+ raw = opts.delete(:raw) || false
19
+ found = collection.find_one(map(selector), map_options(opts))
20
+ return nil if found.nil?
21
+ return raw ? unmap(found, true) : self.new(unmap(found))
26
22
  end
27
23
  def find(selector={}, opts={}, collection = nil)
28
24
  raw = opts.delete(:raw) || false
@@ -1,3 +1,3 @@
1
1
  module MongoLight
2
- Version = '0.0.4'
2
+ Version = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_light
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-26 00:00:00.000000000 Z
12
+ date: 2011-11-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: