decanter 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +32 -33
- data/lib/decanter/core.rb +5 -4
- data/lib/decanter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba2b23d17f52592b2a21e453004c7102c622df2491cb8d5d95f482e5d26347d0
|
|
4
|
+
data.tar.gz: 0d9eecf1f76c89ba9d85887298e80ca855ba76ffc9bb19fcb3b4a413cf4f0edf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2cbab90bbb29ae93fc42b525ed2e0b0ad52c536a0a5214f7b77104008bb72f7b0043fb32dfbf80966fd869476cd20f4776f4f449b7efa74beb8ecedb903c91c6
|
|
7
|
+
data.tar.gz: 5ed2f960705a4209a3989a8800326d130922a3e4966c80350f2a366c727b3006ec340d23823f10c8949351e3b922fb5df45578c5059d582da7ce25dfe45b9ce5
|
data/Gemfile.lock
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
decanter (1.1.
|
|
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 (
|
|
12
|
-
actionview (=
|
|
13
|
-
activesupport (=
|
|
14
|
-
rack (~>
|
|
15
|
-
rack-test (
|
|
16
|
-
rails-dom-testing (~>
|
|
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 (
|
|
19
|
-
activesupport (=
|
|
18
|
+
actionview (5.1.4)
|
|
19
|
+
activesupport (= 5.1.4)
|
|
20
20
|
builder (~> 3.1)
|
|
21
|
-
|
|
22
|
-
rails-dom-testing (~>
|
|
21
|
+
erubi (~> 1.4)
|
|
22
|
+
rails-dom-testing (~> 2.0)
|
|
23
23
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
24
|
-
activesupport (
|
|
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
|
-
|
|
36
|
-
i18n (0.9.
|
|
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.
|
|
44
|
-
nokogiri (1.8.
|
|
44
|
+
minitest (5.11.3)
|
|
45
|
+
nokogiri (1.8.2)
|
|
45
46
|
mini_portile2 (~> 2.3.0)
|
|
46
|
-
rack (
|
|
47
|
-
rack-test (0.
|
|
48
|
-
rack (>= 1.0)
|
|
49
|
-
rails-
|
|
50
|
-
activesupport (>= 4.2.0
|
|
51
|
-
|
|
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 (
|
|
58
|
-
actionpack (=
|
|
59
|
-
activesupport (=
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
101
|
+
1.16.1
|
data/lib/decanter/core.rb
CHANGED
|
@@ -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
|
|
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
|
|
79
|
+
def required_input_keys_present?(args={})
|
|
80
80
|
return true unless any_inputs_required?
|
|
81
|
-
required_inputs.
|
|
82
|
-
|
|
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
|
|
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.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-
|
|
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.
|
|
183
|
+
rubygems_version: 2.7.3
|
|
184
184
|
signing_key:
|
|
185
185
|
specification_version: 4
|
|
186
186
|
summary: Form Parser for Rails
|