explicit 0.2.13 → 0.2.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d46564124ef78f3d7caaa7985d8ccf95a8eb43ff0dcd2853a36836e29076e8b
|
4
|
+
data.tar.gz: f13116b827d4574cae5a9476b359cc64ca2ec6e0040db678793e21cce552547e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acb499d03d7293a55b419bc8e5df6252520f93972347874868175720eb3654b4ddd75a87b0896a50092e8c325ac98dfcaf25ec36b3115806eba8b15fa7e8aa63
|
7
|
+
data.tar.gz: cdc1ba59de204f9d9f4d6f26afc7591dd98e3f36d9aa96e571473543d6d4603fb15ecc137882006ad569d911705e0442d2a13ffc19f729307c86c5fb1e8e003a
|
data/lib/explicit/type/hash.rb
CHANGED
@@ -10,7 +10,10 @@ class Explicit::Type::Hash < Explicit::Type
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def validate(value)
|
13
|
-
|
13
|
+
if !value.respond_to?(:[]) || value.is_a?(::String) || value.is_a?(::Array)
|
14
|
+
return error_i18n("hash")
|
15
|
+
end
|
16
|
+
|
14
17
|
return error_i18n("empty") if value.empty? && empty == false
|
15
18
|
|
16
19
|
validated_hash = {}
|
data/lib/explicit/type/record.rb
CHANGED
@@ -12,7 +12,9 @@ class Explicit::Type::Record < Explicit::Type
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def validate(data)
|
15
|
-
|
15
|
+
if !data.respond_to?(:[]) || data.is_a?(::String) || data.is_a?(::Array)
|
16
|
+
return error_i18n("hash")
|
17
|
+
end
|
16
18
|
|
17
19
|
validated_data = {}
|
18
20
|
errors = {}
|
data/lib/explicit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: explicit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luiz Vasconcellos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|