decanter 1.1.6 → 1.1.7

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: 851389181ba5ace271945860779094db94145cd35f0d41965f1666bf93fa9c58
4
- data.tar.gz: 1ee42cb0ec72d69f7f4455da1977d4eee65b5c1571263c97923d53568eea97cc
3
+ metadata.gz: ba2b23d17f52592b2a21e453004c7102c622df2491cb8d5d95f482e5d26347d0
4
+ data.tar.gz: 0d9eecf1f76c89ba9d85887298e80ca855ba76ffc9bb19fcb3b4a413cf4f0edf
5
5
  SHA512:
6
- metadata.gz: 328d2c8ba54713449f8cc25d8ab068cb85aaf9c116a6ab0ad1f78f4eb2b96c3d8c077d665b03527ab7aa93ee2f10144164fb1da2672dac2113a8ce2182028d4e
7
- data.tar.gz: a0944c65b45d5f1be8b678b57c1334e988cba7eb7da50e4a320218b6c1dce299f5bf09c812af283cbac36782c807706695e2ca51ee030b8028b773a19d1ac81c
6
+ metadata.gz: 2cbab90bbb29ae93fc42b525ed2e0b0ad52c536a0a5214f7b77104008bb72f7b0043fb32dfbf80966fd869476cd20f4776f4f449b7efa74beb8ecedb903c91c6
7
+ data.tar.gz: 5ed2f960705a4209a3989a8800326d130922a3e4966c80350f2a366c727b3006ec340d23823f10c8949351e3b922fb5df45578c5059d582da7ce25dfe45b9ce5
@@ -1,30 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decanter (1.1.4)
4
+ decanter (1.1.7)
5
5
  actionpack (>= 4.2.10)
6
6
  activesupport
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (4.2.10)
12
- actionview (= 4.2.10)
13
- activesupport (= 4.2.10)
14
- rack (~> 1.6)
15
- rack-test (~> 0.6.2)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
11
+ actionpack (5.1.4)
12
+ actionview (= 5.1.4)
13
+ activesupport (= 5.1.4)
14
+ rack (~> 2.0)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
- actionview (4.2.10)
19
- activesupport (= 4.2.10)
18
+ actionview (5.1.4)
19
+ activesupport (= 5.1.4)
20
20
  builder (~> 3.1)
21
- erubis (~> 2.7.0)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
- activesupport (4.2.10)
24
+ activesupport (5.1.4)
25
+ concurrent-ruby (~> 1.0, >= 1.0.2)
25
26
  i18n (~> 0.7)
26
27
  minitest (~> 5.1)
27
- thread_safe (~> 0.3, >= 0.3.4)
28
28
  tzinfo (~> 1.1)
29
29
  builder (3.2.3)
30
30
  concurrent-ruby (1.0.5)
@@ -32,35 +32,34 @@ GEM
32
32
  diff-lcs (1.3)
33
33
  docile (1.1.5)
34
34
  dotenv (2.2.1)
35
- erubis (2.7.0)
36
- i18n (0.9.1)
35
+ erubi (1.7.0)
36
+ i18n (0.9.3)
37
37
  concurrent-ruby (~> 1.0)
38
38
  json (2.1.0)
39
39
  loofah (2.1.1)
40
40
  crass (~> 1.0.2)
41
41
  nokogiri (>= 1.5.9)
42
+ method_source (0.9.0)
42
43
  mini_portile2 (2.3.0)
43
- minitest (5.10.3)
44
- nokogiri (1.8.1)
44
+ minitest (5.11.3)
45
+ nokogiri (1.8.2)
45
46
  mini_portile2 (~> 2.3.0)
46
- rack (1.6.8)
47
- rack-test (0.6.3)
48
- rack (>= 1.0)
49
- rails-deprecated_sanitizer (1.0.3)
50
- activesupport (>= 4.2.0.alpha)
51
- rails-dom-testing (1.0.8)
52
- activesupport (>= 4.2.0.beta, < 5.0)
53
- nokogiri (~> 1.6)
54
- rails-deprecated_sanitizer (>= 1.0.1)
47
+ rack (2.0.4)
48
+ rack-test (0.8.2)
49
+ rack (>= 1.0, < 3)
50
+ rails-dom-testing (2.0.3)
51
+ activesupport (>= 4.2.0)
52
+ nokogiri (>= 1.6)
55
53
  rails-html-sanitizer (1.0.3)
56
54
  loofah (~> 2.0)
57
- railties (4.2.10)
58
- actionpack (= 4.2.10)
59
- activesupport (= 4.2.10)
55
+ railties (5.1.4)
56
+ actionpack (= 5.1.4)
57
+ activesupport (= 5.1.4)
58
+ method_source
60
59
  rake (>= 0.8.7)
61
60
  thor (>= 0.18.1, < 2.0)
62
61
  rake (10.5.0)
63
- rspec-core (3.7.0)
62
+ rspec-core (3.7.1)
64
63
  rspec-support (~> 3.7.0)
65
64
  rspec-expectations (3.7.0)
66
65
  diff-lcs (>= 1.2.0, < 2.0)
@@ -76,7 +75,7 @@ GEM
76
75
  rspec-expectations (~> 3.7.0)
77
76
  rspec-mocks (~> 3.7.0)
78
77
  rspec-support (~> 3.7.0)
79
- rspec-support (3.7.0)
78
+ rspec-support (3.7.1)
80
79
  simplecov (0.15.1)
81
80
  docile (~> 1.1.0)
82
81
  json (>= 1.8, < 3)
@@ -84,7 +83,7 @@ GEM
84
83
  simplecov-html (0.10.2)
85
84
  thor (0.20.0)
86
85
  thread_safe (0.3.6)
87
- tzinfo (1.2.4)
86
+ tzinfo (1.2.5)
88
87
  thread_safe (~> 0.1)
89
88
 
90
89
  PLATFORMS
@@ -99,4 +98,4 @@ DEPENDENCIES
99
98
  simplecov (~> 0.15.1)
100
99
 
101
100
  BUNDLED WITH
102
- 1.16.0
101
+ 1.16.1
@@ -55,7 +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 required_input_values_present?(args)
58
+ return empty_required_input_error unless required_input_keys_present?(args)
59
59
  args = args.to_unsafe_h.with_indifferent_access if args.class.name == 'ActionController::Parameters'
60
60
  {}.merge( unhandled_keys(args) )
61
61
  .merge( handled_keys(args) )
@@ -76,10 +76,11 @@ module Decanter
76
76
  end
77
77
  end
78
78
 
79
- def required_input_values_present?(args={})
79
+ def required_input_keys_present?(args={})
80
80
  return true unless any_inputs_required?
81
- required_inputs.all? do |input|
82
- args.keys.include?(input)
81
+ compact_inputs = required_inputs.compact
82
+ compact_inputs.all? do |input|
83
+ args.keys.map(&:to_sym).include?(input)
83
84
  end
84
85
  end
85
86
 
@@ -1,3 +1,3 @@
1
1
  module Decanter
2
- VERSION = '1.1.6'.freeze
2
+ VERSION = '1.1.7'.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.6
4
+ version: 1.1.7
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-17 00:00:00.000000000 Z
12
+ date: 2018-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.7.0
183
+ rubygems_version: 2.7.3
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Form Parser for Rails