decanter 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/decanter/core.rb +2 -2
- data/lib/decanter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 851389181ba5ace271945860779094db94145cd35f0d41965f1666bf93fa9c58
|
4
|
+
data.tar.gz: 1ee42cb0ec72d69f7f4455da1977d4eee65b5c1571263c97923d53568eea97cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 328d2c8ba54713449f8cc25d8ab068cb85aaf9c116a6ab0ad1f78f4eb2b96c3d8c077d665b03527ab7aa93ee2f10144164fb1da2672dac2113a8ce2182028d4e
|
7
|
+
data.tar.gz: a0944c65b45d5f1be8b678b57c1334e988cba7eb7da50e4a320218b6c1dce299f5bf09c812af283cbac36782c807706695e2ca51ee030b8028b773a19d1ac81c
|
data/lib/decanter/core.rb
CHANGED
@@ -55,8 +55,7 @@ module Decanter
|
|
55
55
|
|
56
56
|
def decant(args)
|
57
57
|
return handle_empty_args if args.blank?
|
58
|
-
return empty_required_input_error unless
|
59
|
-
required_input_values_present?(args)
|
58
|
+
return empty_required_input_error unless required_input_values_present?(args)
|
60
59
|
args = args.to_unsafe_h.with_indifferent_access if args.class.name == 'ActionController::Parameters'
|
61
60
|
{}.merge( unhandled_keys(args) )
|
62
61
|
.merge( handled_keys(args) )
|
@@ -78,6 +77,7 @@ module Decanter
|
|
78
77
|
end
|
79
78
|
|
80
79
|
def required_input_values_present?(args={})
|
80
|
+
return true unless any_inputs_required?
|
81
81
|
required_inputs.all? do |input|
|
82
82
|
args.keys.include?(input)
|
83
83
|
end
|
data/lib/decanter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decanter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Francis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|