servactory 2.12.0.rc3 → 2.12.0.rc4

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: db0f437672047c90c0b10f79f55c49670ec6c18ea977f3cf0ac2ab5e0b1b5cee
4
- data.tar.gz: 5a51217c27c4d0d21d1d2d466450295dc4c6b8fcc7254bf7b82634ffa968b03d
3
+ metadata.gz: 0eeedc0bdb210dc43654a350e337b9e5ba40e6f69b91f37c5443d482d5d58bab
4
+ data.tar.gz: 74c2289271ea87d31960ecd619a58e38dfe623810e6db94664a3f0a1b59c6504
5
5
  SHA512:
6
- metadata.gz: 62a421c1ee2f2135f5d14fdc11378e05f3dda3ddf5a613af2e0809c40defacad98c3ed7ad06d6cb1c91c1333890cb31687dd8423ac2e2c5658acfc53a62a2885
7
- data.tar.gz: 900ab23ae47cd912238476d6945ecc31f9fc43e26378bde0ff3d4e0367c1e8f703006a2d44b5704335ee7b1549ecde596be732c5a12acbabbc94d1ca717dfea0
6
+ metadata.gz: 7948c4bf0fc55a38670915580532ac09c5be55ed4192b768be8eb2e594dcd2f56bd2fa30d4c4fe4802f2e9c32a98288b048877576871234b0eb86320fb36561a
7
+ data.tar.gz: 7c945cefc19c640ad66dbf67beab4b5abb9a8f4de5c7de9fcfdb5172c81021fb538f26c2a1c971f4080dfeef33fc30d083d094222e391a9b75105032bf615be6
@@ -29,10 +29,14 @@ module Servactory
29
29
  common_condition_with(attribute: output, value:, option:)
30
30
  end
31
31
 
32
- def common_condition_with(attribute:, value:, option:)
32
+ def common_condition_with(attribute:, value:, option:) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
33
33
  return true if option.value == false
34
34
  return [false, :wrong_type] if @default_hash_mode_class_names.intersection(attribute.types).empty?
35
35
 
36
+ if value.blank? && ((attribute.input? && attribute.optional?) || attribute.internal? || attribute.output?)
37
+ return true
38
+ end
39
+
36
40
  schema = option.value.fetch(:is, option.value)
37
41
 
38
42
  is_success, reason, meta = validate_for!(object: value, schema:)
@@ -5,7 +5,7 @@ module Servactory
5
5
  MAJOR = 2
6
6
  MINOR = 12
7
7
  PATCH = 0
8
- PRE = "rc3"
8
+ PRE = "rc4"
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0.rc3
4
+ version: 2.12.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov