field_mapper 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45d995d3afffa49b4dc07c9c956372125e898dda
4
- data.tar.gz: 2b286ecf10742d95f6042d1aa68bd0b3cb1ea9cf
3
+ metadata.gz: bfe9de882a181be20182dea8a1808194d5cee08e
4
+ data.tar.gz: b269ff64187a983f56600042a8bd88e06109cfe2
5
5
  SHA512:
6
- metadata.gz: 6f6f40c1b701ad81e1d757be6a47190ea4c3f673b65ef69a05d29151a77aa5820023a6a27a290fa05f591f8b1ec360b7f64ba86374b77f9250651543c44cddef
7
- data.tar.gz: 11a239c60479220f0f2d6ed5566bcf9c8f75dbe524c658739309d0900cb3415c4a52c0cf58fac419ae3bdc1b02acef53a81870f06697ee6cb7593c5736bc6713
6
+ metadata.gz: 3929ca29c513a13421ca4e7718388b84e5f5010e9b6a4ea8acbebe06bc96b39fbcb8be7613372ca9aefb35bd47ba067d03f19061978b6dedc04f54b6f19ad13b
7
+ data.tar.gz: 79e599d3b463d31d19c33f9e968e9f35fa9f28fea8239903798e7381895547a988effad49d48f4bc10d14ff925e2013e6a088200d9d93619f90bcaa3645f6003
@@ -1,11 +1,13 @@
1
- class StandardNotSet < StandardError; end
2
- class StandardFieldNotFound < StandardError; end
3
- class StandardValueNotFound < StandardError; end
4
- class StandardMismatch < StandardError; end
5
- class TypeNotSpecified < StandardError; end
6
- class TypeNotSupported < StandardError; end
7
- class FieldNotDefined < StandardError; end
8
- class InvalidPlatType < StandardError; end
9
- class InvalidListType < StandardError; end
10
- class InvalidListValue < StandardError; end
11
- class InvalidMarshal < StandardError; end
1
+ module FieldMapper
2
+ class StandardNotSet < StandardError; end
3
+ class StandardFieldNotFound < StandardError; end
4
+ class StandardValueNotFound < StandardError; end
5
+ class StandardMismatch < StandardError; end
6
+ class TypeNotSpecified < StandardError; end
7
+ class TypeNotSupported < StandardError; end
8
+ class FieldNotDefined < StandardError; end
9
+ class InvalidPlatType < StandardError; end
10
+ class InvalidListType < StandardError; end
11
+ class InvalidListValue < StandardError; end
12
+ class InvalidMarshal < StandardError; end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module FieldMapper
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -6,7 +6,7 @@ module Custom
6
6
  test "constructor requires type" do
7
7
  begin
8
8
  FieldMapper::Custom::Field.new(:foo)
9
- rescue TypeNotSpecified => e
9
+ rescue FieldMapper::TypeNotSpecified => e
10
10
  error = e
11
11
  end
12
12
  assert error.present?
@@ -12,7 +12,7 @@ module Custom
12
12
  begin
13
13
  custom_field = FieldMapper::Custom::Field.new(:bar, type: Integer)
14
14
  FieldMapper::Custom::Value.new(1, field: custom_field, standard_value: 1)
15
- rescue StandardFieldNotFound => e
15
+ rescue FieldMapper::StandardFieldNotFound => e
16
16
  error = e
17
17
  end
18
18
  assert error.present?
@@ -21,7 +21,7 @@ module Custom
21
21
  test "constructor ensures standard_value exists" do
22
22
  begin
23
23
  FieldMapper::Custom::Value.new("a", field: @custom_field, standard_value: "a")
24
- rescue StandardValueNotFound => e
24
+ rescue FieldMapper::StandardValueNotFound => e
25
25
  error = e
26
26
  end
27
27
  assert error.present?
@@ -7,7 +7,7 @@ module Standard
7
7
  test "constructor requires type" do
8
8
  begin
9
9
  FieldMapper::Standard::Field.new(:foo)
10
- rescue TypeNotSpecified => e
10
+ rescue FieldMapper::TypeNotSpecified => e
11
11
  error = e
12
12
  end
13
13
  assert error.present?
@@ -6,7 +6,7 @@ class ListTest < MicroTest::Test
6
6
  test "initialize fails with instance type" do
7
7
  begin
8
8
  FieldMapper::Types::List.new("")
9
- rescue InvalidListType => error
9
+ rescue FieldMapper::InvalidListType => error
10
10
  end
11
11
  assert !error.nil?
12
12
  end
@@ -14,7 +14,7 @@ class ListTest < MicroTest::Test
14
14
  test "initialize fails with invalid type" do
15
15
  begin
16
16
  FieldMapper::Types::List.new(Object)
17
- rescue InvalidListType => error
17
+ rescue FieldMapper::InvalidListType => error
18
18
  end
19
19
  assert !error.nil?
20
20
  end
@@ -6,7 +6,7 @@ class PlatTest < MicroTest::Test
6
6
  test "initialize fails with instance type" do
7
7
  begin
8
8
  FieldMapper::Types::Plat.new("")
9
- rescue InvalidPlatType => error
9
+ rescue FieldMapper::InvalidPlatType => error
10
10
  end
11
11
  assert !error.nil?
12
12
  end
@@ -14,7 +14,7 @@ class PlatTest < MicroTest::Test
14
14
  test "initialize fails with non plat type" do
15
15
  begin
16
16
  FieldMapper::Types::Plat.new(String)
17
- rescue InvalidPlatType => error
17
+ rescue FieldMapper::InvalidPlatType => error
18
18
  end
19
19
  assert !error.nil?
20
20
  end
@@ -22,7 +22,7 @@ class PlatTest < MicroTest::Test
22
22
  test "initialize succeeds with plat type" do
23
23
  begin
24
24
  FieldMapper::Types::Plat.new(Standard::PlatExample)
25
- rescue InvalidPlatType => error
25
+ rescue FieldMapper::InvalidPlatType => error
26
26
  end
27
27
  assert error.nil?
28
28
  end
@@ -30,7 +30,7 @@ class PlatTest < MicroTest::Test
30
30
  test "[] construction" do
31
31
  begin
32
32
  FieldMapper::Types::Plat[Standard::PlatExample]
33
- rescue InvalidPlatType => error
33
+ rescue FieldMapper::InvalidPlatType => error
34
34
  end
35
35
  assert error.nil?
36
36
  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.1.1
4
+ version: 0.2.0
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-04-02 00:00:00.000000000 Z
11
+ date: 2014-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport