alchemy-pg_search 8.0.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.backportrc.json +3 -0
- data/.github/workflows/backport.yml +46 -0
- data/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile +2 -2
- data/alchemy-pg_search.gemspec +1 -1
- data/app/extensions/alchemy/search/element_extension.rb +5 -1
- data/app/extensions/alchemy/search/page_extension.rb +1 -1
- data/lib/alchemy/pg_search/engine.rb +2 -2
- data/lib/alchemy/pg_search/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60537a333404a16b364fc265db62b3a5a9ca50c50e84c98261fe3c663b5125ca
|
|
4
|
+
data.tar.gz: 976c0fa3b5f22cf18afc6f32e7273ad84028a3d3c4a4a4e3cb5a0d5698a94897
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8de6e63910d56e7b1aad533a81e8af1fa302a46daeda3a0218ded216b550a7972dec6bb9d5a9b016a3eb26446cbae6519f5cb5dcd84059ee06d425334cc84cd2
|
|
7
|
+
data.tar.gz: 001ed6c25e6f36737b6dd8cea5d10829ff734a4559cfaa66818ca94ff1b999bd7d7f925f3085b0ca1e0511c470a1865dc6f264693de337bcbc96333686ace593
|
data/.backportrc.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Backport
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types:
|
|
6
|
+
- closed
|
|
7
|
+
- labeled
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
backport:
|
|
14
|
+
name: Backport
|
|
15
|
+
runs-on: ubuntu-24.04
|
|
16
|
+
# Only react to merged PRs for security reasons.
|
|
17
|
+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
|
18
|
+
if: |
|
|
19
|
+
github.event.pull_request.merged == true
|
|
20
|
+
&& contains(
|
|
21
|
+
join(github.event.pull_request.labels.*.name, '---'),
|
|
22
|
+
'backport'
|
|
23
|
+
)
|
|
24
|
+
&& (
|
|
25
|
+
(github.event.action == 'labeled' && startsWith(github.event.label.name, 'backport')) ||
|
|
26
|
+
(github.event.action == 'closed')
|
|
27
|
+
)
|
|
28
|
+
steps:
|
|
29
|
+
- name: Generate token
|
|
30
|
+
id: generate_token
|
|
31
|
+
uses: actions/create-github-app-token@v2
|
|
32
|
+
with:
|
|
33
|
+
app-id: ${{ vars.ALCHEMY_BOT_APP_ID }}
|
|
34
|
+
private-key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}
|
|
35
|
+
- name: Backport pull request
|
|
36
|
+
uses: sorenlouv/backport-github-action@v9.5.1
|
|
37
|
+
with:
|
|
38
|
+
github_token: ${{ steps.generate_token.outputs.token }}
|
|
39
|
+
auto_backport_label_prefix: backport-to-
|
|
40
|
+
add_original_reviewers: true
|
|
41
|
+
- name: Info log
|
|
42
|
+
if: ${{ success() }}
|
|
43
|
+
run: cat ~/.backport/backport.info.log
|
|
44
|
+
- name: Debug log
|
|
45
|
+
if: ${{ failure() }}
|
|
46
|
+
run: cat ~/.backport/backport.debug.log
|
data/.github/workflows/ci.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 8.2.0 (2026-05-22)
|
|
4
|
+
|
|
5
|
+
## What's Changed
|
|
6
|
+
* Add bin/setup script by @sascha-karnatz in https://github.com/AlchemyCMS/alchemy-pg_search/pull/70
|
|
7
|
+
* Upgrade Alchemy v8.0 by @sascha-karnatz in https://github.com/AlchemyCMS/alchemy-pg_search/pull/69
|
|
8
|
+
* Release v8.0.0 by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy-pg_search/pull/74
|
|
9
|
+
* Start development of version 8.1.0.dev by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy-pg_search/pull/75
|
|
10
|
+
* Remove AlchemyCMS deprecations by @sascha-karnatz in https://github.com/AlchemyCMS/alchemy-pg_search/pull/76
|
|
11
|
+
* [8.2-stable] Fix not searchable parent pages by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy-pg_search/pull/79
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
**Full Changelog**: https://github.com/AlchemyCMS/alchemy-pg_search/compare/v7.4.0...v8.2.0
|
|
15
|
+
|
|
3
16
|
## 8.0.0 (2026-03-17)
|
|
4
17
|
|
|
5
18
|
## What's Changed
|
data/Gemfile
CHANGED
|
@@ -2,8 +2,8 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
|
-
gem "rails", "~>
|
|
6
|
-
gem "alchemy_cms", "~> #{ENV.fetch("ALCHEMY_CMS_VERSION", "8.
|
|
5
|
+
gem "rails", "~> 8.1.0"
|
|
6
|
+
gem "alchemy_cms", "~> #{ENV.fetch("ALCHEMY_CMS_VERSION", "8.2")}.0"
|
|
7
7
|
|
|
8
8
|
gem "sassc-rails"
|
|
9
9
|
gem "sassc", "~> 2.4.0"
|
data/alchemy-pg_search.gemspec
CHANGED
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
-
spec.add_runtime_dependency "alchemy_cms", [">= 8.0
|
|
21
|
+
spec.add_runtime_dependency "alchemy_cms", [">= 8.2.0", "< 9"]
|
|
22
22
|
spec.add_runtime_dependency "pg_search", ["~> 2.1"]
|
|
23
23
|
spec.add_runtime_dependency "pg"
|
|
24
24
|
|
|
@@ -8,12 +8,16 @@ module Alchemy::Search::ElementExtension
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def searchable?
|
|
11
|
-
searchable && public? && page.searchable? && page_version.public?
|
|
11
|
+
searchable && public? && page.searchable? && page_version.public? && parent_elements_searchable?
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def searchable_content
|
|
15
15
|
ingredients.select(&:searchable?).map(&:searchable_content).join(" ").squish
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
def parent_elements_searchable?
|
|
19
|
+
parent_element.nil? || (parent_element.searchable && parent_element.public? && parent_element.parent_elements_searchable?)
|
|
20
|
+
end
|
|
17
21
|
end
|
|
18
22
|
|
|
19
23
|
Alchemy::Element.prepend(Alchemy::Search::ElementExtension)
|
|
@@ -6,7 +6,7 @@ module Alchemy::Search::PageExtension
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def searchable_content
|
|
9
|
-
all_elements.includes(ingredients: {element: :page}).map(&:searchable_content).join(" ")
|
|
9
|
+
all_elements.includes(:page, :page_version, {parent_element: :parent_element}, ingredients: {element: :page}).map(&:searchable_content).join(" ")
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -12,12 +12,12 @@ module Alchemy
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# In development environment, this runs on every code reload, so avoid multiple reindexing jobs
|
|
15
|
-
unless Alchemy.publish_targets.map(&:name).include? 'Alchemy::PgSearch::IndexPageJob'
|
|
15
|
+
unless Alchemy.config.publish_targets.map(&:name).include? 'Alchemy::PgSearch::IndexPageJob'
|
|
16
16
|
# reindex the page after it was published
|
|
17
17
|
Alchemy.config.publish_targets << "Alchemy::PgSearch::IndexPageJob"
|
|
18
18
|
end
|
|
19
19
|
# enable searchable flag in page form
|
|
20
|
-
Alchemy.
|
|
20
|
+
Alchemy.config.show_page_searchable_checkbox = true
|
|
21
21
|
|
|
22
22
|
# configure multiselect to find also partial words
|
|
23
23
|
# @link https://github.com/Casecommons/pg_search#searching-using-different-search-features
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alchemy-pg_search
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.
|
|
4
|
+
version: 8.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas von Deyen
|
|
@@ -15,7 +15,7 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 8.0
|
|
18
|
+
version: 8.2.0
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '9'
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 8.0
|
|
28
|
+
version: 8.2.0
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: '9'
|
|
@@ -106,6 +106,8 @@ executables: []
|
|
|
106
106
|
extensions: []
|
|
107
107
|
extra_rdoc_files: []
|
|
108
108
|
files:
|
|
109
|
+
- ".backportrc.json"
|
|
110
|
+
- ".github/workflows/backport.yml"
|
|
109
111
|
- ".github/workflows/ci.yml"
|
|
110
112
|
- ".github/workflows/post-release.yml"
|
|
111
113
|
- ".github/workflows/prepare-release.yml"
|
|
@@ -162,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
162
164
|
version: '0'
|
|
163
165
|
requirements:
|
|
164
166
|
- PostgreSQL >= 12.x
|
|
165
|
-
rubygems_version: 4.0.
|
|
167
|
+
rubygems_version: 4.0.10
|
|
166
168
|
specification_version: 4
|
|
167
169
|
summary: This gem provides PostgreSQL full text search to Alchemy
|
|
168
170
|
test_files: []
|