dm-mnesia 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/dm-mnesia.gemspec +2 -2
  3. data/lib/types/record.rb +12 -7
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.9
1
+ 0.2.10
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-mnesia}
8
- s.version = "0.2.9"
8
+ s.version = "0.2.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chad DePue", "Manuel Gomez"]
12
- s.date = %q{2010-09-03}
12
+ s.date = %q{2010-09-15}
13
13
  s.description = %q{}
14
14
  s.email = %q{chad@inakanetworks.com,manuel@inakanetworks.com}
15
15
  s.extra_rdoc_files = [
@@ -17,14 +17,19 @@ module DataMapper
17
17
  if value.nil?
18
18
  nil
19
19
  elsif value.is_a?(::Array)
20
- klass = value.shift.capitalize
21
- theklass = Kernel.const_get(klass).new
22
- theklass.send('properties').map(&:name).each_with_index() do |k,i|
23
- theklass.send("#{k}=",value[i])
20
+ puts value.inspect
21
+ klass = value.shift
22
+ if klass.nil?
23
+ nil
24
+ else
25
+ theklass = Kernel.const_get(klass).new
26
+ theklass.send('properties').map(&:name).each_with_index() do |k,i|
27
+ theklass.send("#{k}=",value[i])
28
+ end
29
+ theklass
24
30
  end
25
- theklass
26
- else
27
- raise ArgumentError.new("not sure what type #{value.class}")
31
+ else
32
+ raise ArgumentError.new("record: not sure what type #{value.class} is")
28
33
  end
29
34
  end
30
35
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-mnesia
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 9
10
- version: 0.2.9
9
+ - 10
10
+ version: 0.2.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chad DePue
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-03 00:00:00 -03:00
19
+ date: 2010-09-15 00:00:00 -03:00
20
20
  default_executable:
21
21
  dependencies: []
22
22