schema-model 0.6.2 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema/parsers/common.rb +3 -3
- data/schema-model.gemspec +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: a73780000277f79895caa968d7f1c26419a3202f471623df279b66b07e5fc9ae
|
4
|
+
data.tar.gz: efaab2f375e9bcf1abf32997e2e457e6fd9abd2691bb9b58e20a04816255a612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 440393dc4b00e289aa867435ad1ef057bb9a5d964a834d2175b2de3699a0b3555ad422bc3db914736323c25f6871b0161c003228d3b6ab783b6bbccc8c1aeef1
|
7
|
+
data.tar.gz: 61379e61fe8ba8aefcec1a4f4aed9bca1155e09ef0d6bb17a68f8f7270e08c0824d17bb40cf42be56d21966401ca5b3ea550b430b531a873a0c6bfd1abdc26e9
|
@@ -6,8 +6,8 @@ module Schema
|
|
6
6
|
module Parsers
|
7
7
|
# Schema::Parsers::Common are parser methods for basic types
|
8
8
|
module Common
|
9
|
-
INTEGER_REGEX = /^(?:[1-9]\d*|0)
|
10
|
-
FLOAT_REGEX = /^(?:[1-9]\d*|0)(?:\.\d+)?$/.freeze
|
9
|
+
INTEGER_REGEX = /^[-+]?(?:[1-9]\d*|0)(?:\.0+)?$/.freeze
|
10
|
+
FLOAT_REGEX = /^[-+]?(?:[1-9]\d*|0)(?:\.\d+)?([Ee]-?\d+)?$/.freeze
|
11
11
|
BOOLEAN_REGEX = /^(?:1|t|true|on|y|yes)$/i.freeze
|
12
12
|
|
13
13
|
# rubocop:disable Metrics/CyclomaticComplexity
|
@@ -17,7 +17,7 @@ module Schema
|
|
17
17
|
value
|
18
18
|
when String
|
19
19
|
if INTEGER_REGEX.match(value)
|
20
|
-
|
20
|
+
value.to_i
|
21
21
|
else
|
22
22
|
parsing_errors.add(field_name, ::Schema::ParsingErrors::INVALID)
|
23
23
|
nil
|
data/schema-model.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inheritance-helper
|