substance 0.27.0 → 0.27.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f84c3fd152df42bb33d977b642cbfa79cb8402d21fa8210bb1fbfe7e77d3171
4
- data.tar.gz: fcdb7eeeae46f129a0f29db040bee6a0bc37b1c663a65718f0a60b8e4d9e5fbe
3
+ metadata.gz: 795bb2103775f30f6d314d8614077535d6ae0e11ea9f891724c55e7e88a817cb
4
+ data.tar.gz: 3d2ae3017cedf66ae0aaa3161ab48814ddadfc342bbef1c9acc6c74a0bc50492
5
5
  SHA512:
6
- metadata.gz: b54c162ec54808f89665208f43c09d0cc88c18507f6e6f80d1a8245b660ba24bffc52114728db9dfe1a2e7e5a822f2690379b9a3acd4816fe671227ece4dcd95
7
- data.tar.gz: d698e9c0c8ac60ea3d230777c08dc1eb14b9690f954f6715e3b14f7d46aea4ae20b776aa46f6964ee8de9680f80af66c82eb2a57dc126c188e59a800cc1966d7
6
+ metadata.gz: 0c2e8dec05d80738715d63fcf610e7c458c62b1a636685d73eacca741dc44b11ee94dca6447121b2624719286ed996bced33c7bd63d8489c87d819c5faa77555
7
+ data.tar.gz: 5ff6c47d7b7eb981b8bc00e53847ed8d55ee8bdbedd876b7cdaee57b7c6bdf66e992cac1b411c94cab45d479c6ab26f1afc0a61dd9684bf4c99f5498d5301ed5
@@ -39,7 +39,7 @@ module Substance
39
39
 
40
40
  def ensure_validation_before(method)
41
41
  around_method method do |*args, **opts|
42
- raise NotValidatedError unless validated?
42
+ raise NotValidatedError unless validated_output?(method)
43
43
 
44
44
  # TODO: replace with `super(...)` when <= 2.6 support is dropped
45
45
  if RUBY_VERSION < "2.7" && opts.blank?
@@ -60,6 +60,14 @@ module Substance
60
60
  def output_struct
61
61
  Struct.new(*_outputs)
62
62
  end
63
+
64
+ def validated_output?(method)
65
+ validated? || begin
66
+ attr_name = method.to_s.delete("=").to_sym
67
+
68
+ _options.include?(attr_name) || _arguments.include?(attr_name)
69
+ end
70
+ end
63
71
  end
64
72
  end
65
73
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Substance
4
4
  # This constant is managed by spicerack
5
- VERSION = "0.27.0"
5
+ VERSION = "0.27.1"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: substance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Freshly Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-24 00:00:00.000000000 Z
11
+ date: 2021-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -44,42 +44,42 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.27.0
47
+ version: 0.27.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.27.0
54
+ version: 0.27.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: tablesalt
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.27.0
61
+ version: 0.27.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.27.0
68
+ version: 0.27.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: technologic
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.27.0
75
+ version: 0.27.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.27.0
82
+ version: 0.27.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faker
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
238
  requirements: []
239
- rubygems_version: 3.2.25
239
+ rubygems_version: 3.2.26
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: Base classes for building powerful service objects