standardapi 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/standard_api/orders.rb +4 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aba7eb96fbb3c8dba47890e2871e70648bdda2e4
4
- data.tar.gz: 0bf9b3de2a4122a8c091e8b34a177dd6911d0cd7
3
+ metadata.gz: 4f276df6b8c02e60277971a4a7c0b4119805a813
4
+ data.tar.gz: f1a04f95d568360aef96f66c5544cd257c210f7c
5
5
  SHA512:
6
- metadata.gz: fbd2ce6353c85738279cb7ceb455c462e1df71fe47b51d445500c6b2f278cd9a739731dce3f00e004c0a74baf9759f2eaf34702579d64e3ad0fde9c88ab8ac06
7
- data.tar.gz: 455c0199f0ad92ed61581397ab53623c06b814f3c0b2ae5cdd07fe774df5aac00dec561765c3e712e16669ffe2e2e09d3c3bf3852df04536f53835f6ff339370
6
+ metadata.gz: 55a1400893f87c82b670ca5b0f523249dfdf719cb0c4521a286e879fdc5b352a95b9aae7e5f91b947562647863c58f7eae1a919aea203fb13a20d6017081559a
7
+ data.tar.gz: 220e40e163998406f669414adeb90d83ed0a957fac003e82532a37f94e527a9cedcb2bd9954ffe4883b6549331ba7843db4807690ff51ba48dc52ca8ea4cd446
@@ -11,7 +11,10 @@ module StandardAPI
11
11
  case orders
12
12
  when Hash
13
13
  orders.each do |key, value|
14
- if permit.include?(key.to_s)
14
+ if key.to_s.count('.') == 1
15
+ key2, key3 = *key.to_s.split('.')
16
+ permitted = sanitize({key2.to_sym => { key3.to_sym => value } }, permit)
17
+ elsif permit.include?(key.to_s)
15
18
  value = value.symbolize_keys if value.is_a?(Hash)
16
19
  permitted = { key.to_sym => value }
17
20
  elsif permit.find { |x| x.is_a?(Hash) && x.has_key?(key.to_s) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standardapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Bracy