udongo 7.7.1 → 7.7.2

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: e1bc268926d391c67db381bc321124f25fb5b479
4
- data.tar.gz: 8ddc0106a0274bf68a7729589aab428d21b15455
3
+ metadata.gz: 90cb5755b0df3482d5d074d11028e0576c96e541
4
+ data.tar.gz: fe5fb945dd8102abe82ebbce12bf0c4f17339a41
5
5
  SHA512:
6
- metadata.gz: dfd4ee64f72e513ec44dd895c7af16982c3e6b453658f704c91f4bcbb80b7ba982cf39b147f288c88490cdd3e94bf6b7703129df295d37cb873c6c5eab714a35
7
- data.tar.gz: 4b8914edf8212a2addf4ec9690402fb1abbe4bff3c4198c82eda6649035e8981041e292789eabed58f8748d297a94de6b8e8a059e4e8f5ea5b86eedf19ac4073
6
+ metadata.gz: e850585aaf1552acfdb975c7b3a494654e36b555be5c26455e154ee06ee70b26bec28f1716f597bce6e2c2f550f2e7c09366734fcf064cd3225a20221c778b82
7
+ data.tar.gz: c663649cdffc9efe5369944cbf7ebf48703f381d81cc66ffaf459907ef371517181a2258558363b29fe5e12427c44ce997a92b934de2d883227827245263d7f2
@@ -1,3 +1,8 @@
1
+ 7.7.2 - 2018-10-04
2
+ --
3
+ * Fixes issue with blank search terms giving an unwanted AR exception.
4
+
5
+
1
6
  7.7.1 - 2018-09-24
2
7
  --
3
8
  * Fixes issue with the searchable shared examples. They were still assuming the
@@ -38,8 +38,6 @@ module Udongo::Search
38
38
  end
39
39
 
40
40
  def indices
41
- return [] unless term.present?
42
-
43
41
  # Having the searchmodules sorted by weight returns indices in the
44
42
  # correct order.
45
43
  @indices ||= SearchModule.weighted.inject([]) do |stack, m|
@@ -16,7 +16,9 @@ module Udongo::Search
16
16
  # If you return nil in the #url method of a result object, the item
17
17
  # will get filtered out of the search results.
18
18
  def search
19
- ::SearchTerm.create!(locale: controller.locale, term: term.value) if term
19
+ return [] unless term.valid?
20
+
21
+ ::SearchTerm.create!(locale: controller.locale, term: term.value)
20
22
 
21
23
  indices.map do |index|
22
24
  result = result_object(index)
@@ -18,6 +18,10 @@ module Udongo::Search
18
18
  .take
19
19
  end
20
20
 
21
+ def valid?
22
+ @string.present?
23
+ end
24
+
21
25
  def value
22
26
  return synonym.term if synonym
23
27
  string
@@ -1,3 +1,3 @@
1
1
  module Udongo
2
- VERSION = '7.7.1'
2
+ VERSION = '7.7.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: udongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.7.1
4
+ version: 7.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davy Hellemans
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-24 00:00:00.000000000 Z
12
+ date: 2018-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails