fetcheable_on_api 0.2.9 → 0.3

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: 5bb55d787e51ce7a736895cad22e2c45efe0fb18aa7ece1f7b189ea3352c67c9
4
- data.tar.gz: '01847855adb1f4206935e3acd4d2c7e3540e7e34ad7c7b82259d1bd1969c9f4f'
3
+ metadata.gz: 79efead0c84ab92c84d1debc7550270ad2022cb7db295a6b6f520a941e664c4e
4
+ data.tar.gz: a05ebbedad3a89ef8e0d809b1d88a6c91e8e8664a5df09cfa793ca1c50e5b03f
5
5
  SHA512:
6
- metadata.gz: 04eca701b11c614adaf3710176ef1f13b02eb9ee4796e41e8e312753a09531e427c6ec41962b888cebf9002203ecc2a9b214c86f5eb73852a7bab917ff9c3568
7
- data.tar.gz: 8791797d2dd3988264a584f9cd2d8cce37efc64575680aa5ca1f55af84641bac8c94f43ef43651bf4ea53acc1965fc5d7aedc18e99c79a5d044218a650a80cee
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FetcheableOnApi
4
- VERSION = '0.2.9'.freeze
4
+ VERSION = '0.3'.freeze
5
5
  end
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.2.9
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-04-23 00:00:00.000000000 Z
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport