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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fd43a018e7ec6b6c9a9e30fdc717d58be0c075c466e5ed8fb0a5db93587815b
4
- data.tar.gz: a33f53b3206d1a951c25230224382a8fd24fed063bff9fda423aeb44ff4f0bac
3
+ metadata.gz: 75ce2204864c68abf5a09d7f1f0144ee2ea56582392b2970464a03492b32b965
4
+ data.tar.gz: 01f076dfc9c73452d77fd1d729daa29ed467135037c5c4043c03b4227d8c4971
5
5
  SHA512:
6
- metadata.gz: 99fed3396eb7bf4c766d6b7d6ebd9a4cbeeca230a580febbc92be3d9ccd70f7af1844415aa8762292c8fc3dda2b0f31faaaca8df46984494db9ffc2f2c89ebe9
7
- data.tar.gz: 3e45f4d391637b1711e1724f85a7d0f5dbf2584a71d7f34f1e3ff5998069c019c78b496d54950ea7fe2774039f2397d17b5f406964315ad630e60955055a180d
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
- Style/ClassVars:
30
- Enabled: false
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?: "float",
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 %{value}",
21
- max_size?: "Maximum size: %{value}",
22
- min_size?: "Minimum size: %{value}",
23
- gteq?: "Greater than or equal to %{value}",
24
- gt?: "Greater than %{value}",
25
- lt?: "Lower than %{value}",
26
- lteq?: "Lower than or equal to %{value}",
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 % { value: value } : ""
131
+ description ? format(description, value: value) : ""
132
132
  end
133
133
  end
134
134
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DryValidationParser
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  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.8
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-18 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-types