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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cef201c453c3ee155ecbb445a72e2309ffe15e6
4
- data.tar.gz: a709ae79c2abf91a63d78ff92060a3c4bbe4bb94
3
+ metadata.gz: 14b8f13428c6ea8176fd2f8da334b5c851dd1fab
4
+ data.tar.gz: af64327228ad4b5c6eada4d534f1a215a6e83ed3
5
5
  SHA512:
6
- metadata.gz: 8fcded9927fdd28c064eed135362561c3a6748ac30799b865f645343dde0a948aa4d47303825fb5e301ba2728821465ffed12476239eefb89c715429027f2a0e
7
- data.tar.gz: 5b9fd9c5496d8614ca6ee8426828354321b7945b4f5ab036ad44fdbdda5b51c90d7a69b52fcce2096ed4e7dcb6a6d46fe85e6926f072315dbcc2945a6331df34
6
+ metadata.gz: a6c50a06d3e98cf7978a91a15e183e826bf435f547106d373b1c6a0e2e6d6a6ab238358ee1a7d4172c7b42725d397b4ff6b969987684788113f1fafa8ecf2568
7
+ data.tar.gz: 11b3fbadea521f84acf4e1c7b387944464e75fa86130136fe08650f0499d5e0cfe6a888843c4ea8b4023cef5bb9e46153206e25c61aa4d0aa3c4876d41ccd83f
data/.rubocop.yml CHANGED
@@ -4,9 +4,9 @@ Lint/InheritException:
4
4
  Metrics/AbcSize:
5
5
  Max: 32
6
6
  Metrics/CyclomaticComplexity:
7
- Max: 10
7
+ Max: 11
8
8
  Metrics/PerceivedComplexity:
9
- Max: 10
9
+ Max: 11
10
10
  Metrics/LineLength:
11
11
  Max: 120
12
12
  Metrics/MethodLength:
@@ -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
- next if !attrs.fetch(:required)
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
- return "Param #{param} is required for #{method_name}" if !params.include?(param)
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
@@ -1,3 +1,3 @@
1
1
  module Actionizer
2
- VERSION = '0.12.2'
2
+ VERSION = '0.13.0'
3
3
  end
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.12.2
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-07-30 00:00:00.000000000 Z
11
+ date: 2017-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler