poro 0.1.7 → 0.1.8

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.
@@ -160,6 +160,10 @@ mailto:jeff@paploo.net
160
160
 
161
161
  = Version History
162
162
 
163
+ [0.1.8 - 2011-Apr-15] Bug Fixes.
164
+ * MongoContext: context.fetch(nil) returns nil. Turns out
165
+ Mongo's coll.find_one(nil) returned first record, and so
166
+ that is what we were doing but didn't actually want to do.
163
167
  [0.1.7 - 2011-Apr-06] Bug Fixes.
164
168
  * MongoContext: Fixed it to send :after_fetch events after a find.
165
169
  * MongoContext: Dereferencing a DBRef.
@@ -89,6 +89,7 @@ module Poro
89
89
  attr_writer :attempt_id_conversion
90
90
 
91
91
  def fetch(id)
92
+ return nil if id.nil? #find_one(nil) returns the first object! We don't want this.
92
93
  data = data_store.find_one( clean_id(id) )
93
94
  obj = convert_to_plain_object(data)
94
95
  callback_event(:after_fetch, obj)
@@ -3,5 +3,5 @@
3
3
  # existing plain ol' ruby objects as little as possible. For more information
4
4
  # see README.rdoc.
5
5
  module Poro
6
- VERSION = '0.1.7'
6
+ VERSION = '0.1.8'
7
7
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: poro
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.7
5
+ version: 0.1.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeff Reinecke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-06 00:00:00 -07:00
13
+ date: 2011-04-15 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16