alchemy-pg_search 4.1.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +1 -1
- data/alchemy-pg_search.gemspec +1 -1
- data/app/controller/alchemy/pg_search/controller_methods.rb +6 -3
- data/app/extensions/alchemy/pg_search/page_extension.rb +1 -1
- data/lib/alchemy/pg_search/engine.rb +3 -0
- data/lib/alchemy/pg_search/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b24390ba290061c913ce244c49cf38352d303bbd50e0855d2144517105ce6b53
|
4
|
+
data.tar.gz: 963ed8b25276155ce526186eb07b12b8d616b60df0d0d98100c713ed12eddc1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3acc723b3ae261ae52de6c1d59a6e2f727d870bb6849aa8ec461dd2eceaa8578cbc45df4562b5820316ff948210395921287b8391dc675ddaef8448012c980a9
|
7
|
+
data.tar.gz: b203d53773796999d6f04fd27c8834121e872f359342eeec9cf97737cd487ddae1505f3df8c5f3c83793d9b406ad13f7f88ca1d184d8b1bf72f0d5600c6eb4ea
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v4.2.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v4.2.0) (2023-01-23)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v4.1.1...v4.2.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Update to Alchemy 6.1 [\#38](https://github.com/AlchemyCMS/alchemy-pg_search/pull/38) ([kulturbande](https://github.com/kulturbande))
|
10
|
+
- Page searchable toggle [\#37](https://github.com/AlchemyCMS/alchemy-pg_search/pull/37) ([kulturbande](https://github.com/kulturbande))
|
11
|
+
|
3
12
|
## [v4.1.1](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v4.1.1) (2022-09-20)
|
4
13
|
|
5
14
|
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v4.1.0...v4.1.1)
|
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
gem "rails", "~> 6.0.0"
|
6
|
-
ENV.fetch("ALCHEMY_BRANCH", "6.
|
6
|
+
ENV.fetch("ALCHEMY_BRANCH", "6.1-stable").tap do |branch|
|
7
7
|
gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: branch
|
8
8
|
end
|
9
9
|
gem "sassc-rails"
|
data/alchemy-pg_search.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.add_runtime_dependency "alchemy_cms", [">= 6.
|
19
|
+
spec.add_runtime_dependency "alchemy_cms", [">= 6.1", "< 7"]
|
20
20
|
spec.add_runtime_dependency "pg_search", ["~> 2.1"]
|
21
21
|
spec.add_runtime_dependency "pg"
|
22
22
|
|
@@ -70,11 +70,14 @@ module Alchemy
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def search_result_page_layout
|
73
|
-
|
74
|
-
|
73
|
+
# search for page layout with the attribute `searchresults: true`
|
74
|
+
page_layouts = PageLayout.all.select do |page_layout|
|
75
|
+
page_layout.key?(:searchresults) && page_layout[:searchresults].to_s.casecmp(true.to_s).zero?
|
76
|
+
end
|
77
|
+
if page_layouts.nil?
|
75
78
|
raise "No searchresults page layout found. Please add page layout with `searchresults: true` into your `page_layouts.yml` file."
|
76
79
|
end
|
77
|
-
|
80
|
+
page_layouts.first
|
78
81
|
end
|
79
82
|
|
80
83
|
def paginate_per
|
@@ -17,6 +17,9 @@ module Alchemy
|
|
17
17
|
# reindex the page after it was published
|
18
18
|
Alchemy.publish_targets << Alchemy::PgSearch::IndexPageJob
|
19
19
|
|
20
|
+
# enable searchable flag in page form
|
21
|
+
Alchemy.enable_searchable = true
|
22
|
+
|
20
23
|
# configure multiselect to find also partial words
|
21
24
|
# @link https://github.com/Casecommons/pg_search#searching-using-different-search-features
|
22
25
|
::PgSearch.multisearch_options = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-pg_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '6.
|
19
|
+
version: '6.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '7'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '6.
|
29
|
+
version: '6.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '7'
|