ransack 4.2.1 → 4.4.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/README.md +5 -3
- data/lib/polyamorous/polyamorous.rb +2 -2
- data/lib/ransack/adapters/active_record/context.rb +30 -3
- data/lib/ransack/constants.rb +1 -1
- data/lib/ransack/context.rb +3 -0
- data/lib/ransack/helpers/form_builder.rb +6 -7
- data/lib/ransack/helpers/form_helper.rb +86 -20
- data/lib/ransack/invalid_search_error.rb +3 -0
- data/lib/ransack/locale/ja.yml +51 -51
- data/lib/ransack/locale/ko.yml +70 -0
- data/lib/ransack/locale/uk.yml +72 -0
- data/lib/ransack/nodes/condition.rb +39 -7
- data/lib/ransack/nodes/grouping.rb +1 -1
- data/lib/ransack/nodes/sort.rb +1 -1
- data/lib/ransack/nodes/value.rb +9 -1
- data/lib/ransack/search.rb +4 -3
- data/lib/ransack/version.rb +1 -1
- data/lib/ransack.rb +8 -0
- data/spec/polyamorous/join_association_spec.rb +0 -1
- data/spec/polyamorous/join_dependency_spec.rb +0 -1
- data/spec/ransack/adapters/active_record/base_spec.rb +106 -3
- data/spec/ransack/adapters/active_record/context_spec.rb +72 -0
- data/spec/ransack/helpers/form_builder_spec.rb +0 -2
- data/spec/ransack/helpers/form_helper_spec.rb +219 -5
- data/spec/ransack/nodes/condition_spec.rb +230 -0
- data/spec/ransack/nodes/grouping_spec.rb +2 -2
- data/spec/ransack/nodes/value_spec.rb +12 -1
- data/spec/ransack/predicate_spec.rb +16 -9
- data/spec/ransack/search_spec.rb +121 -1
- data/spec/ransack/translate_spec.rb +0 -1
- data/spec/spec_helper.rb +2 -3
- data/spec/support/schema.rb +42 -0
- metadata +43 -87
- data/.github/FUNDING.yml +0 -3
- data/.github/SECURITY.md +0 -12
- data/.github/workflows/codeql.yml +0 -72
- data/.github/workflows/cronjob.yml +0 -99
- data/.github/workflows/deploy.yml +0 -35
- data/.github/workflows/rubocop.yml +0 -20
- data/.github/workflows/test-deploy.yml +0 -29
- data/.github/workflows/test.yml +0 -131
- data/.gitignore +0 -7
- data/.nojekyll +0 -0
- data/.rubocop.yml +0 -50
- data/CHANGELOG.md +0 -1186
- data/CONTRIBUTING.md +0 -171
- data/Gemfile +0 -53
- data/Rakefile +0 -24
- data/bug_report_templates/test-ransack-scope-and-column-same-name.rb +0 -78
- data/bug_report_templates/test-ransacker-arel-present-predicate.rb +0 -75
- data/docs/.gitignore +0 -19
- data/docs/.nojekyll +0 -0
- data/docs/babel.config.js +0 -3
- data/docs/blog/2022-03-27-ransack-3.0.0.md +0 -20
- data/docs/docs/getting-started/_category_.json +0 -4
- data/docs/docs/getting-started/advanced-mode.md +0 -46
- data/docs/docs/getting-started/configuration.md +0 -47
- data/docs/docs/getting-started/search-matches.md +0 -67
- data/docs/docs/getting-started/simple-mode.md +0 -288
- data/docs/docs/getting-started/sorting.md +0 -71
- data/docs/docs/getting-started/using-predicates.md +0 -282
- data/docs/docs/going-further/_category_.json +0 -4
- data/docs/docs/going-further/acts-as-taggable-on.md +0 -114
- data/docs/docs/going-further/associations.md +0 -70
- data/docs/docs/going-further/custom-predicates.md +0 -52
- data/docs/docs/going-further/documentation.md +0 -43
- data/docs/docs/going-further/exporting-to-csv.md +0 -49
- data/docs/docs/going-further/external-guides.md +0 -57
- data/docs/docs/going-further/form-customisation.md +0 -63
- data/docs/docs/going-further/i18n.md +0 -53
- data/docs/docs/going-further/img/create_release.png +0 -0
- data/docs/docs/going-further/merging-searches.md +0 -41
- data/docs/docs/going-further/other-notes.md +0 -428
- data/docs/docs/going-further/polymorphic-search.md +0 -46
- data/docs/docs/going-further/ransackers.md +0 -331
- data/docs/docs/going-further/release_process.md +0 -36
- data/docs/docs/going-further/saving-queries.md +0 -82
- data/docs/docs/going-further/searching-postgres.md +0 -57
- data/docs/docs/going-further/wiki-contributors.md +0 -82
- data/docs/docs/intro.md +0 -99
- data/docs/docusaurus.config.js +0 -120
- data/docs/package.json +0 -42
- data/docs/sidebars.js +0 -31
- data/docs/src/components/HomepageFeatures/index.js +0 -64
- data/docs/src/components/HomepageFeatures/styles.module.css +0 -11
- data/docs/src/css/custom.css +0 -39
- data/docs/src/pages/index.module.css +0 -23
- data/docs/src/pages/markdown-page.md +0 -7
- data/docs/static/.nojekyll +0 -0
- data/docs/static/img/docusaurus.png +0 -0
- data/docs/static/img/favicon.ico +0 -0
- data/docs/static/img/logo.svg +0 -1
- data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
- data/docs/static/img/tutorial/localeDropdown.png +0 -0
- data/docs/static/img/undraw_docusaurus_mountain.svg +0 -171
- data/docs/static/img/undraw_docusaurus_react.svg +0 -170
- data/docs/static/img/undraw_docusaurus_tree.svg +0 -40
- data/docs/static/logo/ransack-h.png +0 -0
- data/docs/static/logo/ransack-h.svg +0 -34
- data/docs/static/logo/ransack-v.png +0 -0
- data/docs/static/logo/ransack-v.svg +0 -34
- data/docs/static/logo/ransack.png +0 -0
- data/docs/static/logo/ransack.svg +0 -21
- data/docs/yarn.lock +0 -8884
- data/ransack.gemspec +0 -26
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ransack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernie Miller
|
@@ -9,10 +9,9 @@ authors:
|
|
9
9
|
- Jon Atack
|
10
10
|
- Sean Carroll
|
11
11
|
- David Rodríguez
|
12
|
-
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date:
|
14
|
+
date: 2025-09-25 00:00:00.000000000 Z
|
16
15
|
dependencies:
|
17
16
|
- !ruby/object:Gem::Dependency
|
18
17
|
name: activerecord
|
@@ -20,28 +19,28 @@ dependencies:
|
|
20
19
|
requirements:
|
21
20
|
- - ">="
|
22
21
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
22
|
+
version: '7.1'
|
24
23
|
type: :runtime
|
25
24
|
prerelease: false
|
26
25
|
version_requirements: !ruby/object:Gem::Requirement
|
27
26
|
requirements:
|
28
27
|
- - ">="
|
29
28
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
29
|
+
version: '7.1'
|
31
30
|
- !ruby/object:Gem::Dependency
|
32
31
|
name: activesupport
|
33
32
|
requirement: !ruby/object:Gem::Requirement
|
34
33
|
requirements:
|
35
34
|
- - ">="
|
36
35
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
36
|
+
version: '7.1'
|
38
37
|
type: :runtime
|
39
38
|
prerelease: false
|
40
39
|
version_requirements: !ruby/object:Gem::Requirement
|
41
40
|
requirements:
|
42
41
|
- - ">="
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
43
|
+
version: '7.1'
|
45
44
|
- !ruby/object:Gem::Dependency
|
46
45
|
name: i18n
|
47
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,90 +55,20 @@ dependencies:
|
|
56
55
|
- - ">="
|
57
56
|
- !ruby/object:Gem::Version
|
58
57
|
version: '0'
|
59
|
-
description:
|
60
|
-
|
58
|
+
description: Powerful object-based searching and filtering for Active Record with
|
59
|
+
advanced features like complex boolean queries, association searching, custom predicates
|
60
|
+
and i18n support.
|
61
61
|
email:
|
62
62
|
- ernie@erniemiller.org
|
63
63
|
- radarlistener@gmail.com
|
64
64
|
- jonnyatack@gmail.com
|
65
|
-
-
|
65
|
+
- magma.craters2h@icloud.com
|
66
66
|
executables: []
|
67
67
|
extensions: []
|
68
68
|
extra_rdoc_files: []
|
69
69
|
files:
|
70
|
-
- ".github/FUNDING.yml"
|
71
|
-
- ".github/SECURITY.md"
|
72
|
-
- ".github/workflows/codeql.yml"
|
73
|
-
- ".github/workflows/cronjob.yml"
|
74
|
-
- ".github/workflows/deploy.yml"
|
75
|
-
- ".github/workflows/rubocop.yml"
|
76
|
-
- ".github/workflows/test-deploy.yml"
|
77
|
-
- ".github/workflows/test.yml"
|
78
|
-
- ".gitignore"
|
79
|
-
- ".nojekyll"
|
80
|
-
- ".rubocop.yml"
|
81
|
-
- CHANGELOG.md
|
82
|
-
- CONTRIBUTING.md
|
83
|
-
- Gemfile
|
84
70
|
- LICENSE
|
85
71
|
- README.md
|
86
|
-
- Rakefile
|
87
|
-
- bug_report_templates/test-ransack-scope-and-column-same-name.rb
|
88
|
-
- bug_report_templates/test-ransacker-arel-present-predicate.rb
|
89
|
-
- docs/.gitignore
|
90
|
-
- docs/.nojekyll
|
91
|
-
- docs/babel.config.js
|
92
|
-
- docs/blog/2022-03-27-ransack-3.0.0.md
|
93
|
-
- docs/docs/getting-started/_category_.json
|
94
|
-
- docs/docs/getting-started/advanced-mode.md
|
95
|
-
- docs/docs/getting-started/configuration.md
|
96
|
-
- docs/docs/getting-started/search-matches.md
|
97
|
-
- docs/docs/getting-started/simple-mode.md
|
98
|
-
- docs/docs/getting-started/sorting.md
|
99
|
-
- docs/docs/getting-started/using-predicates.md
|
100
|
-
- docs/docs/going-further/_category_.json
|
101
|
-
- docs/docs/going-further/acts-as-taggable-on.md
|
102
|
-
- docs/docs/going-further/associations.md
|
103
|
-
- docs/docs/going-further/custom-predicates.md
|
104
|
-
- docs/docs/going-further/documentation.md
|
105
|
-
- docs/docs/going-further/exporting-to-csv.md
|
106
|
-
- docs/docs/going-further/external-guides.md
|
107
|
-
- docs/docs/going-further/form-customisation.md
|
108
|
-
- docs/docs/going-further/i18n.md
|
109
|
-
- docs/docs/going-further/img/create_release.png
|
110
|
-
- docs/docs/going-further/merging-searches.md
|
111
|
-
- docs/docs/going-further/other-notes.md
|
112
|
-
- docs/docs/going-further/polymorphic-search.md
|
113
|
-
- docs/docs/going-further/ransackers.md
|
114
|
-
- docs/docs/going-further/release_process.md
|
115
|
-
- docs/docs/going-further/saving-queries.md
|
116
|
-
- docs/docs/going-further/searching-postgres.md
|
117
|
-
- docs/docs/going-further/wiki-contributors.md
|
118
|
-
- docs/docs/intro.md
|
119
|
-
- docs/docusaurus.config.js
|
120
|
-
- docs/package.json
|
121
|
-
- docs/sidebars.js
|
122
|
-
- docs/src/components/HomepageFeatures/index.js
|
123
|
-
- docs/src/components/HomepageFeatures/styles.module.css
|
124
|
-
- docs/src/css/custom.css
|
125
|
-
- docs/src/pages/index.module.css
|
126
|
-
- docs/src/pages/markdown-page.md
|
127
|
-
- docs/static/.nojekyll
|
128
|
-
- docs/static/img/docusaurus.png
|
129
|
-
- docs/static/img/favicon.ico
|
130
|
-
- docs/static/img/logo.svg
|
131
|
-
- docs/static/img/tutorial/docsVersionDropdown.png
|
132
|
-
- docs/static/img/tutorial/localeDropdown.png
|
133
|
-
- docs/static/img/undraw_docusaurus_mountain.svg
|
134
|
-
- docs/static/img/undraw_docusaurus_react.svg
|
135
|
-
- docs/static/img/undraw_docusaurus_tree.svg
|
136
|
-
- docs/static/logo/ransack-h.png
|
137
|
-
- docs/static/logo/ransack-h.svg
|
138
|
-
- docs/static/logo/ransack-v.png
|
139
|
-
- docs/static/logo/ransack-v.svg
|
140
|
-
- docs/static/logo/ransack.png
|
141
|
-
- docs/static/logo/ransack.svg
|
142
|
-
- docs/yarn.lock
|
143
72
|
- lib/polyamorous/activerecord/join_association.rb
|
144
73
|
- lib/polyamorous/activerecord/join_association_7_2.rb
|
145
74
|
- lib/polyamorous/activerecord/join_dependency.rb
|
@@ -158,6 +87,7 @@ files:
|
|
158
87
|
- lib/ransack/helpers.rb
|
159
88
|
- lib/ransack/helpers/form_builder.rb
|
160
89
|
- lib/ransack/helpers/form_helper.rb
|
90
|
+
- lib/ransack/invalid_search_error.rb
|
161
91
|
- lib/ransack/locale/ar.yml
|
162
92
|
- lib/ransack/locale/az.yml
|
163
93
|
- lib/ransack/locale/bg.yml
|
@@ -175,6 +105,7 @@ files:
|
|
175
105
|
- lib/ransack/locale/id.yml
|
176
106
|
- lib/ransack/locale/it.yml
|
177
107
|
- lib/ransack/locale/ja.yml
|
108
|
+
- lib/ransack/locale/ko.yml
|
178
109
|
- lib/ransack/locale/nl.yml
|
179
110
|
- lib/ransack/locale/pt-BR.yml
|
180
111
|
- lib/ransack/locale/ro.yml
|
@@ -182,6 +113,7 @@ files:
|
|
182
113
|
- lib/ransack/locale/sk.yml
|
183
114
|
- lib/ransack/locale/sv.yml
|
184
115
|
- lib/ransack/locale/tr.yml
|
116
|
+
- lib/ransack/locale/uk.yml
|
185
117
|
- lib/ransack/locale/zh-CN.yml
|
186
118
|
- lib/ransack/locale/zh-TW.yml
|
187
119
|
- lib/ransack/naming.rb
|
@@ -198,7 +130,6 @@ files:
|
|
198
130
|
- lib/ransack/translate.rb
|
199
131
|
- lib/ransack/version.rb
|
200
132
|
- lib/ransack/visitor.rb
|
201
|
-
- ransack.gemspec
|
202
133
|
- spec/blueprints/articles.rb
|
203
134
|
- spec/blueprints/comments.rb
|
204
135
|
- spec/blueprints/notes.rb
|
@@ -228,8 +159,8 @@ files:
|
|
228
159
|
homepage: https://github.com/activerecord-hackery/ransack
|
229
160
|
licenses:
|
230
161
|
- MIT
|
231
|
-
metadata:
|
232
|
-
|
162
|
+
metadata:
|
163
|
+
changelog_uri: https://github.com/activerecord-hackery/ransack/blob/main/CHANGELOG.md
|
233
164
|
rdoc_options: []
|
234
165
|
require_paths:
|
235
166
|
- lib
|
@@ -244,8 +175,33 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
175
|
- !ruby/object:Gem::Version
|
245
176
|
version: '0'
|
246
177
|
requirements: []
|
247
|
-
rubygems_version: 3.
|
248
|
-
signing_key:
|
178
|
+
rubygems_version: 3.6.2
|
249
179
|
specification_version: 4
|
250
180
|
summary: Object-based searching for Active Record.
|
251
|
-
test_files:
|
181
|
+
test_files:
|
182
|
+
- spec/blueprints/articles.rb
|
183
|
+
- spec/blueprints/comments.rb
|
184
|
+
- spec/blueprints/notes.rb
|
185
|
+
- spec/blueprints/people.rb
|
186
|
+
- spec/blueprints/tags.rb
|
187
|
+
- spec/console.rb
|
188
|
+
- spec/helpers/polyamorous_helper.rb
|
189
|
+
- spec/helpers/ransack_helper.rb
|
190
|
+
- spec/polyamorous/activerecord_compatibility_spec.rb
|
191
|
+
- spec/polyamorous/join_association_spec.rb
|
192
|
+
- spec/polyamorous/join_dependency_spec.rb
|
193
|
+
- spec/polyamorous/join_spec.rb
|
194
|
+
- spec/ransack/adapters/active_record/base_spec.rb
|
195
|
+
- spec/ransack/adapters/active_record/context_spec.rb
|
196
|
+
- spec/ransack/configuration_spec.rb
|
197
|
+
- spec/ransack/helpers/form_builder_spec.rb
|
198
|
+
- spec/ransack/helpers/form_helper_spec.rb
|
199
|
+
- spec/ransack/nodes/condition_spec.rb
|
200
|
+
- spec/ransack/nodes/grouping_spec.rb
|
201
|
+
- spec/ransack/nodes/value_spec.rb
|
202
|
+
- spec/ransack/predicate_spec.rb
|
203
|
+
- spec/ransack/search_spec.rb
|
204
|
+
- spec/ransack/translate_spec.rb
|
205
|
+
- spec/spec_helper.rb
|
206
|
+
- spec/support/en.yml
|
207
|
+
- spec/support/schema.rb
|
data/.github/FUNDING.yml
DELETED
data/.github/SECURITY.md
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# Security Policy
|
2
|
-
|
3
|
-
## Supported Versions
|
4
|
-
|
5
|
-
At the moment, only the latest major.minor release stream is supported with
|
6
|
-
security updates.
|
7
|
-
|
8
|
-
## Reporting a Vulnerability
|
9
|
-
|
10
|
-
Please use the Tidelift security contact to [report a security
|
11
|
-
vulnerability](https://tidelift.com/security). Tidelift will coordinate the fix
|
12
|
-
and disclosure.
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# For most projects, this workflow file will not need changing; you simply need
|
2
|
-
# to commit it to your repository.
|
3
|
-
#
|
4
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
-
# or to provide custom queries or build logic.
|
6
|
-
#
|
7
|
-
# ******** NOTE ********
|
8
|
-
# We have attempted to detect the languages in your repository. Please check
|
9
|
-
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
-
# supported CodeQL languages.
|
11
|
-
#
|
12
|
-
name: "CodeQL"
|
13
|
-
|
14
|
-
on:
|
15
|
-
push:
|
16
|
-
branches: [ main ]
|
17
|
-
pull_request:
|
18
|
-
# The branches below must be a subset of the branches above
|
19
|
-
branches: [ main ]
|
20
|
-
schedule:
|
21
|
-
- cron: '43 11 * * 3'
|
22
|
-
|
23
|
-
jobs:
|
24
|
-
analyze:
|
25
|
-
name: Analyze
|
26
|
-
runs-on: ubuntu-latest
|
27
|
-
permissions:
|
28
|
-
actions: read
|
29
|
-
contents: read
|
30
|
-
security-events: write
|
31
|
-
|
32
|
-
strategy:
|
33
|
-
fail-fast: false
|
34
|
-
matrix:
|
35
|
-
language: [ 'ruby' ]
|
36
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
38
|
-
|
39
|
-
steps:
|
40
|
-
- name: Checkout repository
|
41
|
-
uses: actions/checkout@v3
|
42
|
-
|
43
|
-
# Initializes the CodeQL tools for scanning.
|
44
|
-
- name: Initialize CodeQL
|
45
|
-
uses: github/codeql-action/init@v2
|
46
|
-
with:
|
47
|
-
languages: ${{ matrix.language }}
|
48
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
-
# By default, queries listed here will override any specified in a config file.
|
50
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
-
|
52
|
-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
53
|
-
# queries: security-extended,security-and-quality
|
54
|
-
|
55
|
-
|
56
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
57
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
58
|
-
- name: Autobuild
|
59
|
-
uses: github/codeql-action/autobuild@v2
|
60
|
-
|
61
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
62
|
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
63
|
-
|
64
|
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
65
|
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
66
|
-
|
67
|
-
# - run: |
|
68
|
-
# echo "Run, Build Application using script"
|
69
|
-
# ./location_of_script_within_repo/buildscript.sh
|
70
|
-
|
71
|
-
- name: Perform CodeQL Analysis
|
72
|
-
uses: github/codeql-action/analyze@v2
|
@@ -1,99 +0,0 @@
|
|
1
|
-
name: cronjob
|
2
|
-
|
3
|
-
on:
|
4
|
-
schedule:
|
5
|
-
- cron: "0 0 * * *"
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
sqlite3:
|
9
|
-
runs-on: ubuntu-22.04
|
10
|
-
strategy:
|
11
|
-
fail-fast: false
|
12
|
-
matrix:
|
13
|
-
ruby:
|
14
|
-
- 3.2.2
|
15
|
-
env:
|
16
|
-
DB: sqlite3
|
17
|
-
RAILS: main
|
18
|
-
steps:
|
19
|
-
- uses: actions/checkout@v2
|
20
|
-
- name: Set up Ruby
|
21
|
-
uses: ruby/setup-ruby@v1
|
22
|
-
with:
|
23
|
-
ruby-version: ${{ matrix.ruby }}
|
24
|
-
- name: Install dependencies
|
25
|
-
run: bundle install
|
26
|
-
- name: Run tests
|
27
|
-
run: bundle exec rspec
|
28
|
-
|
29
|
-
mysql:
|
30
|
-
runs-on: ubuntu-22.04
|
31
|
-
strategy:
|
32
|
-
fail-fast: false
|
33
|
-
matrix:
|
34
|
-
ruby:
|
35
|
-
- 3.2.2
|
36
|
-
env:
|
37
|
-
DB: mysql
|
38
|
-
RAILS: main
|
39
|
-
MYSQL_USERNAME: root
|
40
|
-
MYSQL_PASSWORD: root
|
41
|
-
steps:
|
42
|
-
- uses: actions/checkout@v2
|
43
|
-
- name: Set up Ruby
|
44
|
-
uses: ruby/setup-ruby@v1
|
45
|
-
with:
|
46
|
-
ruby-version: ${{ matrix.ruby }}
|
47
|
-
- name: Startup MySQL
|
48
|
-
run: |
|
49
|
-
sudo systemctl start mysql.service
|
50
|
-
- name: Setup databases
|
51
|
-
run: |
|
52
|
-
mysql --user=root --password=root --host=127.0.0.1 -e 'create database ransack collate utf8_general_ci;';
|
53
|
-
mysql --user=root --password=root --host=127.0.0.1 -e 'use ransack;show variables like "%character%";show variables like "%collation%";';
|
54
|
-
- name: Install dependencies
|
55
|
-
run: bundle install
|
56
|
-
- name: Run tests
|
57
|
-
run: bundle exec rspec
|
58
|
-
|
59
|
-
postgres:
|
60
|
-
runs-on: ubuntu-22.04
|
61
|
-
strategy:
|
62
|
-
fail-fast: false
|
63
|
-
matrix:
|
64
|
-
ruby:
|
65
|
-
- 3.2.2
|
66
|
-
env:
|
67
|
-
DB: postgres
|
68
|
-
RAILS: main
|
69
|
-
DATABASE_USERNAME: postgres
|
70
|
-
DATABASE_PASSWORD: postgres
|
71
|
-
DATABASE_HOST: 127.0.0.1
|
72
|
-
services:
|
73
|
-
postgres:
|
74
|
-
image: postgres
|
75
|
-
ports:
|
76
|
-
- 5432:5432
|
77
|
-
env:
|
78
|
-
POSTGRES_PASSWORD: postgres
|
79
|
-
POSTGRES_HOST_AUTH_METHOD: trust
|
80
|
-
# Set health checks to wait until postgres has started
|
81
|
-
options: >-
|
82
|
-
--health-cmd pg_isready
|
83
|
-
--health-interval 10s
|
84
|
-
--health-timeout 5s
|
85
|
-
--health-retries 5
|
86
|
-
|
87
|
-
steps:
|
88
|
-
- uses: actions/checkout@v2
|
89
|
-
- name: Set up Ruby
|
90
|
-
uses: ruby/setup-ruby@v1
|
91
|
-
with:
|
92
|
-
ruby-version: ${{ matrix.ruby }}
|
93
|
-
- name: Setup databases
|
94
|
-
run: |
|
95
|
-
psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
|
96
|
-
- name: Install dependencies
|
97
|
-
run: bundle install
|
98
|
-
- name: Run tests
|
99
|
-
run: bundle exec rspec
|
@@ -1,35 +0,0 @@
|
|
1
|
-
name: Deploy to GitHub Pages
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
deploy:
|
10
|
-
name: Deploy to GitHub Pages
|
11
|
-
|
12
|
-
runs-on: ubuntu-22.04
|
13
|
-
|
14
|
-
steps:
|
15
|
-
- uses: actions/checkout@v3
|
16
|
-
|
17
|
-
- uses: actions/setup-node@v3
|
18
|
-
with:
|
19
|
-
node-version: 16
|
20
|
-
cache: yarn
|
21
|
-
cache-dependency-path: docs/yarn.lock
|
22
|
-
|
23
|
-
- name: Install dependencies
|
24
|
-
run: yarn install --frozen-lockfile
|
25
|
-
working-directory: docs
|
26
|
-
|
27
|
-
- name: Build website
|
28
|
-
run: yarn build
|
29
|
-
working-directory: docs
|
30
|
-
|
31
|
-
- name: Deploy to GitHub Pages
|
32
|
-
uses: peaceiris/actions-gh-pages@v3
|
33
|
-
with:
|
34
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
35
|
-
publish_dir: docs/build
|
@@ -1,20 +0,0 @@
|
|
1
|
-
name: rubocop
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
pull_request:
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
build:
|
9
|
-
runs-on: ubuntu-22.04
|
10
|
-
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@v2
|
13
|
-
- name: Set up Ruby
|
14
|
-
uses: ruby/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: 3.2.2
|
17
|
-
- name: Install gems
|
18
|
-
run: bundle install --jobs 4 --retry 3
|
19
|
-
- name: Run RuboCop
|
20
|
-
run: bundle exec rubocop --parallel
|
@@ -1,29 +0,0 @@
|
|
1
|
-
name: Test deploy to GitHub Pages
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
test-deploy:
|
10
|
-
name: Test deploy to GitHub Pages
|
11
|
-
|
12
|
-
runs-on: ubuntu-22.04
|
13
|
-
|
14
|
-
steps:
|
15
|
-
- uses: actions/checkout@v3
|
16
|
-
|
17
|
-
- uses: actions/setup-node@v3
|
18
|
-
with:
|
19
|
-
node-version: 16
|
20
|
-
cache: yarn
|
21
|
-
cache-dependency-path: docs/yarn.lock
|
22
|
-
|
23
|
-
- name: Install dependencies
|
24
|
-
run: yarn install --frozen-lockfile
|
25
|
-
working-directory: docs
|
26
|
-
|
27
|
-
- name: Test build website
|
28
|
-
run: yarn build
|
29
|
-
working-directory: docs
|
data/.github/workflows/test.yml
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
name: test
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- main
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
sqlite3:
|
11
|
-
runs-on: ubuntu-22.04
|
12
|
-
strategy:
|
13
|
-
fail-fast: false
|
14
|
-
matrix:
|
15
|
-
rails:
|
16
|
-
- 7-2-stable
|
17
|
-
- v7.1.0
|
18
|
-
- v7.0.3
|
19
|
-
- v6.1.6
|
20
|
-
ruby:
|
21
|
-
- 3.2.2
|
22
|
-
- 3.1.4
|
23
|
-
env:
|
24
|
-
DB: sqlite3
|
25
|
-
RAILS: ${{ matrix.rails }}
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@v2
|
28
|
-
- name: Set up Ruby
|
29
|
-
uses: ruby/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
bundler-cache: true
|
33
|
-
- name: Run tests
|
34
|
-
run: bundle exec rspec
|
35
|
-
|
36
|
-
mysql:
|
37
|
-
runs-on: ubuntu-22.04
|
38
|
-
strategy:
|
39
|
-
fail-fast: false
|
40
|
-
matrix:
|
41
|
-
rails:
|
42
|
-
- 7-2-stable
|
43
|
-
- v7.1.0
|
44
|
-
- v7.0.3
|
45
|
-
- v6.1.6
|
46
|
-
ruby:
|
47
|
-
- 3.2.2
|
48
|
-
- 3.1.4
|
49
|
-
env:
|
50
|
-
DB: mysql
|
51
|
-
RAILS: ${{ matrix.rails }}
|
52
|
-
MYSQL_USERNAME: root
|
53
|
-
MYSQL_PASSWORD: root
|
54
|
-
steps:
|
55
|
-
- uses: actions/checkout@v2
|
56
|
-
- name: Set up Ruby
|
57
|
-
uses: ruby/setup-ruby@v1
|
58
|
-
with:
|
59
|
-
ruby-version: ${{ matrix.ruby }}
|
60
|
-
bundler-cache: true
|
61
|
-
- name: Startup MySQL
|
62
|
-
run: |
|
63
|
-
sudo systemctl start mysql.service
|
64
|
-
- name: Setup databases
|
65
|
-
run: |
|
66
|
-
mysql --user=root --password=root --host=127.0.0.1 -e 'create database ransack collate utf8_general_ci;';
|
67
|
-
mysql --user=root --password=root --host=127.0.0.1 -e 'use ransack;show variables like "%character%";show variables like "%collation%";';
|
68
|
-
- name: Run tests
|
69
|
-
run: bundle exec rspec
|
70
|
-
|
71
|
-
postgres:
|
72
|
-
runs-on: ubuntu-22.04
|
73
|
-
strategy:
|
74
|
-
fail-fast: false
|
75
|
-
matrix:
|
76
|
-
rails:
|
77
|
-
- 7-2-stable
|
78
|
-
- v7.1.0
|
79
|
-
- v7.0.3
|
80
|
-
- v6.1.6
|
81
|
-
ruby:
|
82
|
-
- 3.2.2
|
83
|
-
- 3.1.4
|
84
|
-
env:
|
85
|
-
DB: postgres
|
86
|
-
RAILS: ${{ matrix.rails }}
|
87
|
-
DATABASE_USERNAME: postgres
|
88
|
-
DATABASE_PASSWORD: postgres
|
89
|
-
DATABASE_HOST: 127.0.0.1
|
90
|
-
services:
|
91
|
-
postgres:
|
92
|
-
image: postgres
|
93
|
-
ports:
|
94
|
-
- 5432:5432
|
95
|
-
env:
|
96
|
-
POSTGRES_PASSWORD: postgres
|
97
|
-
POSTGRES_HOST_AUTH_METHOD: trust
|
98
|
-
# Set health checks to wait until postgres has started
|
99
|
-
options: >-
|
100
|
-
--health-cmd pg_isready
|
101
|
-
--health-interval 10s
|
102
|
-
--health-timeout 5s
|
103
|
-
--health-retries 5
|
104
|
-
|
105
|
-
steps:
|
106
|
-
- uses: actions/checkout@v2
|
107
|
-
- name: Set up Ruby
|
108
|
-
uses: ruby/setup-ruby@v1
|
109
|
-
with:
|
110
|
-
ruby-version: ${{ matrix.ruby }}
|
111
|
-
bundler-cache: true
|
112
|
-
- name: Setup databases
|
113
|
-
run: |
|
114
|
-
psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
|
115
|
-
- name: Run tests
|
116
|
-
run: bundle exec rspec
|
117
|
-
|
118
|
-
bug-report-templates:
|
119
|
-
runs-on: ubuntu-22.04
|
120
|
-
steps:
|
121
|
-
- uses: actions/checkout@v2
|
122
|
-
- name: Set up Ruby
|
123
|
-
uses: ruby/setup-ruby@v1
|
124
|
-
with:
|
125
|
-
ruby-version: 3.2.2
|
126
|
-
bundler-cache: true
|
127
|
-
- name: Run bug report templates
|
128
|
-
run: |
|
129
|
-
ruby bug_report_templates/test-ransacker-arel-present-predicate.rb
|
130
|
-
ruby bug_report_templates/test-ransack-scope-and-column-same-name.rb
|
131
|
-
rm Gemfile Gemfile.lock
|
data/.gitignore
DELETED
data/.nojekyll
DELETED
File without changes
|
data/.rubocop.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 3.0
|
3
|
-
|
4
|
-
DisabledByDefault: true
|
5
|
-
|
6
|
-
Exclude:
|
7
|
-
- "docs/**/*"
|
8
|
-
|
9
|
-
Layout/EmptyLineAfterMagicComment:
|
10
|
-
Enabled: true
|
11
|
-
|
12
|
-
Layout/EmptyLineBetweenDefs:
|
13
|
-
Enabled: true
|
14
|
-
|
15
|
-
Layout/EmptyLines:
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Layout/FirstArrayElementIndentation:
|
19
|
-
EnforcedStyle: consistent
|
20
|
-
|
21
|
-
Layout/SpaceAfterComma:
|
22
|
-
Enabled: true
|
23
|
-
|
24
|
-
Layout/SpaceInsideBlockBraces:
|
25
|
-
Enabled: true
|
26
|
-
|
27
|
-
Layout/SpaceInsideHashLiteralBraces:
|
28
|
-
Enabled: true
|
29
|
-
|
30
|
-
Layout/SpaceInsideParens:
|
31
|
-
Enabled: true
|
32
|
-
|
33
|
-
Layout/TrailingEmptyLines:
|
34
|
-
Enabled: true
|
35
|
-
|
36
|
-
Style/HashSyntax:
|
37
|
-
Enabled: true
|
38
|
-
|
39
|
-
Style/RedundantFileExtensionInRequire:
|
40
|
-
Enabled: true
|
41
|
-
|
42
|
-
Style/RedundantReturn:
|
43
|
-
Enabled: true
|
44
|
-
|
45
|
-
Style/SelfAssignment:
|
46
|
-
Enabled: true
|
47
|
-
|
48
|
-
Style/Semicolon:
|
49
|
-
Enabled: true
|
50
|
-
|