scoped_search 4.1.11 → 4.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: 7a3be22acffe6a33b115957197a5eca96b2e9cf2abe445b657b302663594abbe
4
- data.tar.gz: a97d2cd9a8db87347dee308b1340e87967a887dd6b3c5c7b2124f7d9859a9843
3
+ metadata.gz: 0fe5811549cf2e222ac16ea429293269abdd0734793b9e83611e76527acd905b
4
+ data.tar.gz: 22463f4c28a03919dc7e42cd4942dcc3d66c0291bcb087fa5ad1688492726efd
5
5
  SHA512:
6
- metadata.gz: 840841fa78847d12b0f71ef620dbc73905e34a48325e10864ac56bf4aa746659d12f5cbbb18847c660e019bd42700700afb04928e7ccd48871bfe427ca8ba824
7
- data.tar.gz: 11839160ebde29751173c28c718546d92a4378c316f081632f18eef2d688d569a4f1277caf14c40c4896f2168a7e4f42d0717af7482d430de13e9b04b3e77b9a
6
+ metadata.gz: 3e36707917762b0f2759da997bceb96b2f91b91bcbdb920d03a1738e408bc72a545e380f55bd5c35b9448d2916ac7ddb5dcc0ec623b6a36726d464ac818e15cb
7
+ data.tar.gz: 1b0e4c026cffd08a3851a5929dd8ee7244c041c27d282789bac19fb7af77e2b0641e8d80cf52fcf8f8318190f15c647bcdf76ac98b3576c537a65a5250ec7784
@@ -509,7 +509,7 @@ module ScopedSearch
509
509
  raise ScopedSearch::QueryNotSupported, "Field '#{lhs.value}' not recognized for searching!" unless field
510
510
 
511
511
  # see if the value passes user defined validation
512
- if operator == :in
512
+ if [:in, :notin].include?(operator)
513
513
  rhs.value.split(',').each { |v| validate_value(field, v) }
514
514
  else
515
515
  validate_value(field, rhs.value)
@@ -1,3 +1,3 @@
1
1
  module ScopedSearch
2
- VERSION = "4.1.11"
2
+ VERSION = "4.1.12"
3
3
  end
@@ -68,6 +68,8 @@ describe ScopedSearch::QueryBuilder do
68
68
 
69
69
  lambda { ScopedSearch::QueryBuilder.build_query(@definition, 'test_field ^ (1,2)') }.should_not raise_error
70
70
  lambda { ScopedSearch::QueryBuilder.build_query(@definition, 'test_field ^ (1,a)') }.should raise_error(ScopedSearch::QueryNotSupported)
71
+ lambda { ScopedSearch::QueryBuilder.build_query(@definition, 'test_field !^ (1,2)') }.should_not raise_error
72
+ lambda { ScopedSearch::QueryBuilder.build_query(@definition, 'test_field !^ (1,a)') }.should raise_error(ScopedSearch::QueryNotSupported)
71
73
  end
72
74
 
73
75
  it "should display custom error from validator" do
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scoped_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.11
4
+ version: 4.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amos Benari
8
8
  - Willem van Bergen
9
9
  - Wes Hays
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-06-05 00:00:00.000000000 Z
13
+ date: 2023-10-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -144,7 +144,7 @@ homepage: https://github.com/wvanbergen/scoped_search/wiki
144
144
  licenses:
145
145
  - MIT
146
146
  metadata: {}
147
- post_install_message:
147
+ post_install_message:
148
148
  rdoc_options:
149
149
  - "--title"
150
150
  - scoped_search
@@ -165,8 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubygems_version: 3.4.13
169
- signing_key:
168
+ rubygems_version: 3.1.6
169
+ signing_key:
170
170
  specification_version: 4
171
171
  summary: Easily search you ActiveRecord models with a simple query language using
172
172
  a named scope