actionizer 0.12.2 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/lib/actionizer/inputs.rb +7 -3
- data/lib/actionizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14b8f13428c6ea8176fd2f8da334b5c851dd1fab
|
4
|
+
data.tar.gz: af64327228ad4b5c6eada4d534f1a215a6e83ed3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6c50a06d3e98cf7978a91a15e183e826bf435f547106d373b1c6a0e2e6d6a6ab238358ee1a7d4172c7b42725d397b4ff6b969987684788113f1fafa8ecf2568
|
7
|
+
data.tar.gz: 11b3fbadea521f84acf4e1c7b387944464e75fa86130136fe08650f0499d5e0cfe6a888843c4ea8b4023cef5bb9e46153206e25c61aa4d0aa3c4876d41ccd83f
|
data/.rubocop.yml
CHANGED
data/lib/actionizer/inputs.rb
CHANGED
@@ -18,11 +18,15 @@ module Actionizer
|
|
18
18
|
return "Param #{param} can't be nil" if !attrs.fetch(:null) && params[param].nil?
|
19
19
|
|
20
20
|
type = attrs.fetch(:type)
|
21
|
-
return "Param #{param} must descend from #{type}" if type && !(params[param].class <= type)
|
22
21
|
|
23
|
-
|
22
|
+
# Type check if param was required, or if optional and passed in
|
23
|
+
if attrs.fetch(:required) || params.include?(param)
|
24
|
+
return "Param #{param} must descend from #{type}" if type && !(params[param].class <= type)
|
25
|
+
end
|
24
26
|
|
25
|
-
|
27
|
+
if attrs.fetch(:required) && !params.include?(param)
|
28
|
+
return "Param #{param} is required for #{method_name}"
|
29
|
+
end
|
26
30
|
end
|
27
31
|
|
28
32
|
false
|
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.13.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: 2017-
|
11
|
+
date: 2017-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|