dry-schema 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/dry/schema/macros/schema.rb +1 -1
- data/lib/dry/schema/macros/value.rb +2 -2
- data/lib/dry/schema/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: 9efbd58d7d7d70ec01d578de507f1fc6ba3e78bfeb81e30e8b69a2ca29fbc753
|
4
|
+
data.tar.gz: 874370eec0e97f1b87bee9a18d606a45b0aba4d80729c7637407147f4f01a7fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b23a5b75861ef7f9c9ab8430439f580877788c98f79268913723e9fea653df7aaf3fc074839ce561b42c8f7268f9a22069e0a7c8c3f71b20f9cdd4956df1aad
|
7
|
+
data.tar.gz: ee1987669c04d04b93d20d1a975c2418b8cf9b355caf96a313f9a7f4b50d60514ec2071af82d263f0972fc3c24c865c3fb67b7073a914a3dce1636ce958ea455
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 1.3.4 2019-09-11
|
2
|
+
|
3
|
+
### Fixed
|
4
|
+
|
5
|
+
* Fixed regression where using `array?` predicate within a block would crach (issue #186) (@skryukov)
|
6
|
+
|
7
|
+
[Compare v1.3.3...v1.3.4](https://github.com/dry-rb/dry-schema/compare/v1.3.3...v1.3.4)
|
8
|
+
|
1
9
|
# 1.3.3 2019-08-14
|
2
10
|
|
3
11
|
### Fixed
|
@@ -28,7 +28,7 @@ module Dry
|
|
28
28
|
definition = schema_dsl.new(&block)
|
29
29
|
schema = definition.call
|
30
30
|
type_schema =
|
31
|
-
if
|
31
|
+
if array_type?(parent_type)
|
32
32
|
build_array_type(parent_type, definition.type_schema)
|
33
33
|
elsif redefined_schema?(args)
|
34
34
|
parent_type.schema(definition.types)
|
@@ -17,7 +17,7 @@ module Dry
|
|
17
17
|
current_type = schema_dsl.types[name]
|
18
18
|
|
19
19
|
updated_type =
|
20
|
-
if
|
20
|
+
if array_type?(current_type)
|
21
21
|
build_array_type(current_type, schema.type_schema)
|
22
22
|
else
|
23
23
|
schema.type_schema
|
@@ -40,7 +40,7 @@ module Dry
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# @api private
|
43
|
-
def
|
43
|
+
def array_type?(type)
|
44
44
|
primitive_inferrer[type].eql?([::Array])
|
45
45
|
end
|
46
46
|
|
data/lib/dry/schema/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|