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 +4 -4
- data/lib/scoped_search/query_builder.rb +1 -1
- data/lib/scoped_search/version.rb +1 -1
- data/spec/unit/query_builder_spec.rb +2 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fe5811549cf2e222ac16ea429293269abdd0734793b9e83611e76527acd905b
|
4
|
+
data.tar.gz: 22463f4c28a03919dc7e42cd4942dcc3d66c0291bcb087fa5ad1688492726efd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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)
|
@@ -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.
|
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-
|
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.
|
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
|