udongo 7.3.3 → 7.3.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: 65a627bc6c11bd04870fd59768907c71d13308e5
4
- data.tar.gz: 68043e6320d72b3f14df0d17b7bc32947efc543f
3
+ metadata.gz: 962f42931f08cb1d74ebc2b55c6537bfc43b5c89
4
+ data.tar.gz: 7bccfc7ec53136d2c4f7ce67247765a2a876222b
5
5
  SHA512:
6
- metadata.gz: eb4245fcdb459af39e4cecf0c7aba333290ca34515c9c3bad0470deaf9bb68ee3fa871a984afe10453ab6e5a9a3c16884816852a7d63beb9b4f00603ab716549
7
- data.tar.gz: 0ca3702785f5a8979355642c6cf6750b2ae71c3989a5c260fdb8845884968659ba8807acccbc1b9af2049453dc4db5560237b875052e28de4e9a8e1aa62c601a
6
+ metadata.gz: 715caffc5bf92d7e33ab60c211779de38eb76a4ec6d1ba3061c64500af985b46fe9e40c95bacd748a5101966f367631eab1df637136b35e863a40b7f295fe88c
7
+ data.tar.gz: 05426b6db33831349ca680a38b47936209ac5b6c06b57ccb695e75cb1e0439167f5141a2312b3a21e7812dbe7cdc3e5e19b30a2d26c00895980360673b4a6173
data/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ 7.3.4 - 2018-03-15
2
+ --
3
+ * Allow for a "way out" when building result objects for the frontend search.
4
+
5
+
1
6
  7.3.3 - 2018-03-09
2
7
  --
3
8
  * Make the youtube embed URLs a bit more flexible.
File without changes
@@ -44,10 +44,11 @@ module Udongo::Search
44
44
  # correct order.
45
45
  @indices ||= SearchModule.weighted.inject([]) do |stack, m|
46
46
  # The group happens to make sure we end up with just 1 copy of
47
- # a searchable result Otherwise matches from both an indexed
47
+ # a searchable result. Otherwise matches from both an indexed
48
48
  # Page#title and Page#description would be in the result set.
49
- stack << m.indices.where('search_indices.value REGEXP ?', term.value)
50
- .group([:searchable_type, :searchable_id])
49
+ stack << m.indices
50
+ .where('search_indices.value REGEXP ?', term.value)
51
+ .group([:searchable_type, :searchable_id])
51
52
  end.flatten
52
53
  end
53
54
 
@@ -12,10 +12,13 @@ module Udongo::Search
12
12
  #
13
13
  # Note that the result_object#url method is defined in
14
14
  # Udongo::Search::ResultObjects::Frontend::Page.
15
+ #
16
+ # If you return nil in the #url method of a result object, the item
17
+ # will get filtered out of the search results.
15
18
  def search
16
19
  indices.map do |index|
17
20
  result = result_object(index)
18
- next if result.hidden? || result.unpublished?
21
+ next if result.hidden? || result.unpublished? || result.url.nil?
19
22
  { label: result.label, value: result.url }
20
23
  end.select(&:present?)
21
24
  end
@@ -1,3 +1,3 @@
1
1
  module Udongo
2
- VERSION = '7.3.3'
2
+ VERSION = '7.3.4'
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.3.3
4
+ version: 7.3.4
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-03-09 00:00:00.000000000 Z
12
+ date: 2018-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -747,6 +747,7 @@ files:
747
747
  - app/views/layouts/backend/login.html.erb
748
748
  - app/views/layouts/frontend/application.html.erb
749
749
  - changelog.md
750
+ - config/environment.rb
750
751
  - config/initializers/assets.rb
751
752
  - config/initializers/ckeditor.rb
752
753
  - config/initializers/core_ext/string.rb