elasticsearch_query 0.1.2 → 0.1.4

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
  SHA1:
3
- metadata.gz: 947e124ddb471f70dad5a0caf9f27a1058d6cbb3
4
- data.tar.gz: de1f1e1c75f0a308cf38a6cb0d71cfc6c3b2e6a0
3
+ metadata.gz: 3b7dae4d8223abee9fa7445967d0de3a98a1e5ac
4
+ data.tar.gz: 54c3721c81a46637c4245378b634a9fa363cb035
5
5
  SHA512:
6
- metadata.gz: 0f871f3925301d1c15e5b6af22c7df0735520165b90b531c30b7bcf9eeefd58f272d3a2077c79ae4b4dc08080dff6aabc4b53bf603518d7cef7eeaa0649a2a5f
7
- data.tar.gz: 38b1243114480c9154afe2271f66197c86337f74db03af1a098d3ea601fa00ccc0f89bce05af3543a42dd4a10aded7e32236b546d80ff5f580cbe32596d30493
6
+ metadata.gz: 51ab090dc88ee074e8d455fdd26fcf3f8907cd04cfbff58089ad75cabb5a3249421531eb37d972a957c511354bb26e182c90fcb82d06335e98a4b2c3bb63bcf6
7
+ data.tar.gz: 71ef71664c92803818a503d15f5f70e0201759de36366bd61ae5bed8b3e0b80fdc2ea7c0b2f0fa8ef4d681443284f437c4fb6b6046a5abed2385d6f29ebf52aa
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elasticsearch_query (0.1.1)
4
+ elasticsearch_query (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,8 +2,22 @@ module ElasticsearchQuery
2
2
  module FilterFormatter
3
3
  class Match < Base
4
4
  def to_hash
5
- { match: { @name => @value } }
5
+ { match: { @name => value } }
6
+ end
7
+
8
+ private
9
+
10
+ def value
11
+ array? ? array : @value
12
+ end
13
+
14
+ def array?
15
+ array.length > 1
16
+ end
17
+
18
+ def array
19
+ @array ||= @value.split(",")
6
20
  end
7
21
  end
8
22
  end
9
- end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module ElasticsearchQuery
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  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.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Orlov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-01 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler