redi_search 6.2.3 → 6.3.0

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: 63f3598056b4046322f6e50414541041778818d7c7acde364329c8d36d1cebe2
4
- data.tar.gz: 9b4c6c195b823c4c8e9110b5266004c6a1e74cb64fca4902723761dcf85c007a
3
+ metadata.gz: d005b7e0b289004277bf5526a4270aa7dd707df16520ae0e2b9df577b12601c2
4
+ data.tar.gz: 9b3954997aa84e9e25037c6b332c00139d7d112dad9fffbbe32281f9da0fdfe1
5
5
  SHA512:
6
- metadata.gz: 4d3f448529f1d98d046b6432c4016e0548d17dba2c4d8f88904ea04ab341dd1315bb4e2793ad200cb143161343d3bf104a7f141a69157b15ee7bf9cd851ff9d0
7
- data.tar.gz: 02b8cffcdedd94b78bc38c0fa19b9aba0d28642f96396dc6cfcf5cd4f6cef6eead62c5dbb2562ef00de6d27eefd72cbcf115d852b9373becf5009477dcb30089
6
+ metadata.gz: dfcbe3552fef2dcb9abda2ad3e51c2bf35a2d2a16a631f249d1f1a89e5ed3aab5f0815387ab5a472f13db9c1d8a430f114840e81147e2b44160b1890be0f6c94
7
+ data.tar.gz: 3e2c1b66bb0053f42d886ab765468a213ab576b31d7d95a08f8bd216dcb8a933abbd76670207b2c9b366e988622a0aa1ece981901bb368916087c85a75b0726f
@@ -21,6 +21,7 @@ module RediSearch
21
21
  def to_s
22
22
  if term.is_a?(Range) then stringify_range
23
23
  elsif field.is_a?(Schema::TagField) then stringify_tag
24
+ elsif term.is_a?(Array) then stringify_array
24
25
  else
25
26
  stringify_query
26
27
  end
@@ -63,6 +64,10 @@ module RediSearch
63
64
  "{ #{Array(term).join(' | ')} }"
64
65
  end
65
66
 
67
+ def stringify_array
68
+ Array(term).map { |str| "`#{str}`" }.join(" | ")
69
+ end
70
+
66
71
  def stringify_range
67
72
  first, last = term.first, term.last
68
73
  first = "-inf" if first == -Float::INFINITY
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RediSearch
4
- VERSION = "6.2.3"
4
+ VERSION = "6.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redi_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.3
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza