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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f08fb847b96e6f907578418b232b6b6f0e2298b379bdeb448d5dff75c2f3373
4
- data.tar.gz: 6a38f8bffe1cddca494c0870078e553b245f3a9f608f082538c6a96a7d69ee27
3
+ metadata.gz: 851389181ba5ace271945860779094db94145cd35f0d41965f1666bf93fa9c58
4
+ data.tar.gz: 1ee42cb0ec72d69f7f4455da1977d4eee65b5c1571263c97923d53568eea97cc
5
5
  SHA512:
6
- metadata.gz: a5336510010de990dac112123715948ff414aabd6b730015d7c9ebc78da474f08e48f9c085494ff6f515afc228d58a31727fb373944158c8f3024f3ee544a14d
7
- data.tar.gz: 740264d087fedb4208714e241baf5d65f4cf5b64919fd2cda1a7160465ef238f5db27f22227ae03aa7dd209fc1eb90e54c44d7eb190557a371bfff0f46ac65d1
6
+ metadata.gz: 328d2c8ba54713449f8cc25d8ab068cb85aaf9c116a6ab0ad1f78f4eb2b96c3d8c077d665b03527ab7aa93ee2f10144164fb1da2672dac2113a8ce2182028d4e
7
+ data.tar.gz: a0944c65b45d5f1be8b678b57c1334e988cba7eb7da50e4a320218b6c1dce299f5bf09c812af283cbac36782c807706695e2ca51ee030b8028b773a19d1ac81c
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Decanter
2
- VERSION = '1.1.5'.freeze
2
+ VERSION = '1.1.6'.freeze
3
3
  end
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.5
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 00:00:00.000000000 Z
12
+ date: 2018-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport