fetcheable_on_api 0.2.9 → 0.3
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/lib/fetcheable_on_api/filterable.rb +4 -4
- data/lib/fetcheable_on_api/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: 79efead0c84ab92c84d1debc7550270ad2022cb7db295a6b6f520a941e664c4e
|
4
|
+
data.tar.gz: a05ebbedad3a89ef8e0d809b1d88a6c91e8e8664a5df09cfa793ca1c50e5b03f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c68736cdf36dd81d9e7808f3b2a1be45a2da28707e7a74759deb15004823e918abdd38fbd6f9269b2aa646f9f824cc9b05c74dd896af898f794faabc03ac614
|
7
|
+
data.tar.gz: b0c09cabf949739e4d2ba5e91b61c3c03e7c493be82614118145b743e284286985e0da0f1c7e1c0985c5b2a81927c72addc82612bbccb43a65a5fc5343f1f140
|
@@ -81,7 +81,7 @@ module FetcheableOnApi
|
|
81
81
|
keys.each_with_index do |key, index|
|
82
82
|
predicate = filters_configuration[key.to_sym].fetch(:with, :ilike)
|
83
83
|
|
84
|
-
if(%i[between not_between].include?(predicate))
|
84
|
+
if(%i[between not_between in in_all in_any].include?(predicate))
|
85
85
|
format = filters_configuration[key.to_sym].fetch(:format) { nil }
|
86
86
|
keys[index] = {key => []} if format == :array
|
87
87
|
next
|
@@ -167,11 +167,11 @@ module FetcheableOnApi
|
|
167
167
|
when :gteq_any
|
168
168
|
klass.arel_table[column_name].gteq_any(value)
|
169
169
|
when :in
|
170
|
-
klass.arel_table[column_name].in(value)
|
170
|
+
klass.arel_table[column_name].in(value.flatten.compact.uniq)
|
171
171
|
when :in_all
|
172
|
-
klass.arel_table[column_name].in_all(value)
|
172
|
+
klass.arel_table[column_name].in_all(value.flatten.compact.uniq)
|
173
173
|
when :in_any
|
174
|
-
klass.arel_table[column_name].in_any(value)
|
174
|
+
klass.arel_table[column_name].in_any(value.flatten.compact.uniq)
|
175
175
|
when :lt
|
176
176
|
klass.arel_table[column_name].lt(value)
|
177
177
|
when :lt_all
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fetcheable_on_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabien
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|