ransack 4.1.1 → 4.4.1

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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -4
  3. data/lib/polyamorous/activerecord/join_association_7_2.rb +55 -0
  4. data/lib/polyamorous/polyamorous.rb +5 -1
  5. data/lib/ransack/adapters/active_record/context.rb +32 -5
  6. data/lib/ransack/constants.rb +1 -1
  7. data/lib/ransack/context.rb +7 -4
  8. data/lib/ransack/helpers/form_builder.rb +6 -7
  9. data/lib/ransack/helpers/form_helper.rb +86 -20
  10. data/lib/ransack/invalid_search_error.rb +3 -0
  11. data/lib/ransack/locale/ja.yml +51 -51
  12. data/lib/ransack/locale/ko.yml +70 -0
  13. data/lib/ransack/locale/uk.yml +72 -0
  14. data/lib/ransack/nodes/condition.rb +38 -6
  15. data/lib/ransack/nodes/grouping.rb +1 -1
  16. data/lib/ransack/nodes/sort.rb +1 -1
  17. data/lib/ransack/nodes/value.rb +1 -1
  18. data/lib/ransack/search.rb +4 -3
  19. data/lib/ransack/version.rb +1 -1
  20. data/lib/ransack.rb +5 -0
  21. data/spec/console.rb +3 -15
  22. data/spec/factories/articles.rb +7 -0
  23. data/spec/factories/comments.rb +7 -0
  24. data/spec/factories/notes.rb +13 -0
  25. data/spec/factories/people.rb +10 -0
  26. data/spec/factories/tags.rb +5 -0
  27. data/spec/polyamorous/join_association_spec.rb +0 -1
  28. data/spec/polyamorous/join_dependency_spec.rb +0 -1
  29. data/spec/ransack/adapters/active_record/base_spec.rb +144 -3
  30. data/spec/ransack/adapters/active_record/context_spec.rb +72 -0
  31. data/spec/ransack/helpers/form_builder_spec.rb +0 -2
  32. data/spec/ransack/helpers/form_helper_spec.rb +219 -5
  33. data/spec/ransack/invalid_search_error_spec.rb +27 -0
  34. data/spec/ransack/nodes/condition_spec.rb +230 -0
  35. data/spec/ransack/nodes/grouping_spec.rb +2 -2
  36. data/spec/ransack/nodes/value_spec.rb +12 -1
  37. data/spec/ransack/predicate_spec.rb +16 -9
  38. data/spec/ransack/ransacker_spec.rb +69 -0
  39. data/spec/ransack/search_spec.rb +129 -2
  40. data/spec/ransack/translate_spec.rb +0 -1
  41. data/spec/spec_helper.rb +7 -21
  42. data/spec/support/schema.rb +48 -9
  43. metadata +32 -97
  44. data/.github/FUNDING.yml +0 -3
  45. data/.github/SECURITY.md +0 -12
  46. data/.github/workflows/codeql.yml +0 -72
  47. data/.github/workflows/cronjob.yml +0 -99
  48. data/.github/workflows/deploy.yml +0 -35
  49. data/.github/workflows/rubocop.yml +0 -20
  50. data/.github/workflows/test-deploy.yml +0 -29
  51. data/.github/workflows/test.yml +0 -131
  52. data/.gitignore +0 -7
  53. data/.nojekyll +0 -0
  54. data/.rubocop.yml +0 -50
  55. data/CHANGELOG.md +0 -1176
  56. data/CONTRIBUTING.md +0 -171
  57. data/Gemfile +0 -53
  58. data/Rakefile +0 -24
  59. data/bug_report_templates/test-ransack-scope-and-column-same-name.rb +0 -78
  60. data/bug_report_templates/test-ransacker-arel-present-predicate.rb +0 -75
  61. data/docs/.gitignore +0 -19
  62. data/docs/.nojekyll +0 -0
  63. data/docs/babel.config.js +0 -3
  64. data/docs/blog/2022-03-27-ransack-3.0.0.md +0 -20
  65. data/docs/docs/getting-started/_category_.json +0 -4
  66. data/docs/docs/getting-started/advanced-mode.md +0 -46
  67. data/docs/docs/getting-started/configuration.md +0 -47
  68. data/docs/docs/getting-started/search-matches.md +0 -67
  69. data/docs/docs/getting-started/simple-mode.md +0 -288
  70. data/docs/docs/getting-started/sorting.md +0 -71
  71. data/docs/docs/getting-started/using-predicates.md +0 -282
  72. data/docs/docs/going-further/_category_.json +0 -4
  73. data/docs/docs/going-further/acts-as-taggable-on.md +0 -114
  74. data/docs/docs/going-further/associations.md +0 -70
  75. data/docs/docs/going-further/custom-predicates.md +0 -52
  76. data/docs/docs/going-further/documentation.md +0 -43
  77. data/docs/docs/going-further/exporting-to-csv.md +0 -49
  78. data/docs/docs/going-further/external-guides.md +0 -57
  79. data/docs/docs/going-further/form-customisation.md +0 -63
  80. data/docs/docs/going-further/i18n.md +0 -53
  81. data/docs/docs/going-further/img/create_release.png +0 -0
  82. data/docs/docs/going-further/merging-searches.md +0 -41
  83. data/docs/docs/going-further/other-notes.md +0 -428
  84. data/docs/docs/going-further/polymorphic-search.md +0 -46
  85. data/docs/docs/going-further/ransackers.md +0 -331
  86. data/docs/docs/going-further/release_process.md +0 -36
  87. data/docs/docs/going-further/saving-queries.md +0 -82
  88. data/docs/docs/going-further/searching-postgres.md +0 -57
  89. data/docs/docs/going-further/wiki-contributors.md +0 -82
  90. data/docs/docs/intro.md +0 -99
  91. data/docs/docusaurus.config.js +0 -120
  92. data/docs/package.json +0 -42
  93. data/docs/sidebars.js +0 -31
  94. data/docs/src/components/HomepageFeatures/index.js +0 -64
  95. data/docs/src/components/HomepageFeatures/styles.module.css +0 -11
  96. data/docs/src/css/custom.css +0 -39
  97. data/docs/src/pages/index.module.css +0 -23
  98. data/docs/src/pages/markdown-page.md +0 -7
  99. data/docs/static/.nojekyll +0 -0
  100. data/docs/static/img/docusaurus.png +0 -0
  101. data/docs/static/img/favicon.ico +0 -0
  102. data/docs/static/img/logo.svg +0 -1
  103. data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
  104. data/docs/static/img/tutorial/localeDropdown.png +0 -0
  105. data/docs/static/img/undraw_docusaurus_mountain.svg +0 -171
  106. data/docs/static/img/undraw_docusaurus_react.svg +0 -170
  107. data/docs/static/img/undraw_docusaurus_tree.svg +0 -40
  108. data/docs/static/logo/ransack-h.png +0 -0
  109. data/docs/static/logo/ransack-h.svg +0 -34
  110. data/docs/static/logo/ransack-v.png +0 -0
  111. data/docs/static/logo/ransack-v.svg +0 -34
  112. data/docs/static/logo/ransack.png +0 -0
  113. data/docs/static/logo/ransack.svg +0 -21
  114. data/docs/yarn.lock +0 -8879
  115. data/ransack.gemspec +0 -26
  116. data/spec/blueprints/articles.rb +0 -5
  117. data/spec/blueprints/comments.rb +0 -5
  118. data/spec/blueprints/notes.rb +0 -5
  119. data/spec/blueprints/people.rb +0 -8
  120. data/spec/blueprints/tags.rb +0 -3
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.1.1
4
+ version: 4.4.1
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: 2023-10-29 00:00:00.000000000 Z
14
+ date: 2025-09-29 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: 6.1.5
22
+ version: '7.2'
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: 6.1.5
29
+ version: '7.2'
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: 6.1.5
36
+ version: '7.2'
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: 6.1.5
43
+ version: '7.2'
45
44
  - !ruby/object:Gem::Dependency
46
45
  name: i18n
47
46
  requirement: !ruby/object:Gem::Requirement
@@ -56,91 +55,22 @@ dependencies:
56
55
  - - ">="
57
56
  - !ruby/object:Gem::Version
58
57
  version: '0'
59
- description: Ransack is the successor to the MetaSearch gem. It improves and expands
60
- upon MetaSearch's functionality, but does not have a 100%-compatible API.
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
- - sfcarroll@gmail.com
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
73
+ - lib/polyamorous/activerecord/join_association_7_2.rb
144
74
  - lib/polyamorous/activerecord/join_dependency.rb
145
75
  - lib/polyamorous/activerecord/reflection.rb
146
76
  - lib/polyamorous/join.rb
@@ -157,6 +87,7 @@ files:
157
87
  - lib/ransack/helpers.rb
158
88
  - lib/ransack/helpers/form_builder.rb
159
89
  - lib/ransack/helpers/form_helper.rb
90
+ - lib/ransack/invalid_search_error.rb
160
91
  - lib/ransack/locale/ar.yml
161
92
  - lib/ransack/locale/az.yml
162
93
  - lib/ransack/locale/bg.yml
@@ -174,6 +105,7 @@ files:
174
105
  - lib/ransack/locale/id.yml
175
106
  - lib/ransack/locale/it.yml
176
107
  - lib/ransack/locale/ja.yml
108
+ - lib/ransack/locale/ko.yml
177
109
  - lib/ransack/locale/nl.yml
178
110
  - lib/ransack/locale/pt-BR.yml
179
111
  - lib/ransack/locale/ro.yml
@@ -181,6 +113,7 @@ files:
181
113
  - lib/ransack/locale/sk.yml
182
114
  - lib/ransack/locale/sv.yml
183
115
  - lib/ransack/locale/tr.yml
116
+ - lib/ransack/locale/uk.yml
184
117
  - lib/ransack/locale/zh-CN.yml
185
118
  - lib/ransack/locale/zh-TW.yml
186
119
  - lib/ransack/naming.rb
@@ -197,13 +130,12 @@ files:
197
130
  - lib/ransack/translate.rb
198
131
  - lib/ransack/version.rb
199
132
  - lib/ransack/visitor.rb
200
- - ransack.gemspec
201
- - spec/blueprints/articles.rb
202
- - spec/blueprints/comments.rb
203
- - spec/blueprints/notes.rb
204
- - spec/blueprints/people.rb
205
- - spec/blueprints/tags.rb
206
133
  - spec/console.rb
134
+ - spec/factories/articles.rb
135
+ - spec/factories/comments.rb
136
+ - spec/factories/notes.rb
137
+ - spec/factories/people.rb
138
+ - spec/factories/tags.rb
207
139
  - spec/helpers/polyamorous_helper.rb
208
140
  - spec/helpers/ransack_helper.rb
209
141
  - spec/polyamorous/activerecord_compatibility_spec.rb
@@ -215,10 +147,12 @@ files:
215
147
  - spec/ransack/configuration_spec.rb
216
148
  - spec/ransack/helpers/form_builder_spec.rb
217
149
  - spec/ransack/helpers/form_helper_spec.rb
150
+ - spec/ransack/invalid_search_error_spec.rb
218
151
  - spec/ransack/nodes/condition_spec.rb
219
152
  - spec/ransack/nodes/grouping_spec.rb
220
153
  - spec/ransack/nodes/value_spec.rb
221
154
  - spec/ransack/predicate_spec.rb
155
+ - spec/ransack/ransacker_spec.rb
222
156
  - spec/ransack/search_spec.rb
223
157
  - spec/ransack/translate_spec.rb
224
158
  - spec/spec_helper.rb
@@ -227,8 +161,8 @@ files:
227
161
  homepage: https://github.com/activerecord-hackery/ransack
228
162
  licenses:
229
163
  - MIT
230
- metadata: {}
231
- post_install_message:
164
+ metadata:
165
+ changelog_uri: https://github.com/activerecord-hackery/ransack/blob/main/CHANGELOG.md
232
166
  rdoc_options: []
233
167
  require_paths:
234
168
  - lib
@@ -236,24 +170,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
170
  requirements:
237
171
  - - ">="
238
172
  - !ruby/object:Gem::Version
239
- version: '3.0'
173
+ version: '3.1'
240
174
  required_rubygems_version: !ruby/object:Gem::Requirement
241
175
  requirements:
242
176
  - - ">="
243
177
  - !ruby/object:Gem::Version
244
178
  version: '0'
245
179
  requirements: []
246
- rubygems_version: 3.4.10
247
- signing_key:
180
+ rubygems_version: 3.6.2
248
181
  specification_version: 4
249
182
  summary: Object-based searching for Active Record.
250
183
  test_files:
251
- - spec/blueprints/articles.rb
252
- - spec/blueprints/comments.rb
253
- - spec/blueprints/notes.rb
254
- - spec/blueprints/people.rb
255
- - spec/blueprints/tags.rb
256
184
  - spec/console.rb
185
+ - spec/factories/articles.rb
186
+ - spec/factories/comments.rb
187
+ - spec/factories/notes.rb
188
+ - spec/factories/people.rb
189
+ - spec/factories/tags.rb
257
190
  - spec/helpers/polyamorous_helper.rb
258
191
  - spec/helpers/ransack_helper.rb
259
192
  - spec/polyamorous/activerecord_compatibility_spec.rb
@@ -265,10 +198,12 @@ test_files:
265
198
  - spec/ransack/configuration_spec.rb
266
199
  - spec/ransack/helpers/form_builder_spec.rb
267
200
  - spec/ransack/helpers/form_helper_spec.rb
201
+ - spec/ransack/invalid_search_error_spec.rb
268
202
  - spec/ransack/nodes/condition_spec.rb
269
203
  - spec/ransack/nodes/grouping_spec.rb
270
204
  - spec/ransack/nodes/value_spec.rb
271
205
  - spec/ransack/predicate_spec.rb
206
+ - spec/ransack/ransacker_spec.rb
272
207
  - spec/ransack/search_spec.rb
273
208
  - spec/ransack/translate_spec.rb
274
209
  - spec/spec_helper.rb
data/.github/FUNDING.yml DELETED
@@ -1,3 +0,0 @@
1
- ---
2
-
3
- tidelift: rubygems/ransack
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
@@ -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
- - v7.1.0
17
- - v7.0.3
18
- - v6.1.6
19
- ruby:
20
- - 3.2.2
21
- - 3.1.4
22
- - 3.0.6
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
- - v7.1.0
43
- - v7.0.3
44
- - v6.1.6
45
- ruby:
46
- - 3.2.2
47
- - 3.1.4
48
- - 3.0.6
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
- - v7.1.0
78
- - v7.0.3
79
- - v6.1.6
80
- ruby:
81
- - 3.2.2
82
- - 3.1.4
83
- - 3.0.6
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
@@ -1,7 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
5
- coverage/*
6
- .DS_Store
7
- .byebug_history
data/.nojekyll DELETED
File without changes