mongodb_adapter 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +2 -2
  2. data/VERSION +1 -1
  3. data/lib/mongodb_adapter.rb +4 -1
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -5,9 +5,9 @@ require 'rake/gempackagetask'
5
5
  gemspec = Gem::Specification.new do |s|
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.name = "mongodb_adapter"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
  s.author = "Mark Rendle"
10
- s.date = "2010-01-13"
10
+ s.date = "2010-01-17"
11
11
  s.email = "mark@okify.com"
12
12
 
13
13
  s.add_dependency "mongo", ">= 0.18.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -45,10 +45,13 @@ module DataMapper
45
45
  cur = collection.find(criteria)
46
46
  cur = cur.limit(query.limit) if query.limit
47
47
  cur.each do |document|
48
+ # __bignums array contains keys for Bignum properties (MongoDB doesn't support Bignum)
48
49
  document['__bignums'].each do |key|
49
50
  document[key] = document[key].to_i
50
51
  end
51
- document['__discriminators'].each do |key|
52
+ # __discriminators array contains keys for Discriminator properties
53
+ (document['__discriminators'] || []).each do |key|
54
+ # Class from String
52
55
  document[key] = eval(document[key])
53
56
  end
54
57
  result << document
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongodb_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rendle
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-13 00:00:00 +00:00
12
+ date: 2010-01-17 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency