evt-schema 2.3.1.3 → 2.3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema/schema.rb +7 -3
- 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: 971bea799a068571a832fd0d91d795d358b4bf2353815af0deeba7bd06575f2b
|
4
|
+
data.tar.gz: ce668827143bc600c0cff547599342ef8b407360532645b31fa316e6b183cb6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f574566d0440bfee26e16529dcd2d577c29d7a38ec6db7a50d8b2241f100fd3fbb31a6a8138983b8c48d006576f2d73505a90359b80d73b62b0382bd7a052107
|
7
|
+
data.tar.gz: 5a5d352f13748253fb1a0b499d21305e2a750c14ca2e4d0d6026fcb2f9e53650199e1a7280fdd20585c4a9faad55ccc15b680875b7559dfeb96daf3c48c7b031
|
data/lib/schema/schema.rb
CHANGED
@@ -41,7 +41,7 @@ module Schema
|
|
41
41
|
|
42
42
|
check = proc do |val|
|
43
43
|
unless val.nil? || Boolean.(val)
|
44
|
-
raise Schema::Attribute::TypeError, "#{val.inspect}
|
44
|
+
raise Schema::Attribute::TypeError, "#{val.inspect} of type #{val.class.name} cannot be assigned to attribute #{attribute_name} of type Boolean (Strict: #{strict.inspect})"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
elsif !type.nil?
|
@@ -50,9 +50,13 @@ module Schema
|
|
50
50
|
check = proc do |val|
|
51
51
|
unless val.nil?
|
52
52
|
if strict
|
53
|
-
|
53
|
+
if not val.instance_of?(type)
|
54
|
+
raise Schema::Attribute::TypeError, "#{val.inspect} of type #{val.class.name} cannot be assigned to attribute #{attribute_name} of type #{type.name} (Strict: #{strict.inspect})"
|
55
|
+
end
|
54
56
|
else
|
55
|
-
|
57
|
+
if not val.is_a?(type)
|
58
|
+
raise Schema::Attribute::TypeError, "#{val.inspect} of type #{val.class.name} cannot be assigned to attribute #{attribute_name} of type #{type.name} (Strict: #{strict.inspect})"
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.1.
|
4
|
+
version: 2.3.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-attribute
|