dry_validation_parser 0.1.8 → 0.1.9
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: 75ce2204864c68abf5a09d7f1f0144ee2ea56582392b2970464a03492b32b965
|
4
|
+
data.tar.gz: 01f076dfc9c73452d77fd1d729daa29ed467135037c5c4043c03b4227d8c4971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b1ab40c6a3b6bf2fae2df3af5013133213a6126f47a24ff54b3903f64f9ccfb38425957418ddfa0e96713fa909c0702037776022c43f718f6a44da1f7cbf288
|
7
|
+
data.tar.gz: ea4e75f373e8a4080d278dd49d78e49bdc5260c94be58539d3bc696c79110f3b4cd111fa60d84aa486e617458a17ad0403154fe51d1f3aa8cb53ea679aa7aed8
|
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.9
|
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
|