grape-listing 1.1.10 → 1.1.12

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: 216dc8cc1fddbb989a7b093569bb9acf2c085b52a74d3a0bdfffed84ad2a48c8
4
- data.tar.gz: 9a8a054586ff87f8c00cabfdab4002282eb1dc1b0bea57bdd876ed5e39f4abe5
3
+ metadata.gz: 24a7834408559f2cc73e927ca47c35f730af49d805d8a767d83164e84d146db5
4
+ data.tar.gz: 811060c96285d52836599db7dfccf428bb0ccb94d47b46d7bc01ed4c0b6b13a3
5
5
  SHA512:
6
- metadata.gz: 906c4e171bea8562f8a77e6b50eb2c742e39452ce10d81067a3cf4649e15294229eea1d4e587c724f3782c2337e3293095241d621c71a88e0d0707d1839a39bb
7
- data.tar.gz: eace61cdf1afa188cf656c89b5fce3eeaf56d54ccd0be4ec008b43d9cf5216e2f1e26e6055ccc60767ff07551776854a5d721a954293d8fb40f3cc7bc3918381
6
+ metadata.gz: 71bb4d98aa0ef81e199a9b4d366d2f77afa9acf3d13f76365a216a82e158a33d98d0ee899ca52c3cccf753196ab05fd4bce288ab9147460476863d58bc7b03e7
7
+ data.tar.gz: 6027a2a7b170b43b352df18608556b62ccfd2492775c28d58a84d5fa09b219c28964d41f35e62757120873bb8f21677a5a07640e64875e31f42be3a1d3eee2bf
data/lib/grape/dsl.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'addressable/uri'
2
+
1
3
  module Grape
2
4
  module DSL
3
5
  module InsideRoute
@@ -55,7 +55,7 @@ module GrapeListing
55
55
  value = "%#{value}%" if operator == 'ilike' && value.present?
56
56
 
57
57
  # проверка мульти-поиска по параметру с массивом
58
- if operator == 'multi' && !value.blank?
58
+ if value.is_a?(Array)
59
59
  operator = 'IN'
60
60
  value = "(#{value.map { |i| "'#{i}'" }.join(', ')})"
61
61
  end
@@ -67,12 +67,6 @@ module GrapeListing
67
67
  operator = operator == 'min' ? '>=' : '<='
68
68
  end
69
69
 
70
- # check array operator
71
- if operator == 'array' && value.present?
72
- operator = '='
73
- value = "{#{value}}"
74
- end
75
-
76
70
  [operator, value]
77
71
  end
78
72
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-listing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Павел Бабин
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-01 00:00:00.000000000 Z
11
+ date: 2024-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack