glia-errors 0.11.4 → 0.11.6
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 +4 -4
- data/Appraisals +1 -1
- data/Rakefile +1 -1
- data/gemfiles/dry_validation_v1.gemfile +1 -1
- data/glia-errors.gemspec +1 -1
- data/lib/glia/errors/client_errors.rb +3 -0
- data/lib/glia/errors/mapper.rb +2 -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: 18b0771e4477d3bad79df4926e73e03178e12838a40d254ac24738ca208147d0
|
|
4
|
+
data.tar.gz: 8497c21a809704770feb7ee1c1bf687269a699b9419a49879a2abdab5fcf1396
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1ba73e500036b0b18f240841d3c7fe33267e259954c0b12a61c08d3d511a770e3afa1b0644d972e302b1834a91f98654b3cdf178af11b474df564134de66114
|
|
7
|
+
data.tar.gz: 88f2d9b04a99d2d48e2faca49cdb830e75704133d1165c696534fe919713833e41577c7945e22d169fb3711b0bfdbffe4b5af725793fab0de34f77dd526a1bda
|
data/Appraisals
CHANGED
data/Rakefile
CHANGED
|
@@ -25,7 +25,7 @@ task :install_test_deps do
|
|
|
25
25
|
sh 'bundle exec appraisal install'
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
task test: %i[test_dry_validation_v1
|
|
28
|
+
task test: %i[test_dry_validation_v1]
|
|
29
29
|
|
|
30
30
|
task test_dry_validation_v1: :install_test_deps do
|
|
31
31
|
sh 'bundle exec appraisal dry_validation_v1 rspec'
|
data/glia-errors.gemspec
CHANGED
|
@@ -56,6 +56,7 @@ module Glia
|
|
|
56
56
|
DATE = 'date'
|
|
57
57
|
TIME = 'time'
|
|
58
58
|
UUID = 'uuid'
|
|
59
|
+
URL = 'url'
|
|
59
60
|
end
|
|
60
61
|
|
|
61
62
|
def initialize(field:, format: nil, message: nil)
|
|
@@ -84,6 +85,8 @@ module Glia
|
|
|
84
85
|
'ISO-8601 date and time'
|
|
85
86
|
when Formats::UUID
|
|
86
87
|
'UUID'
|
|
88
|
+
when Formats::URL
|
|
89
|
+
'URL'
|
|
87
90
|
else
|
|
88
91
|
raise 'Unexpected InvalidFormatError format'
|
|
89
92
|
end
|
data/lib/glia/errors/mapper.rb
CHANGED
|
@@ -125,7 +125,8 @@ module Glia
|
|
|
125
125
|
'is missing' => MISSING_VALUE_ERROR,
|
|
126
126
|
# Custom format errors
|
|
127
127
|
'must be in E.164 format' => INVALID_FORMAT_ERROR,
|
|
128
|
-
'must be up to 7
|
|
128
|
+
'must be up to 25 symbol string that contains only 1-7 digits and commas' =>
|
|
129
|
+
INVALID_FORMAT_ERROR,
|
|
129
130
|
'must be a valid email' => INVALID_FORMAT_ERROR
|
|
130
131
|
}.freeze
|
|
131
132
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glia-errors
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Glia TechMovers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: ''
|
|
14
14
|
email:
|