substance 0.26.0.3 → 0.27.2

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: 06d17ef73c6a6435b688319db0ee4da04fd889f105158fdcf435eb98c261912a
4
- data.tar.gz: de72505c4c2cd0f3255a783b00a5b2a30141a3d679b4322c2d9b173f726abec7
3
+ metadata.gz: 010fc9896ec8713f8d31e266132b67b339d546f16767a876652198cfeccae251
4
+ data.tar.gz: 45125ce3f49dd3263c55f9e272fd1a21422e3c1cb2194cc26707d2db034671f3
5
5
  SHA512:
6
- metadata.gz: b81df310b7a511fa49640afa919f23d04ccc936514232dfd842f8dba9fa201bbf9b79869f43a866f0d5dddc8553d38066786f1b928ad195f91619cec8218be35
7
- data.tar.gz: 3fd43bb1afe0acdd7fb07c5ab4a86b6016f675117429586388a530b4f1e5d6d26852ea57af6eaad13f7aa617d7254ca2c9a4b41f3ef3b56e30858a46b35b40d2
6
+ metadata.gz: 7404de0be11c3073ca46d71ca0174da11e33240b56968e058cd975241bba07bc8fb4e371acebfd0f8a63010dbe657e94461247431e5c113210257a0472efb941
7
+ data.tar.gz: 714b59b075761e6560060078ef24f28c3b3a55bd30b7432142ec4ef52cafd69dfb58a263bec62f347a4238bfda4208ece8613401e69d6a828bd8d246915d9b84
@@ -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.26.0.3"
5
+ VERSION = "0.27.2"
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.26.0.3
4
+ version: 0.27.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Freshly Engineering
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-04 00:00:00.000000000 Z
11
+ date: 2022-02-08 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.26.0.3
47
+ version: 0.27.2
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.26.0.3
54
+ version: 0.27.2
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.26.0.3
61
+ version: 0.27.2
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.26.0.3
68
+ version: 0.27.2
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.26.0.3
75
+ version: 0.27.2
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.26.0.3
82
+ version: 0.27.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faker
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +221,7 @@ metadata:
221
221
  homepage_uri: https://github.com/Freshly/spicerack/blob/main/substance
222
222
  source_code_uri: https://github.com/Freshly/spicerack/blob/main/substance
223
223
  changelog_uri: https://github.com/Freshly/spicerack/blob/main/substance/CHANGELOG.md
224
- post_install_message:
224
+ post_install_message:
225
225
  rdoc_options: []
226
226
  require_paths:
227
227
  - lib
@@ -236,8 +236,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
238
  requirements: []
239
- rubygems_version: 3.1.6
240
- signing_key:
239
+ rubygems_version: 3.2.32
240
+ signing_key:
241
241
  specification_version: 4
242
242
  summary: Base classes for building powerful service objects
243
243
  test_files: []