dry-validation 0.12.0 → 0.12.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ae84a30ea54b0e41206d6bca9ca4b7c9a579b865d3c4ca205f4a762e2756c74
4
- data.tar.gz: af35e1f8f6a8888b24439078ab5baf069dc46f6ecf60ff539cc818989c2fd997
3
+ metadata.gz: 01f5455cb0e7ee2ba55a6a055a89964e7e834d9ea041822ba5967b3c1bbc3d5c
4
+ data.tar.gz: b5a127f7962dafee92453f4ce45ba6e4d64d58d599c7328908d33698417cfe38
5
5
  SHA512:
6
- metadata.gz: ee96f24719da71e1d21526d8786576a5e01637e79950b00f7bc24fcba334fa741cdd55631f3eba8aff682146321a6a87bba13704face8d9b2e4034964070a60d
7
- data.tar.gz: '092f8d1d7ce01fe4676bc992af82fddf9e25f919a1147b5992e8a87048b12f3067adc5d96105d03e884ec33138dc8c64ce4a1bbcce555c15c19590d5fdff6ec0'
6
+ metadata.gz: 4acc0c46fd68b9590fa10b1509fd651f0bfa78e40d573ee47b63eae4107cacc8edbcc5ebe3b92b8b3836c7cb7b856fe6169e2cbda412801547a6e4df3b5732ee
7
+ data.tar.gz: 13b6f004c27747acf1a5899457fcddd54ade5b31c94d7b41b6901561e326fa86451408c102d96f05c303253a5c42d5bb495e372094fbdc3fb167b7cb5585afe0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.12.1 2018-07-06
2
+
3
+ ### Fixed
4
+
5
+ * [internal] fixed deprecation warnings (flash-gordon)
6
+
1
7
  # v0.12.0 2018-05-31
2
8
 
3
9
  ### Changed
@@ -5,7 +11,7 @@
5
11
  * Code updated to work with `dry-types` 0.13.1 and `dry-struct` 0.5.0, these are now minimal supported versions (flash-gordon)
6
12
  * [BREAKING] `Form` was renamed to `Params` to be consistent with the latest changes from `dry-types`. You can `require 'dry/validation/compat/form'` to use the previous names but it will be removed in the next version (flash-gordon)
7
13
 
8
- [Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-validation/compare/v0.11.0...v0.12.0)
14
+ [Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-validation/compare/v0.11.1...v0.12.0)
9
15
 
10
16
  # v0.11.1 2017-09-15
11
17
 
@@ -1,6 +1,5 @@
1
1
  require 'dry/types'
2
2
  require 'dry/types/compiler'
3
- require 'dry/types/compat'
4
3
 
5
4
  module Dry
6
5
  module Validation
@@ -124,6 +123,9 @@ module Dry
124
123
  else
125
124
  self.class::PREDICATE_MAP[predicate] || default
126
125
  end
126
+
127
+ require 'dry/types/compat/int' unless Types.container.key?(type_value)
128
+
127
129
  Types[type_value].to_ast
128
130
  end
129
131
  end
@@ -6,7 +6,7 @@ module Dry
6
6
  none?: 'json.nil',
7
7
  bool?: 'bool',
8
8
  str?: 'string',
9
- int?: 'int',
9
+ int?: 'integer',
10
10
  float?: 'float',
11
11
  decimal?: 'json.decimal',
12
12
  date?: 'json.date',
@@ -17,7 +17,7 @@ module Dry
17
17
  CONST_MAP = {
18
18
  NilClass => 'nil',
19
19
  String => 'string',
20
- Integer => 'int',
20
+ Integer => 'integer',
21
21
  Float => 'float',
22
22
  BigDecimal => 'json.decimal',
23
23
  Array => 'json.array',
@@ -6,7 +6,7 @@ module Dry
6
6
  none?: 'nil',
7
7
  bool?: 'bool',
8
8
  str?: 'string',
9
- int?: 'int',
9
+ int?: 'integer',
10
10
  float?: 'float',
11
11
  decimal?: 'decimal',
12
12
  date?: 'date',
@@ -19,7 +19,7 @@ module Dry
19
19
  CONST_MAP = {
20
20
  NilClass => 'nil',
21
21
  String => 'string',
22
- Integer => 'int',
22
+ Integer => 'integer',
23
23
  Float => 'float',
24
24
  BigDecimal => 'decimal',
25
25
  Array => 'array',
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Validation
3
- VERSION = '0.12.0'.freeze
3
+ VERSION = '0.12.1'.freeze
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ RSpec.describe Dry::Validation::Schema, 'defining schema using dry types' do
10
10
 
11
11
  before do
12
12
  Email = Dry::Types['strict.string']
13
- Age = Dry::Types['strict.int'].constrained(gt: 18)
13
+ Age = Dry::Types['strict.integer'].constrained(gt: 18)
14
14
  Country = Dry::Types['strict.string'].enum('Australia', 'Poland')
15
15
  AdminBit = Dry::Types['strict.bool']
16
16
  end
@@ -68,7 +68,7 @@ RSpec.describe Dry::Validation::Schema, 'defining schema using dry types' do
68
68
  context 'custom types' do
69
69
  subject(:schema) do
70
70
  Dry::Validation.Params do
71
- required(:quantity).filled(Dry::Types['strict.int'].constrained(gt: 1))
71
+ required(:quantity).filled(Dry::Types['strict.integer'].constrained(gt: 1))
72
72
  required(:percentage).filled(Dry::Types['strict.decimal'].constrained(gt: 0, lt: 1))
73
73
  required(:switch).filled(Dry::Types['strict.bool'])
74
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Holland
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-31 00:00:00.000000000 Z
12
+ date: 2018-07-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby