dry_validation_parser 0.1.8 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -2
- data/lib/dry_validation_parser/validation_schema_parser.rb +9 -9
- data/lib/dry_validation_parser/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: 7f8a60143d376e1e16b6473161e35fc687c0ce5b5b7a32fb8ba30fdae7aa3d88
|
4
|
+
data.tar.gz: a2c0a4426cf0c127d5bec5eea7a5d46b52a1a9f7505816a2166540a4c5a50ce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13a89aec21f1a1ae62a1c67e0938406c7c9014e976932eb447dcba6eb1ca29ea0de21441d7cef08406c2d126134319031123dee312e6d17baa8cfb99b2b83fda
|
7
|
+
data.tar.gz: a5a74761b9bcbc53e7eaadad7a4c6d5777e6cf3cfc7c9de55dc654be00e4a7344f2257b75f667c81e76df9c2ca3fcab064ea24f2be8af2eddbff651c8d86637f
|
data/.rubocop.yml
CHANGED
@@ -2,6 +2,7 @@ AllCops:
|
|
2
2
|
TargetRubyVersion: 2.6
|
3
3
|
Exclude:
|
4
4
|
- 'spec/**/*.rb'
|
5
|
+
- 'vendor/bundle/**/*'
|
5
6
|
|
6
7
|
Style/StringLiterals:
|
7
8
|
Enabled: true
|
@@ -26,6 +27,14 @@ Metrics/AbcSize:
|
|
26
27
|
Metrics/BlockLength:
|
27
28
|
Max: 40
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
Metrics/ClassLength:
|
31
|
+
Max: 200
|
32
|
+
|
33
|
+
Metrics/PerceivedComplexity:
|
34
|
+
Max: 15
|
31
35
|
|
36
|
+
Metrics/CyclomaticComplexity:
|
37
|
+
Max: 15
|
38
|
+
|
39
|
+
Style/ClassVars:
|
40
|
+
Enabled: false
|
@@ -7,7 +7,7 @@ module DryValidationParser
|
|
7
7
|
bool?: "boolean",
|
8
8
|
date?: "date",
|
9
9
|
date_time?: "datetime",
|
10
|
-
decimal?: "
|
10
|
+
decimal?: "decimal",
|
11
11
|
float?: "float",
|
12
12
|
hash?: "hash",
|
13
13
|
int?: "integer",
|
@@ -17,13 +17,13 @@ module DryValidationParser
|
|
17
17
|
}.freeze
|
18
18
|
|
19
19
|
DESCRIPTION_MAPPING = {
|
20
|
-
eql?: "Must be equal to
|
21
|
-
max_size?: "Maximum size:
|
22
|
-
min_size?: "Minimum size:
|
23
|
-
gteq?: "Greater than or equal to
|
24
|
-
gt?: "Greater than
|
25
|
-
lt?: "Lower than
|
26
|
-
lteq?: "Lower than or equal to
|
20
|
+
eql?: "Must be equal to %<value>s",
|
21
|
+
max_size?: "Maximum size: %<value>s",
|
22
|
+
min_size?: "Minimum size: %<value>s",
|
23
|
+
gteq?: "Greater than or equal to %<value>s",
|
24
|
+
gt?: "Greater than %<value>s",
|
25
|
+
lt?: "Lower than %<value>s",
|
26
|
+
lteq?: "Lower than or equal to %<value>s"
|
27
27
|
}.freeze
|
28
28
|
|
29
29
|
# @api private
|
@@ -128,7 +128,7 @@ module DryValidationParser
|
|
128
128
|
|
129
129
|
def predicate_description(name, value)
|
130
130
|
description = DESCRIPTION_MAPPING[name]
|
131
|
-
description ? description
|
131
|
+
description ? format(description, value: value) : ""
|
132
132
|
end
|
133
133
|
end
|
134
134
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry_validation_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jane-Terziev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01
|
11
|
+
date: 2024-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-types
|