estratto 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.travis.yml +0 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile +0 -0
- data/Gemfile.lock +2 -2
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/estratto.gemspec +0 -0
- data/lib/estratto.rb +0 -0
- data/lib/estratto/content.rb +0 -0
- data/lib/estratto/data/base.rb +0 -0
- data/lib/estratto/data/coercer.rb +8 -2
- data/lib/estratto/data/date.rb +0 -0
- data/lib/estratto/data/datetime.rb +1 -0
- data/lib/estratto/data/float.rb +0 -1
- data/lib/estratto/data/integer.rb +0 -1
- data/lib/estratto/data/string.rb +0 -0
- data/lib/estratto/document.rb +0 -0
- data/lib/estratto/encoder.rb +0 -0
- data/lib/estratto/helpers/range.rb +0 -0
- data/lib/estratto/layout/base.rb +0 -0
- data/lib/estratto/layout/factory.rb +0 -0
- data/lib/estratto/layout/multi_register.rb +0 -0
- data/lib/estratto/layout/reader.rb +0 -0
- data/lib/estratto/parser.rb +0 -0
- data/lib/estratto/register.rb +0 -0
- data/lib/estratto/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c513e33d6b389bc493e117c7aa42f05343b136c6c888b8729effc6968e0ac2b3
|
4
|
+
data.tar.gz: 5ae62d1c1942e3837770694e6266b74d98f9d723cedbe0045660bc2d6ecf99da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07c55baf1aeabc93ca7f250bb94e241adaa04403983094d6045bf68e27ba48df9ebcc87e84c176a0e601ec2fe6848f731ba9faacce28d39707ed5267320e06f2
|
7
|
+
data.tar.gz: 6bb14f1b04f4f2f2c18f63b9bbd3b3613703a972c03d61c715f1563bca622428f139e114d0874dcf5b63c7d362b2cea7fa6b1b23cdfd71e7ea50a4729e5cc1d6
|
data/.gitignore
CHANGED
File without changes
|
data/.rspec
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
-
### 1.0.
|
1
|
+
### 1.0.4 (06/10/2019)
|
2
|
+
|
3
|
+
* Fix date requires crashes;
|
4
|
+
* Included `allow_empty?` property into `formats` node, that allow estratto to send `nil` value when data to be coerced does not be the same expected by coercer;
|
5
|
+
|
6
|
+
### 1.0.3 (05/09/2019)
|
2
7
|
|
3
8
|
* Implement coercer error improvement, that expose data, and line number that raises error
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/estratto.gemspec
CHANGED
File without changes
|
data/lib/estratto.rb
CHANGED
File without changes
|
data/lib/estratto/content.rb
CHANGED
File without changes
|
data/lib/estratto/data/base.rb
CHANGED
File without changes
|
@@ -21,8 +21,10 @@ module Estratto
|
|
21
21
|
def build
|
22
22
|
target_coercer.coerce
|
23
23
|
rescue StandardError => error
|
24
|
-
|
25
|
-
|
24
|
+
unless allow_empty?
|
25
|
+
raise DataCoercionError,
|
26
|
+
"Error when coercing #{data} on line #{index}, raising: #{error.message}"
|
27
|
+
end
|
26
28
|
end
|
27
29
|
|
28
30
|
def target_coercer
|
@@ -30,6 +32,10 @@ module Estratto
|
|
30
32
|
rescue NameError
|
31
33
|
raise InvalidCoercionType, "Does not exists coercer class for #{type}"
|
32
34
|
end
|
35
|
+
|
36
|
+
def allow_empty?
|
37
|
+
formats.dig(:allow_empty?)
|
38
|
+
end
|
33
39
|
end
|
34
40
|
end
|
35
41
|
end
|
data/lib/estratto/data/date.rb
CHANGED
File without changes
|
data/lib/estratto/data/float.rb
CHANGED
data/lib/estratto/data/string.rb
CHANGED
File without changes
|
data/lib/estratto/document.rb
CHANGED
File without changes
|
data/lib/estratto/encoder.rb
CHANGED
File without changes
|
File without changes
|
data/lib/estratto/layout/base.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/estratto/parser.rb
CHANGED
File without changes
|
data/lib/estratto/register.rb
CHANGED
File without changes
|
data/lib/estratto/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: estratto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique A. Lavezzo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: charlock_holmes
|