ransack 4.3.0 → 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 +4 -2
- data/lib/polyamorous/polyamorous.rb +1 -1
- data/lib/ransack/adapters/active_record/context.rb +30 -3
- 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/locale/ja.yml +51 -51
- data/lib/ransack/locale/ko.yml +6 -6
- data/lib/ransack/locale/uk.yml +72 -0
- data/lib/ransack/nodes/condition.rb +36 -6
- 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 +1 -1
- 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 +101 -2
- 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 +229 -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 +0 -1
- data/spec/ransack/search_spec.rb +107 -1
- data/spec/ransack/translate_spec.rb +0 -1
- data/spec/spec_helper.rb +2 -3
- data/spec/support/schema.rb +30 -0
- metadata +41 -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 -141
- 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 -183
- data/.gitignore +0 -7
- data/.nojekyll +0 -0
- data/.rubocop.yml +0 -50
- data/CHANGELOG.md +0 -1193
- data/CONTRIBUTING.md +0 -171
- data/Gemfile +0 -58
- 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 -289
- 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 -425
- 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
data/.github/workflows/test.yml
DELETED
@@ -1,183 +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-latest
|
12
|
-
strategy:
|
13
|
-
fail-fast: false
|
14
|
-
matrix:
|
15
|
-
rails:
|
16
|
-
- 8-0-stable
|
17
|
-
- v7.2.2
|
18
|
-
- v7.1.0
|
19
|
-
ruby:
|
20
|
-
- 3.2.2
|
21
|
-
- 3.1.4
|
22
|
-
exclude:
|
23
|
-
- rails: 8-0-stable
|
24
|
-
ruby: 3.1.4
|
25
|
-
env:
|
26
|
-
DB: sqlite3
|
27
|
-
RAILS: ${{ matrix.rails }}
|
28
|
-
steps:
|
29
|
-
- uses: actions/checkout@v2
|
30
|
-
- name: Set up Ruby
|
31
|
-
uses: ruby/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
bundler-cache: true
|
35
|
-
- name: Run tests
|
36
|
-
run: bundle exec rspec
|
37
|
-
|
38
|
-
mysql:
|
39
|
-
runs-on: ubuntu-latest
|
40
|
-
strategy:
|
41
|
-
fail-fast: false
|
42
|
-
matrix:
|
43
|
-
rails:
|
44
|
-
- 8-0-stable
|
45
|
-
- 7-2-stable
|
46
|
-
- v7.1.0
|
47
|
-
ruby:
|
48
|
-
- 3.2.2
|
49
|
-
- 3.1.4
|
50
|
-
exclude:
|
51
|
-
- rails: 8-0-stable
|
52
|
-
ruby: 3.1.4
|
53
|
-
|
54
|
-
env:
|
55
|
-
DB: mysql
|
56
|
-
RAILS: ${{ matrix.rails }}
|
57
|
-
MYSQL_USERNAME: root
|
58
|
-
MYSQL_PASSWORD: root
|
59
|
-
steps:
|
60
|
-
- uses: actions/checkout@v2
|
61
|
-
- name: Set up Ruby
|
62
|
-
uses: ruby/setup-ruby@v1
|
63
|
-
with:
|
64
|
-
ruby-version: ${{ matrix.ruby }}
|
65
|
-
bundler-cache: true
|
66
|
-
- name: Startup MySQL
|
67
|
-
run: |
|
68
|
-
sudo systemctl start mysql.service
|
69
|
-
- name: Setup databases
|
70
|
-
run: |
|
71
|
-
mysql --user=root --password=root --host=127.0.0.1 -e 'create database ransack collate utf8_general_ci;';
|
72
|
-
mysql --user=root --password=root --host=127.0.0.1 -e 'use ransack;show variables like "%character%";show variables like "%collation%";';
|
73
|
-
- name: Run tests
|
74
|
-
run: bundle exec rspec
|
75
|
-
|
76
|
-
postgis:
|
77
|
-
runs-on: ubuntu-22.04
|
78
|
-
strategy:
|
79
|
-
fail-fast: false
|
80
|
-
matrix:
|
81
|
-
rails:
|
82
|
-
- 7-2-stable
|
83
|
-
- v7.1.0
|
84
|
-
ruby:
|
85
|
-
- 3.2.2
|
86
|
-
- 3.1.4
|
87
|
-
env:
|
88
|
-
DB: postgis
|
89
|
-
RAILS: ${{ matrix.rails }}
|
90
|
-
DATABASE_USERNAME: postgres
|
91
|
-
DATABASE_PASSWORD: postgres
|
92
|
-
DATABASE_HOST: 127.0.0.1
|
93
|
-
services:
|
94
|
-
postgres:
|
95
|
-
image: postgres
|
96
|
-
ports:
|
97
|
-
- 5432:5432
|
98
|
-
env:
|
99
|
-
POSTGRES_PASSWORD: postgres
|
100
|
-
POSTGRES_HOST_AUTH_METHOD: trust
|
101
|
-
# Set health checks to wait until postgres has started
|
102
|
-
options: >-
|
103
|
-
--health-cmd pg_isready
|
104
|
-
--health-interval 10s
|
105
|
-
--health-timeout 5s
|
106
|
-
--health-retries 5
|
107
|
-
|
108
|
-
steps:
|
109
|
-
- uses: actions/checkout@v2
|
110
|
-
- name: Set up Ruby
|
111
|
-
uses: ruby/setup-ruby@v1
|
112
|
-
with:
|
113
|
-
ruby-version: ${{ matrix.ruby }}
|
114
|
-
bundler-cache: true
|
115
|
-
- name: Setup databases
|
116
|
-
run: |
|
117
|
-
psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
|
118
|
-
- name: Run tests
|
119
|
-
run: bundle exec rspec
|
120
|
-
|
121
|
-
postgres:
|
122
|
-
runs-on: ubuntu-latest
|
123
|
-
strategy:
|
124
|
-
fail-fast: false
|
125
|
-
matrix:
|
126
|
-
rails:
|
127
|
-
- 8-0-stable
|
128
|
-
- 7-2-stable
|
129
|
-
- v7.1.0
|
130
|
-
ruby:
|
131
|
-
- 3.2.2
|
132
|
-
- 3.1.4
|
133
|
-
exclude:
|
134
|
-
- rails: 8-0-stable
|
135
|
-
ruby: 3.1.4
|
136
|
-
env:
|
137
|
-
DB: postgres
|
138
|
-
RAILS: ${{ matrix.rails }}
|
139
|
-
DATABASE_USERNAME: postgres
|
140
|
-
DATABASE_PASSWORD: postgres
|
141
|
-
DATABASE_HOST: 127.0.0.1
|
142
|
-
services:
|
143
|
-
postgres:
|
144
|
-
image: postgres
|
145
|
-
ports:
|
146
|
-
- 5432:5432
|
147
|
-
env:
|
148
|
-
POSTGRES_PASSWORD: postgres
|
149
|
-
POSTGRES_HOST_AUTH_METHOD: trust
|
150
|
-
# Set health checks to wait until postgres has started
|
151
|
-
options: >-
|
152
|
-
--health-cmd pg_isready
|
153
|
-
--health-interval 10s
|
154
|
-
--health-timeout 5s
|
155
|
-
--health-retries 5
|
156
|
-
|
157
|
-
steps:
|
158
|
-
- uses: actions/checkout@v2
|
159
|
-
- name: Set up Ruby
|
160
|
-
uses: ruby/setup-ruby@v1
|
161
|
-
with:
|
162
|
-
ruby-version: ${{ matrix.ruby }}
|
163
|
-
bundler-cache: true
|
164
|
-
- name: Setup databases
|
165
|
-
run: |
|
166
|
-
psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
|
167
|
-
- name: Run tests
|
168
|
-
run: bundle exec rspec
|
169
|
-
|
170
|
-
bug-report-templates:
|
171
|
-
runs-on: ubuntu-latest
|
172
|
-
steps:
|
173
|
-
- uses: actions/checkout@v2
|
174
|
-
- name: Set up Ruby
|
175
|
-
uses: ruby/setup-ruby@v1
|
176
|
-
with:
|
177
|
-
ruby-version: 3.2.2
|
178
|
-
bundler-cache: true
|
179
|
-
- name: Run bug report templates
|
180
|
-
run: |
|
181
|
-
ruby bug_report_templates/test-ransacker-arel-present-predicate.rb
|
182
|
-
ruby bug_report_templates/test-ransack-scope-and-column-same-name.rb
|
183
|
-
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
|
-
|