actionizer 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/actionizer/inputs.rb +9 -8
- data/lib/actionizer/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4d7f51955ed2ca2b46445f35e2a8b60d8a8fdbc70025950ad2ed357ab32957c3
|
4
|
+
data.tar.gz: 52fa1c5738c0d4ec813e849b0113f80372d46ad27dbeb3b1b3ee8a732c2b1f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 054a896f966b3dc40999a14e8425d427bf294733f85a6fd476ba3416b2fda3c96e3e88f10f1f4f667136a281265d916c55ee8c34afd6f191d28b08315079114d
|
7
|
+
data.tar.gz: 61a09c9ee3bc7bc64378cc039fc10bd600fe3b5c17685c8317315af6c8a1c77900f85ab1a91ef9c4bb8f155466635ab740f3b0f1a665255f7a5b83e4a55253b7
|
data/lib/actionizer/inputs.rb
CHANGED
@@ -23,17 +23,18 @@ module Actionizer
|
|
23
23
|
return "Param #{param} can't be nil"
|
24
24
|
end
|
25
25
|
|
26
|
-
|
26
|
+
if attrs.fetch(:required) && !params.include?(param)
|
27
|
+
return "Param #{param} is required for #{method_name}"
|
28
|
+
end
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
if type && !(params[param].class <= type)
|
31
|
-
return "Param #{param} must descend from #{type}"
|
32
|
-
end
|
30
|
+
if !params.include?(param)
|
31
|
+
next
|
33
32
|
end
|
34
33
|
|
35
|
-
|
36
|
-
|
34
|
+
type = attrs.fetch(:type)
|
35
|
+
param_class = params[param].is_a?(Class) ? params[param] : params[param].class
|
36
|
+
if type && !(param_class <= type)
|
37
|
+
return "Param #{param} must descend from #{type}"
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
data/lib/actionizer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nichols
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -154,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
|
158
|
-
rubygems_version: 2.6.11
|
157
|
+
rubygems_version: 3.0.1
|
159
158
|
signing_key:
|
160
159
|
specification_version: 4
|
161
160
|
summary: Turn your classes into small, modular, reusable Actions
|