elasticsearch_query 0.1.4 → 0.1.5
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5718f45baed1683548365a1f965e002dc1ff465aad73e89388c8e9ee8963cb32
|
4
|
+
data.tar.gz: 8d125c04dbf463147ec71eae1ac8889f5b47e904dd5398d5da375b7dca3d4378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 219c411e8973fd1fc4c88bfa907f9a60dbe24c97fd673975f6a2f1cd78ac0e890574b8e66d852115715e22d85ef1854c47258a6bec9352e034f85bb4dc43e33a
|
7
|
+
data.tar.gz: 97fedcd5411c7a59c13136aa8515207755dda0e23e045a8a349c7a6e17b23a269917e233683d462c9e0c4798242b016921424941080f6d69620be9d965e7a5e3
|
@@ -1,12 +1,18 @@
|
|
1
1
|
module ElasticsearchQuery
|
2
2
|
module FilterFormatter
|
3
3
|
autoload :Base, 'elasticsearch_query/filter_formatter/base'
|
4
|
+
autoload :Custom,'elasticsearch_query/filter_formatter/custom'
|
4
5
|
autoload :Match, 'elasticsearch_query/filter_formatter/match'
|
5
6
|
autoload :Range, 'elasticsearch_query/filter_formatter/range'
|
6
7
|
|
7
8
|
class << self
|
8
9
|
def formatter_for( value )
|
9
|
-
|
10
|
+
case value
|
11
|
+
when String
|
12
|
+
!!value.match( /\.\./ ) ? FilterFormatter::Range : FilterFormatter::Match
|
13
|
+
when Hash
|
14
|
+
FilterFormatter::Custom
|
15
|
+
end
|
10
16
|
end
|
11
17
|
end
|
12
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Orlov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/elasticsearch_query/filter.rb
|
90
90
|
- lib/elasticsearch_query/filter_formatter.rb
|
91
91
|
- lib/elasticsearch_query/filter_formatter/base.rb
|
92
|
+
- lib/elasticsearch_query/filter_formatter/custom.rb
|
92
93
|
- lib/elasticsearch_query/filter_formatter/match.rb
|
93
94
|
- lib/elasticsearch_query/filter_formatter/range.rb
|
94
95
|
- lib/elasticsearch_query/filters.rb
|
@@ -114,8 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
115
|
- !ruby/object:Gem::Version
|
115
116
|
version: '0'
|
116
117
|
requirements: []
|
117
|
-
|
118
|
-
rubygems_version: 2.6.14
|
118
|
+
rubygems_version: 3.0.3
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Elasticsearch Query from Rails params
|