alchemy-pg_search 4.1.0 → 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 +93 -23
- data/Gemfile +1 -1
- data/Rakefile +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/element_extension.rb +9 -2
- 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,22 @@
|
|
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
|
+
|
12
|
+
## [v4.1.1](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v4.1.1) (2022-09-20)
|
13
|
+
|
14
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v4.1.0...v4.1.1)
|
15
|
+
|
16
|
+
**Merged pull requests:**
|
17
|
+
|
18
|
+
- Fix creating elements that has searchable defined [\#36](https://github.com/AlchemyCMS/alchemy-pg_search/pull/36) ([tvdeyen](https://github.com/tvdeyen))
|
19
|
+
|
3
20
|
## [v4.1.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v4.1.0) (2022-09-19)
|
4
21
|
|
5
22
|
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v4.0.0...v4.1.0)
|
@@ -14,44 +31,97 @@
|
|
14
31
|
- Add multisearch configuration [\#34](https://github.com/AlchemyCMS/alchemy-pg_search/pull/34) ([kulturbande](https://github.com/kulturbande))
|
15
32
|
- Remove old ferret upgrader [\#31](https://github.com/AlchemyCMS/alchemy-pg_search/pull/31) ([tvdeyen](https://github.com/tvdeyen))
|
16
33
|
|
17
|
-
##
|
34
|
+
## [v4.0.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v4.0.0) (2022-08-30)
|
35
|
+
|
36
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v3.0.0...v4.0.0)
|
18
37
|
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
|
38
|
+
**Merged pull requests:**
|
39
|
+
|
40
|
+
- Alchemy 6 multi search [\#30](https://github.com/AlchemyCMS/alchemy-pg_search/pull/30) ([kulturbande](https://github.com/kulturbande))
|
41
|
+
|
42
|
+
## [v3.0.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v3.0.0) (2022-07-01)
|
23
43
|
|
24
|
-
|
44
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v2.4.0...v3.0.0)
|
25
45
|
|
26
|
-
|
27
|
-
- Remove Alchemy 4 support [#27](https://github.com/AlchemyCMS/alchemy-pg_search/pull/27) by [tvdeyen](https://github.com/tvdeyen)
|
46
|
+
**Merged pull requests:**
|
28
47
|
|
29
|
-
|
48
|
+
- Fix initializing without element in attribute [\#29](https://github.com/AlchemyCMS/alchemy-pg_search/pull/29) ([kulturbande](https://github.com/kulturbande))
|
49
|
+
- Remove Alchemy 4 support [\#27](https://github.com/AlchemyCMS/alchemy-pg_search/pull/27) ([tvdeyen](https://github.com/tvdeyen))
|
30
50
|
|
31
|
-
|
51
|
+
## [v2.4.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v2.4.0) (2022-06-06)
|
32
52
|
|
33
|
-
|
53
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v2.3.0...v2.4.0)
|
34
54
|
|
35
|
-
|
55
|
+
**Merged pull requests:**
|
36
56
|
|
37
|
-
|
57
|
+
- Switch to github actions [\#26](https://github.com/AlchemyCMS/alchemy-pg_search/pull/26) ([tvdeyen](https://github.com/tvdeyen))
|
58
|
+
- Add Alchemy 5.3 support [\#25](https://github.com/AlchemyCMS/alchemy-pg_search/pull/25) ([kulturbande](https://github.com/kulturbande))
|
38
59
|
|
39
|
-
|
60
|
+
## [v2.3.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v2.3.0) (2022-03-04)
|
40
61
|
|
41
|
-
|
62
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v2.2.0...v2.3.0)
|
42
63
|
|
43
|
-
|
44
|
-
|
64
|
+
**Merged pull requests:**
|
65
|
+
|
66
|
+
- Update to Alchemy 5.1 [\#24](https://github.com/AlchemyCMS/alchemy-pg_search/pull/24) ([kulturbande](https://github.com/kulturbande))
|
67
|
+
|
68
|
+
## [v2.2.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v2.2.0) (2021-09-25)
|
69
|
+
|
70
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v2.1.0...v2.2.0)
|
71
|
+
|
72
|
+
**Merged pull requests:**
|
73
|
+
|
74
|
+
- Alchemy 4.3 [\#21](https://github.com/AlchemyCMS/alchemy-pg_search/pull/21) ([tvdeyen](https://github.com/tvdeyen))
|
75
|
+
|
76
|
+
## [v2.1.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v2.1.0) (2021-09-25)
|
77
|
+
|
78
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v2.0.0...v2.1.0)
|
79
|
+
|
80
|
+
**Merged pull requests:**
|
81
|
+
|
82
|
+
- Do not allow Alchemy 4.3 and above [\#22](https://github.com/AlchemyCMS/alchemy-pg_search/pull/22) ([tvdeyen](https://github.com/tvdeyen))
|
83
|
+
- Add Rails 5.1 support [\#19](https://github.com/AlchemyCMS/alchemy-pg_search/pull/19) ([tvdeyen](https://github.com/tvdeyen))
|
84
|
+
|
85
|
+
## [v2.0.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v2.0.0) (2021-09-23)
|
86
|
+
|
87
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v1.2.0...v2.0.0)
|
88
|
+
|
89
|
+
**Closed issues:**
|
90
|
+
|
91
|
+
- Support for Alchemy 4 [\#12](https://github.com/AlchemyCMS/alchemy-pg_search/issues/12)
|
92
|
+
|
93
|
+
**Merged pull requests:**
|
94
|
+
|
95
|
+
- Move searchable attribute to contents table [\#20](https://github.com/AlchemyCMS/alchemy-pg_search/pull/20) ([tvdeyen](https://github.com/tvdeyen))
|
96
|
+
- Support Alchemy 4.0 [\#18](https://github.com/AlchemyCMS/alchemy-pg_search/pull/18) ([tvdeyen](https://github.com/tvdeyen))
|
97
|
+
- Remove test files from build gem [\#16](https://github.com/AlchemyCMS/alchemy-pg_search/pull/16) ([tvdeyen](https://github.com/tvdeyen))
|
98
|
+
- v1.2.0 [\#15](https://github.com/AlchemyCMS/alchemy-pg_search/pull/15) ([tvdeyen](https://github.com/tvdeyen))
|
99
|
+
|
100
|
+
## [v1.2.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v1.2.0) (2018-11-28)
|
101
|
+
|
102
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/v0.1.0...v1.2.0)
|
103
|
+
|
104
|
+
**Closed issues:**
|
105
|
+
|
106
|
+
- Can't generate view templates [\#7](https://github.com/AlchemyCMS/alchemy-pg_search/issues/7)
|
107
|
+
- error in combination with spree [\#1](https://github.com/AlchemyCMS/alchemy-pg_search/issues/1)
|
108
|
+
|
109
|
+
**Merged pull requests:**
|
45
110
|
|
46
|
-
|
111
|
+
- Rename the \#search method into \#full\_text\_search [\#14](https://github.com/AlchemyCMS/alchemy-pg_search/pull/14) ([tvdeyen](https://github.com/tvdeyen))
|
112
|
+
- Search scope class [\#13](https://github.com/AlchemyCMS/alchemy-pg_search/pull/13) ([tvdeyen](https://github.com/tvdeyen))
|
113
|
+
- Configurable pagination [\#11](https://github.com/AlchemyCMS/alchemy-pg_search/pull/11) ([tvdeyen](https://github.com/tvdeyen))
|
114
|
+
- Nested elements support [\#10](https://github.com/AlchemyCMS/alchemy-pg_search/pull/10) ([tvdeyen](https://github.com/tvdeyen))
|
115
|
+
- Fix view template generator [\#9](https://github.com/AlchemyCMS/alchemy-pg_search/pull/9) ([wdspkr](https://github.com/wdspkr))
|
116
|
+
- Adjust alchemy page to new interface [\#8](https://github.com/AlchemyCMS/alchemy-pg_search/pull/8) ([wdspkr](https://github.com/wdspkr))
|
117
|
+
- Fix small typo in README [\#5](https://github.com/AlchemyCMS/alchemy-pg_search/pull/5) ([wdspkr](https://github.com/wdspkr))
|
118
|
+
- Remove executables line from gemspec [\#4](https://github.com/AlchemyCMS/alchemy-pg_search/pull/4) ([robinboening](https://github.com/robinboening))
|
119
|
+
- Alchemy 4 [\#3](https://github.com/AlchemyCMS/alchemy-pg_search/pull/3) ([tvdeyen](https://github.com/tvdeyen))
|
47
120
|
|
48
|
-
|
49
|
-
- Support Alchemy 4.0 [#18](https://github.com/AlchemyCMS/alchemy-pg_search/pull/18) by [tvdeyen](https://github.com/tvdeyen)
|
121
|
+
## [v0.1.0](https://github.com/AlchemyCMS/alchemy-pg_search/tree/v0.1.0) (2014-12-16)
|
50
122
|
|
51
|
-
|
123
|
+
[Full Changelog](https://github.com/AlchemyCMS/alchemy-pg_search/compare/ec23bf1d33f27d7ada9a2dd49922e4ae7740350d...v0.1.0)
|
52
124
|
|
53
|
-
- Rename the #search method into #full_text_search [#14](https://github.com/AlchemyCMS/alchemy-pg_search/pull/14) by [tvdeyen](https://github.com/tvdeyen)
|
54
|
-
- Add a page search scope class [#13](https://github.com/AlchemyCMS/alchemy-pg_search/pull/13) by [tvdeyen](https://github.com/tvdeyen)
|
55
125
|
|
56
126
|
|
57
127
|
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
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/Rakefile
CHANGED
@@ -51,7 +51,7 @@ namespace :changelog do
|
|
51
51
|
GitHubChangelogGenerator::RakeTask.new :update do |config|
|
52
52
|
config.user = "AlchemyCMS"
|
53
53
|
config.project = "alchemy-pg_search"
|
54
|
-
config.since_tag = "
|
54
|
+
# config.since_tag = "v1.2.0"
|
55
55
|
config.future_release = "v#{Alchemy::PgSearch::VERSION}"
|
56
56
|
end
|
57
57
|
end
|
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
|
@@ -1,7 +1,14 @@
|
|
1
1
|
module Alchemy::PgSearch::ElementExtension
|
2
|
+
def self.prepended(base)
|
3
|
+
base.attr_writer :searchable
|
4
|
+
end
|
5
|
+
|
6
|
+
def searchable
|
7
|
+
definition.key?(:searchable) ? definition[:searchable] : true
|
8
|
+
end
|
9
|
+
|
2
10
|
def searchable?
|
3
|
-
|
4
|
-
public? && page.searchable? && page_version.public?
|
11
|
+
searchable && public? && page.searchable? && page_version.public?
|
5
12
|
end
|
6
13
|
end
|
7
14
|
|
@@ -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'
|