field_mapper 0.3.8 → 0.3.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e260db5eb6e48de6cf05f251eb6db4bcb049305
4
- data.tar.gz: 1dd1bdf10e815648b9ab03afbf0213f1b2381dbe
3
+ metadata.gz: e26316a48a53fe5421bd2ad22923416227cfeb87
4
+ data.tar.gz: fe26147ff399980606f49984aaf481ced3538a9b
5
5
  SHA512:
6
- metadata.gz: 7c685cf81a507b7ee54cb35d391eedd39042da85592272e85285e6a828f1393217e525a2754da9306aa88427a65ee2713a52df0c9683e28cd0c73dd3f60689b9
7
- data.tar.gz: 10f1785248c97b3737ce4ecdb177200ed0ea9e808862c99ba061af072dcc02acbc4a3c40e4b6735a5dd746de842bcbdcc1b40269c48e8f8757de379a32e84355
6
+ metadata.gz: d5b33c3a1434cce1a9a0117e3057ac1b84dd766d0e149bae28016d97087641f96073c6d40f061c3b772cb48c4f277e0555215728d2c676aaa5039cb004ea762a
7
+ data.tar.gz: 5fa271119d511d9e36f0c6ab14291cf37367e1bcac7b9989e7522fb4c4e8b2b7769d792a5be910d72793bb194d0f68456b53414b2d200dc6a28cf2aee4706b74
@@ -135,6 +135,7 @@ module FieldMapper
135
135
 
136
136
  def get_list(value)
137
137
  value = unmarshal(value) if value.is_a?(String)
138
+ raise InvalidListValue.new("#{name} is not a list") unless value.respond_to?(:map)
138
139
  value.map { |val| cast_value(type.type, val) }
139
140
  end
140
141
 
@@ -25,7 +25,7 @@ module FieldMapper
25
25
  end
26
26
 
27
27
  def initialize(type, values=[])
28
- raise InvalidListType unless valid_type?(type)
28
+ raise InvalidListType.new("#{type} is not a supported list type") unless valid_type?(type)
29
29
  @type = type
30
30
  end
31
31
 
@@ -18,7 +18,7 @@ module FieldMapper
18
18
 
19
19
  def initialize(type, values=[])
20
20
  if type.class != Class || !type.ancestors.include?(FieldMapper::Standard::Plat)
21
- raise InvalidPlatType
21
+ raise InvalidPlatType.new("#{type} is not a valid plat type")
22
22
  end
23
23
 
24
24
  @type = type
@@ -1,3 +1,3 @@
1
1
  module FieldMapper
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: field_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-04 00:00:00.000000000 Z
11
+ date: 2014-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport