ransack 2.6.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/deploy.yml +35 -0
- data/.github/workflows/test-deploy.yml +29 -0
- data/.github/workflows/test.yml +10 -22
- data/.nojekyll +0 -0
- data/CHANGELOG.md +114 -13
- data/README.md +45 -1039
- data/docs/.gitignore +19 -0
- data/docs/.nojekyll +0 -0
- data/docs/babel.config.js +3 -0
- data/docs/blog/2022-03-27-ransack-3.0.0.md +20 -0
- data/docs/docs/getting-started/_category_.json +4 -0
- data/docs/docs/getting-started/advanced-mode.md +46 -0
- data/docs/docs/getting-started/configuration.md +47 -0
- data/docs/docs/getting-started/search-matches.md +67 -0
- data/docs/docs/getting-started/simple-mode.md +284 -0
- data/docs/docs/getting-started/sorting.md +79 -0
- data/docs/docs/getting-started/using-predicates.md +282 -0
- data/docs/docs/going-further/_category_.json +4 -0
- data/docs/docs/going-further/acts-as-taggable-on.md +114 -0
- data/docs/docs/going-further/associations.md +70 -0
- data/docs/docs/going-further/custom-predicates.md +52 -0
- data/docs/docs/going-further/documentation.md +43 -0
- data/docs/docs/going-further/exporting-to-csv.md +49 -0
- data/docs/docs/going-further/external-guides.md +57 -0
- data/docs/docs/going-further/form-customisation.md +63 -0
- data/docs/docs/going-further/i18n.md +53 -0
- data/docs/{img → docs/going-further/img}/create_release.png +0 -0
- data/docs/docs/going-further/merging-searches.md +41 -0
- data/docs/docs/going-further/other-notes.md +428 -0
- data/docs/docs/going-further/polymorphic-search.md +40 -0
- data/docs/docs/going-further/ransackers.md +331 -0
- data/docs/docs/going-further/release_process.md +36 -0
- data/docs/docs/going-further/saving-queries.md +82 -0
- data/docs/docs/going-further/searching-postgres.md +57 -0
- data/docs/docs/going-further/wiki-contributors.md +82 -0
- data/docs/docs/intro.md +99 -0
- data/docs/docusaurus.config.js +107 -0
- data/docs/package.json +37 -0
- data/docs/sidebars.js +31 -0
- data/docs/src/components/HomepageFeatures/index.js +64 -0
- data/docs/src/components/HomepageFeatures/styles.module.css +11 -0
- data/docs/src/css/custom.css +39 -0
- data/docs/src/pages/index.module.css +23 -0
- data/docs/src/pages/markdown-page.md +7 -0
- 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 +1 -0
- 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 +171 -0
- data/docs/static/img/undraw_docusaurus_react.svg +170 -0
- data/docs/static/img/undraw_docusaurus_tree.svg +40 -0
- data/{logo → docs/static/logo}/ransack-h.png +0 -0
- data/{logo → docs/static/logo}/ransack-h.svg +0 -0
- data/{logo → docs/static/logo}/ransack-v.png +0 -0
- data/{logo → docs/static/logo}/ransack-v.svg +0 -0
- data/{logo → docs/static/logo}/ransack.png +0 -0
- data/{logo → docs/static/logo}/ransack.svg +0 -0
- data/docs/yarn.lock +7671 -0
- data/lib/polyamorous/activerecord_7.1_ruby_2/join_association.rb +1 -0
- data/lib/polyamorous/activerecord_7.1_ruby_2/join_dependency.rb +1 -0
- data/lib/polyamorous/activerecord_7.1_ruby_2/reflection.rb +1 -0
- data/lib/ransack/adapters/active_record/base.rb +0 -2
- data/lib/ransack/adapters/active_record/context.rb +1 -0
- data/lib/ransack/helpers/form_helper.rb +10 -2
- data/lib/ransack/search.rb +2 -2
- data/lib/ransack/version.rb +1 -1
- data/ransack.gemspec +3 -3
- data/spec/ransack/adapters/active_record/base_spec.rb +10 -1
- data/spec/ransack/helpers/form_helper_spec.rb +44 -0
- data/spec/ransack/search_spec.rb +23 -0
- data/spec/support/schema.rb +16 -0
- metadata +66 -13
- data/docs/release_process.md +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9db4893295fd342185cf668f2b3edbc59f1e649945024147778bdc52978e53fa
|
4
|
+
data.tar.gz: 9f57ba51a61d63f1f4023735d8a2ef9384e7840461af65169f4c0214f4b619a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625d61491c96bd319e95d65d0d704f3906b8087e21f8fd2f8f2d1515ac4debdd3e39b678bbea8f0d39d6a5e58d5b46ba66919cb8b4770c8bb7fc4a77421c743e
|
7
|
+
data.tar.gz: cec0aa2875df4b9b8d5e8ae222fba9970ec0aaaf66de05ae21110a981828704a294f8f16fb55037ea0db39429611d7ea0e5f5d4ff51dbcd01cd66fca171b4ecf
|
@@ -0,0 +1,35 @@
|
|
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-20.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
|
@@ -0,0 +1,29 @@
|
|
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-20.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
CHANGED
@@ -11,17 +11,13 @@ jobs:
|
|
11
11
|
fail-fast: false
|
12
12
|
matrix:
|
13
13
|
rails:
|
14
|
-
- v7.0.
|
15
|
-
- v6.1.
|
14
|
+
- v7.0.2
|
15
|
+
- v6.1.5
|
16
16
|
- v6.0.4
|
17
|
-
- 6-0-stable
|
18
17
|
ruby:
|
18
|
+
- 3.1.1
|
19
19
|
- 3.0.2
|
20
20
|
- 2.7.4
|
21
|
-
- 2.6.7
|
22
|
-
exclude:
|
23
|
-
- rails: v7.0.0
|
24
|
-
ruby: 2.6.7
|
25
21
|
env:
|
26
22
|
DB: sqlite3
|
27
23
|
RAILS: ${{ matrix.rails }}
|
@@ -42,17 +38,13 @@ jobs:
|
|
42
38
|
fail-fast: false
|
43
39
|
matrix:
|
44
40
|
rails:
|
45
|
-
- v7.0.
|
46
|
-
- v6.1.
|
41
|
+
- v7.0.2
|
42
|
+
- v6.1.5
|
47
43
|
- v6.0.4
|
48
|
-
- 6-0-stable
|
49
44
|
ruby:
|
45
|
+
- 3.1.1
|
50
46
|
- 3.0.2
|
51
47
|
- 2.7.4
|
52
|
-
- 2.6.7
|
53
|
-
exclude:
|
54
|
-
- rails: v7.0.0
|
55
|
-
ruby: 2.6.7
|
56
48
|
env:
|
57
49
|
DB: mysql
|
58
50
|
RAILS: ${{ matrix.rails }}
|
@@ -82,17 +74,13 @@ jobs:
|
|
82
74
|
fail-fast: false
|
83
75
|
matrix:
|
84
76
|
rails:
|
85
|
-
- v7.0.
|
86
|
-
- v6.1.
|
77
|
+
- v7.0.2
|
78
|
+
- v6.1.5
|
87
79
|
- v6.0.4
|
88
|
-
- 6-0-stable
|
89
80
|
ruby:
|
81
|
+
- 3.1.1
|
90
82
|
- 3.0.2
|
91
83
|
- 2.7.4
|
92
|
-
- 2.6.7
|
93
|
-
exclude:
|
94
|
-
- rails: v7.0.0
|
95
|
-
ruby: 2.6.7
|
96
84
|
env:
|
97
85
|
DB: postgres
|
98
86
|
RAILS: ${{ matrix.rails }}
|
@@ -135,7 +123,7 @@ jobs:
|
|
135
123
|
- name: Set up Ruby
|
136
124
|
uses: ruby/setup-ruby@v1
|
137
125
|
with:
|
138
|
-
ruby-version: 3.
|
126
|
+
ruby-version: 3.1.1
|
139
127
|
- name: Install dependencies
|
140
128
|
run: bundle install
|
141
129
|
- name: Run bug report templates
|
data/.nojekyll
ADDED
File without changes
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,80 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 3.1.0 - 2022-04-21
|
6
|
+
|
7
|
+
* Fix predicate name in "Using Predicates" documentation page.
|
8
|
+
PR [1313](https://github.com/activerecord-hackery/ransack/pull/1313)
|
9
|
+
|
10
|
+
* Drop Ruby 2.6 support.
|
11
|
+
PR [1311](https://github.com/activerecord-hackery/ransack/pull/1311)
|
12
|
+
|
13
|
+
* Allow Ransack to be used with Rails 7.1.0.alpha.
|
14
|
+
PR [1309](https://github.com/activerecord-hackery/ransack/pull/1309)
|
15
|
+
|
16
|
+
* Put contributor list last in documentation site.
|
17
|
+
PR [1308](https://github.com/activerecord-hackery/ransack/pull/1308)
|
18
|
+
|
19
|
+
* Add `acts-as-taggable-on` and polymorphic searches to documentation.
|
20
|
+
PR [1306](https://github.com/activerecord-hackery/ransack/pull/1306)
|
21
|
+
PR [1312](https://github.com/activerecord-hackery/ransack/pull/1312)
|
22
|
+
|
23
|
+
* Add full link to issue about merging searches to documentation.
|
24
|
+
PR [1305](https://github.com/activerecord-hackery/ransack/pull/1305)
|
25
|
+
|
26
|
+
## 3.0.1 - 2022-04-08
|
27
|
+
|
28
|
+
* Fix `:data` option to `sort_link` being incorrectly appended to the generated
|
29
|
+
link query parameters.
|
30
|
+
PR [1301](https://github.com/activerecord-hackery/ransack/pull/1301)
|
31
|
+
|
32
|
+
* Fix "Edit this page" links in documentation site
|
33
|
+
PR [1303](https://github.com/activerecord-hackery/ransack/pull/1303)
|
34
|
+
|
35
|
+
* Auto deploy documentation site after merging PRs
|
36
|
+
PR [1302](https://github.com/activerecord-hackery/ransack/pull/1302)
|
37
|
+
|
38
|
+
* Add list of former wiki contributors to documentation site
|
39
|
+
PR [1300](https://github.com/activerecord-hackery/ransack/pull/1300)
|
40
|
+
|
41
|
+
* Reduce gem package size
|
42
|
+
PR [1297](https://github.com/activerecord-hackery/ransack/pull/1297)
|
43
|
+
|
44
|
+
## 3.0.0 - 2022-03-30
|
45
|
+
|
46
|
+
* Move documentation into Docusaurus.
|
47
|
+
PR [1291](https://github.com/activerecord-hackery/ransack/pull/1291)
|
48
|
+
|
49
|
+
* [BREAKING CHANGE] Remove deprecated `#search` method.
|
50
|
+
PR [1147](https://github.com/activerecord-hackery/ransack/pull/1147)
|
51
|
+
|
52
|
+
* Allow scopes that define string SQL joins.
|
53
|
+
PR [1225](https://github.com/activerecord-hackery/ransack/pull/1225)
|
54
|
+
|
55
|
+
* Improve `sort_link` documentation.
|
56
|
+
PR [1290](https://github.com/activerecord-hackery/ransack/pull/1290)
|
57
|
+
|
58
|
+
* Deprecate passing two trailing hashes to `sort_link`, for example:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
sort_link(@q, :bussiness_name, "bussines_name", {}, class: "foo")
|
62
|
+
```
|
63
|
+
|
64
|
+
Pass a single hash with all options instead.
|
65
|
+
PR [1289](https://github.com/activerecord-hackery/ransack/pull/1289)
|
66
|
+
|
67
|
+
* Fix `:class` option to `sort_link` not being passed to the generated link
|
68
|
+
correctly when no additional options are passed. For example:
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
sort_link(@q, :bussiness_name, class: "foo")
|
72
|
+
```
|
73
|
+
|
74
|
+
PR [1288](https://github.com/activerecord-hackery/ransack/pull/1288)
|
75
|
+
|
76
|
+
* Evaluate `ransackable_scopes` before attributes when building the query.
|
77
|
+
PR [759](https://github.com/activerecord-hackery/ransack/pull/759)
|
78
|
+
|
5
79
|
## 2.6.0 - 2022-03-08
|
6
80
|
|
7
81
|
* Fix regression when joining a table with itself.
|
@@ -12,28 +86,55 @@
|
|
12
86
|
|
13
87
|
## 2.5.0 - 2021-12-26
|
14
88
|
|
89
|
+
* Document release process by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1199, https://github.com/activerecord-hackery/ransack/pull/1200.
|
90
|
+
* Support Rails 7 by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1205, https://github.com/activerecord-hackery/ransack/pull/1209, https://github.com/activerecord-hackery/ransack/pull/1234, https://github.com/activerecord-hackery/ransack/pull/1230, https://github.com/activerecord-hackery/ransack/pull/1266
|
91
|
+
* Fix for `ActiveRecord::UnknownAttributeReference` in ransack by @TechnologyHypofriend in https://github.com/activerecord-hackery/ransack/pull/1207
|
92
|
+
* Make gem compatible with old polyamorous require by @rtweeks in https://github.com/activerecord-hackery/ransack/pull/1145
|
93
|
+
* Adding swedish translations by @johanandre in https://github.com/activerecord-hackery/ransack/pull/1208
|
94
|
+
* Document how to do case insensitive searches by @scarroll32 in https://github.com/activerecord-hackery/ransack/pull/1213
|
95
|
+
* Add the ability to disable whitespace stripping for string searches by @DCrow in https://github.com/activerecord-hackery/ransack/pull/1214
|
96
|
+
* Fix `:default` option in `Translate.attribute` method by @coreyaus in https://github.com/activerecord-hackery/ransack/pull/1218
|
97
|
+
* Fix typo in README.md by @d-m-u in https://github.com/activerecord-hackery/ransack/pull/1220
|
98
|
+
* Fix another typo in README.md by @plan-do-break-fix in https://github.com/activerecord-hackery/ransack/pull/1221
|
99
|
+
* Fix several documentation typos @wonda-tea-coffee in https://github.com/activerecord-hackery/ransack/pull/1233
|
100
|
+
* Allow ransack to treat nulls as always first or last by @mollerhoj in https://github.com/activerecord-hackery/ransack/pull/1226
|
101
|
+
* Consider ransack aliases when sorting by @faragorn and @waldyr in https://github.com/activerecord-hackery/ransack/pull/1223
|
102
|
+
* Fix non-casted array predicates by @danielpclark in https://github.com/activerecord-hackery/ransack/pull/1246
|
103
|
+
* Remove Squeel references from README by @Schwad in https://github.com/activerecord-hackery/ransack/pull/1249
|
104
|
+
* Remove part of the README that might lead to incorrect results by @RadekMolenda in https://github.com/activerecord-hackery/ransack/pull/1258
|
15
105
|
* ActiveRecord 7.0 support
|
16
106
|
|
17
|
-
|
107
|
+
## 2.4.2 - 2021-01-23
|
18
108
|
|
19
|
-
*
|
20
|
-
|
109
|
+
* Enable RuboCop and configure GitHub Actions to run RuboCop by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1185
|
110
|
+
* Add Ruby 3.0.0 support by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1190
|
111
|
+
* Drop Ruby 2.5 or older versions of Ruby by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1189
|
112
|
+
* Move bug report templates into ransack repository and run templates at CI by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1191
|
113
|
+
* Allow Ransack to be tested with Rails main branch by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1192
|
21
114
|
|
22
115
|
## 2.4.1 - 2020-12-21
|
23
116
|
|
24
|
-
*
|
25
|
-
|
26
|
-
|
117
|
+
* Links to Tidelift subscription by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1178
|
118
|
+
* Enable GitHub Actions by @yahonda in https://github.com/activerecord-hackery/ransack/pull/1180
|
119
|
+
* Move security contact information to SECURITY.md by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1179
|
120
|
+
* Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition by @alipman88 in https://github.com/activerecord-hackery/ransack/pull/1132
|
121
|
+
* Add ability to config PostgreSQL ORDER BY ... NULLS FIRST or NULLS LAST by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1184
|
27
122
|
|
28
123
|
## 2.4.0 - 2020-11-27
|
29
124
|
|
30
|
-
*
|
31
|
-
|
32
|
-
|
33
|
-
*
|
34
|
-
|
35
|
-
*
|
36
|
-
|
125
|
+
* Specify actual version of polyamorous, so we can release that separately by @gregmolnar in https://github.com/activerecord-hackery/ransack/pull/1101
|
126
|
+
* Only include necessary files in gem package by @tvdeyen in https://github.com/activerecord-hackery/ransack/pull/1104
|
127
|
+
* Test/Fix for subquery in Rails 5.2.4 by @stevenjonescgm in https://github.com/activerecord-hackery/ransack/pull/1112
|
128
|
+
* Polyamorous module by @varyonic in https://github.com/activerecord-hackery/ransack/pull/1113
|
129
|
+
* Remove duplicated rows by @sasharevzin in https://github.com/activerecord-hackery/ransack/pull/1116
|
130
|
+
* Fix Ruby 2.7 deprecation warnings by @terracatta in https://github.com/activerecord-hackery/ransack/pull/1121
|
131
|
+
* Fixes polymorphic joins. by @PhilCoggins in https://github.com/activerecord-hackery/ransack/pull/1122
|
132
|
+
* Drop support for activerecord older than 5.2.4 by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1166
|
133
|
+
* Adapt to quoting change in Rails by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1165
|
134
|
+
* Typo in docs by @brett-anderson in https://github.com/activerecord-hackery/ransack/pull/1155
|
135
|
+
* Add Rails 6.1 support by @deivid-rodriguez in https://github.com/activerecord-hackery/ransack/pull/1172
|
136
|
+
* Strip Leading & Trailing Whitespace Before Searching by @itsalongstory in https://github.com/activerecord-hackery/ransack/pull/1126
|
137
|
+
* Use unfrozen version of symbol to string by @fauno in https://github.com/activerecord-hackery/ransack/pull/1149
|
37
138
|
|
38
139
|
## 2.3.2 - 2020-01-11
|
39
140
|
|