substance 0.26.0.2 → 0.27.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/substance/input_model.rb +2 -0
- data/lib/substance/objects/output.rb +9 -1
- data/lib/substance/version.rb +1 -1
- metadata +23 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 795bb2103775f30f6d314d8614077535d6ae0e11ea9f891724c55e7e88a817cb
|
4
|
+
data.tar.gz: 3d2ae3017cedf66ae0aaa3161ab48814ddadfc342bbef1c9acc6c74a0bc50492
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/substance/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: substance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 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-04
|
11
|
+
date: 2021-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.2.1
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: activesupport
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -30,42 +44,42 @@ dependencies:
|
|
30
44
|
requirements:
|
31
45
|
- - '='
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
47
|
+
version: 0.27.1
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - '='
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
54
|
+
version: 0.27.1
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: tablesalt
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - '='
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
61
|
+
version: 0.27.1
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - '='
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
68
|
+
version: 0.27.1
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: technologic
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - '='
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
75
|
+
version: 0.27.1
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - '='
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
82
|
+
version: 0.27.1
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: faker
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -222,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
236
|
- !ruby/object:Gem::Version
|
223
237
|
version: '0'
|
224
238
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
239
|
+
rubygems_version: 3.2.26
|
226
240
|
signing_key:
|
227
241
|
specification_version: 4
|
228
242
|
summary: Base classes for building powerful service objects
|