poro 0.1.6 → 0.1.7
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.
- data/README.rdoc +3 -0
- data/lib/poro/contexts/mongo_context.rb +7 -3
- data/lib/poro/version.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -160,6 +160,9 @@ mailto:jeff@paploo.net
|
|
160
160
|
|
161
161
|
= Version History
|
162
162
|
|
163
|
+
[0.1.7 - 2011-Apr-06] Bug Fixes.
|
164
|
+
* MongoContext: Fixed it to send :after_fetch events after a find.
|
165
|
+
* MongoContext: Dereferencing a DBRef.
|
163
166
|
[0.1.6 - 2011-Mar-09] Bug Fixes.
|
164
167
|
* ModuleFinder: Fixed a bug where an inappropriate warning would be thrown.
|
165
168
|
[0.1.5 - 2011-Feb-15] Bug Fixes.
|
@@ -437,7 +437,7 @@ module Poro
|
|
437
437
|
value = context.data_store.db.dereference(dbref)
|
438
438
|
return context.convert_to_plain_object(value, :embedded => false) # We want it to work like a standalone object, so don't treat as embedded.
|
439
439
|
elsif self.data_store.db.collection_names.include?(dbref.namespace.to_s)
|
440
|
-
value =
|
440
|
+
value = self.data_store.db.dereference(dbref)
|
441
441
|
value['_namespace'] = dbref.namespace.to_s
|
442
442
|
return value
|
443
443
|
else
|
@@ -539,11 +539,15 @@ module Poro
|
|
539
539
|
end
|
540
540
|
|
541
541
|
def data_store_find_all(*args, &block)
|
542
|
-
|
542
|
+
objects = data_store.find(*args, &block).to_a.map {|doc| self.convert_to_plain_object(doc)}
|
543
|
+
objects.each {|obj| callback_event(:after_fetch, obj)}
|
544
|
+
return objects
|
543
545
|
end
|
544
546
|
|
545
547
|
def data_store_find_first(*args, &block)
|
546
|
-
|
548
|
+
obj = self.convert_to_plain_object( data_store.find_one(*args, &block) )
|
549
|
+
callback_event(:after_fetch, obj)
|
550
|
+
return obj
|
547
551
|
end
|
548
552
|
|
549
553
|
# Takes find opts, runs them through <tt>clean_find_opts</tt>, and then
|
data/lib/poro/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: poro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.7
|
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-
|
13
|
+
date: 2011-04-06 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|