chewy 8.0.0 → 8.1.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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/README.md +30 -16
  4. data/lib/chewy/errors.rb +3 -0
  5. data/lib/chewy/fields/root.rb +3 -3
  6. data/lib/chewy/index/crutch.rb +12 -2
  7. data/lib/chewy/index/import/bulk_builder.rb +4 -3
  8. data/lib/chewy/index/import/routine.rb +2 -1
  9. data/lib/chewy/index/import.rb +4 -4
  10. data/lib/chewy/index/witchcraft.rb +24 -8
  11. data/lib/chewy/multi_search.rb +1 -1
  12. data/lib/chewy/search/parameters/runtime_mappings.rb +14 -0
  13. data/lib/chewy/search/request.rb +18 -2
  14. data/lib/chewy/search/scrolling.rb +14 -6
  15. data/lib/chewy/stash.rb +10 -6
  16. data/lib/chewy/version.rb +1 -1
  17. metadata +5 -131
  18. data/.github/CODEOWNERS +0 -1
  19. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -39
  20. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  21. data/.github/PULL_REQUEST_TEMPLATE.md +0 -16
  22. data/.github/dependabot.yml +0 -42
  23. data/.github/workflows/ruby.yml +0 -61
  24. data/.gitignore +0 -22
  25. data/.rspec +0 -2
  26. data/.rubocop.yml +0 -64
  27. data/.rubocop_todo.yml +0 -225
  28. data/.yardopts +0 -5
  29. data/CODE_OF_CONDUCT.md +0 -14
  30. data/CONTRIBUTING.md +0 -63
  31. data/Gemfile +0 -22
  32. data/Guardfile +0 -25
  33. data/Rakefile +0 -17
  34. data/chewy.gemspec +0 -24
  35. data/docker-compose.yml +0 -14
  36. data/docs/README.md +0 -16
  37. data/docs/configuration.md +0 -440
  38. data/docs/import.md +0 -122
  39. data/docs/indexing.md +0 -329
  40. data/docs/querying.md +0 -72
  41. data/docs/rake_tasks.md +0 -108
  42. data/docs/testing.md +0 -41
  43. data/docs/troubleshooting.md +0 -101
  44. data/filters +0 -78
  45. data/gemfiles/base.gemfile +0 -12
  46. data/gemfiles/rails.7.2.activerecord.gemfile +0 -14
  47. data/gemfiles/rails.8.0.activerecord.gemfile +0 -14
  48. data/migration_guide.md +0 -56
  49. data/spec/chewy/config_spec.rb +0 -110
  50. data/spec/chewy/elastic_client_spec.rb +0 -26
  51. data/spec/chewy/fields/base_spec.rb +0 -700
  52. data/spec/chewy/fields/root_spec.rb +0 -142
  53. data/spec/chewy/fields/time_fields_spec.rb +0 -28
  54. data/spec/chewy/index/actions_spec.rb +0 -851
  55. data/spec/chewy/index/adapter/active_record_spec.rb +0 -663
  56. data/spec/chewy/index/adapter/object_spec.rb +0 -243
  57. data/spec/chewy/index/aliases_spec.rb +0 -49
  58. data/spec/chewy/index/import/bulk_builder_spec.rb +0 -494
  59. data/spec/chewy/index/import/bulk_request_spec.rb +0 -95
  60. data/spec/chewy/index/import/journal_builder_spec.rb +0 -87
  61. data/spec/chewy/index/import/routine_spec.rb +0 -110
  62. data/spec/chewy/index/import_spec.rb +0 -615
  63. data/spec/chewy/index/mapping_spec.rb +0 -135
  64. data/spec/chewy/index/observe/active_record_methods_spec.rb +0 -68
  65. data/spec/chewy/index/observe/callback_spec.rb +0 -139
  66. data/spec/chewy/index/observe_spec.rb +0 -143
  67. data/spec/chewy/index/settings_spec.rb +0 -136
  68. data/spec/chewy/index/specification_spec.rb +0 -156
  69. data/spec/chewy/index/syncer_spec.rb +0 -118
  70. data/spec/chewy/index/witchcraft_spec.rb +0 -245
  71. data/spec/chewy/index/wrapper_spec.rb +0 -100
  72. data/spec/chewy/index_spec.rb +0 -269
  73. data/spec/chewy/journal_spec.rb +0 -223
  74. data/spec/chewy/minitest/helpers_spec.rb +0 -194
  75. data/spec/chewy/minitest/search_index_receiver_spec.rb +0 -120
  76. data/spec/chewy/multi_search_spec.rb +0 -84
  77. data/spec/chewy/rake_helper_spec.rb +0 -656
  78. data/spec/chewy/repository_spec.rb +0 -50
  79. data/spec/chewy/rspec/build_query_spec.rb +0 -34
  80. data/spec/chewy/rspec/helpers_spec.rb +0 -61
  81. data/spec/chewy/rspec/update_index_spec.rb +0 -313
  82. data/spec/chewy/runtime/version_spec.rb +0 -48
  83. data/spec/chewy/runtime_spec.rb +0 -9
  84. data/spec/chewy/search/loader_spec.rb +0 -83
  85. data/spec/chewy/search/pagination/kaminari_examples.rb +0 -69
  86. data/spec/chewy/search/pagination/kaminari_spec.rb +0 -21
  87. data/spec/chewy/search/parameters/aggs_spec.rb +0 -5
  88. data/spec/chewy/search/parameters/bool_storage_examples.rb +0 -53
  89. data/spec/chewy/search/parameters/collapse_spec.rb +0 -5
  90. data/spec/chewy/search/parameters/docvalue_fields_spec.rb +0 -5
  91. data/spec/chewy/search/parameters/explain_spec.rb +0 -5
  92. data/spec/chewy/search/parameters/filter_spec.rb +0 -5
  93. data/spec/chewy/search/parameters/hash_storage_examples.rb +0 -59
  94. data/spec/chewy/search/parameters/highlight_spec.rb +0 -5
  95. data/spec/chewy/search/parameters/ignore_unavailable_spec.rb +0 -67
  96. data/spec/chewy/search/parameters/indices_spec.rb +0 -99
  97. data/spec/chewy/search/parameters/integer_storage_examples.rb +0 -32
  98. data/spec/chewy/search/parameters/knn_spec.rb +0 -5
  99. data/spec/chewy/search/parameters/limit_spec.rb +0 -5
  100. data/spec/chewy/search/parameters/load_spec.rb +0 -60
  101. data/spec/chewy/search/parameters/min_score_spec.rb +0 -32
  102. data/spec/chewy/search/parameters/none_spec.rb +0 -5
  103. data/spec/chewy/search/parameters/offset_spec.rb +0 -5
  104. data/spec/chewy/search/parameters/order_spec.rb +0 -72
  105. data/spec/chewy/search/parameters/post_filter_spec.rb +0 -5
  106. data/spec/chewy/search/parameters/preference_spec.rb +0 -5
  107. data/spec/chewy/search/parameters/profile_spec.rb +0 -5
  108. data/spec/chewy/search/parameters/query_spec.rb +0 -5
  109. data/spec/chewy/search/parameters/query_storage_examples.rb +0 -434
  110. data/spec/chewy/search/parameters/request_cache_spec.rb +0 -67
  111. data/spec/chewy/search/parameters/rescore_spec.rb +0 -62
  112. data/spec/chewy/search/parameters/script_fields_spec.rb +0 -5
  113. data/spec/chewy/search/parameters/search_after_spec.rb +0 -35
  114. data/spec/chewy/search/parameters/search_type_spec.rb +0 -5
  115. data/spec/chewy/search/parameters/source_spec.rb +0 -162
  116. data/spec/chewy/search/parameters/storage_spec.rb +0 -60
  117. data/spec/chewy/search/parameters/stored_fields_spec.rb +0 -126
  118. data/spec/chewy/search/parameters/string_array_storage_examples.rb +0 -63
  119. data/spec/chewy/search/parameters/string_storage_examples.rb +0 -32
  120. data/spec/chewy/search/parameters/suggest_spec.rb +0 -5
  121. data/spec/chewy/search/parameters/terminate_after_spec.rb +0 -5
  122. data/spec/chewy/search/parameters/timeout_spec.rb +0 -5
  123. data/spec/chewy/search/parameters/track_scores_spec.rb +0 -5
  124. data/spec/chewy/search/parameters/track_total_hits_spec.rb +0 -5
  125. data/spec/chewy/search/parameters/version_spec.rb +0 -5
  126. data/spec/chewy/search/parameters_spec.rb +0 -161
  127. data/spec/chewy/search/query_proxy_spec.rb +0 -95
  128. data/spec/chewy/search/request_spec.rb +0 -886
  129. data/spec/chewy/search/response_spec.rb +0 -180
  130. data/spec/chewy/search/scrolling_spec.rb +0 -171
  131. data/spec/chewy/search_spec.rb +0 -127
  132. data/spec/chewy/stash_spec.rb +0 -85
  133. data/spec/chewy/strategy/active_job_spec.rb +0 -73
  134. data/spec/chewy/strategy/atomic_no_refresh_spec.rb +0 -60
  135. data/spec/chewy/strategy/atomic_spec.rb +0 -61
  136. data/spec/chewy/strategy/delayed_sidekiq_spec.rb +0 -225
  137. data/spec/chewy/strategy/lazy_sidekiq_spec.rb +0 -214
  138. data/spec/chewy/strategy/sidekiq_spec.rb +0 -52
  139. data/spec/chewy/strategy_spec.rb +0 -125
  140. data/spec/chewy_spec.rb +0 -100
  141. data/spec/spec_helper.rb +0 -69
  142. data/spec/support/active_record.rb +0 -124
  143. data/spec/support/class_helpers.rb +0 -16
  144. data/spec/support/fail_helpers.rb +0 -13
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toptal, LLC
8
8
  - pyromaniac
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-25 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -67,39 +67,9 @@ executables: []
67
67
  extensions: []
68
68
  extra_rdoc_files: []
69
69
  files:
70
- - ".github/CODEOWNERS"
71
- - ".github/ISSUE_TEMPLATE/bug_report.md"
72
- - ".github/ISSUE_TEMPLATE/feature_request.md"
73
- - ".github/PULL_REQUEST_TEMPLATE.md"
74
- - ".github/dependabot.yml"
75
- - ".github/workflows/ruby.yml"
76
- - ".gitignore"
77
- - ".rspec"
78
- - ".rubocop.yml"
79
- - ".rubocop_todo.yml"
80
- - ".yardopts"
81
70
  - CHANGELOG.md
82
- - CODE_OF_CONDUCT.md
83
- - CONTRIBUTING.md
84
- - Gemfile
85
- - Guardfile
86
71
  - LICENSE.txt
87
72
  - README.md
88
- - Rakefile
89
- - chewy.gemspec
90
- - docker-compose.yml
91
- - docs/README.md
92
- - docs/configuration.md
93
- - docs/import.md
94
- - docs/indexing.md
95
- - docs/querying.md
96
- - docs/rake_tasks.md
97
- - docs/testing.md
98
- - docs/troubleshooting.md
99
- - filters
100
- - gemfiles/base.gemfile
101
- - gemfiles/rails.7.2.activerecord.gemfile
102
- - gemfiles/rails.8.0.activerecord.gemfile
103
73
  - lib/chewy.rb
104
74
  - lib/chewy/config.rb
105
75
  - lib/chewy/elastic_client.rb
@@ -176,6 +146,7 @@ files:
176
146
  - lib/chewy/search/parameters/query.rb
177
147
  - lib/chewy/search/parameters/request_cache.rb
178
148
  - lib/chewy/search/parameters/rescore.rb
149
+ - lib/chewy/search/parameters/runtime_mappings.rb
179
150
  - lib/chewy/search/parameters/script_fields.rb
180
151
  - lib/chewy/search/parameters/search_after.rb
181
152
  - lib/chewy/search/parameters/search_type.rb
@@ -210,103 +181,6 @@ files:
210
181
  - lib/generators/chewy/install_generator.rb
211
182
  - lib/generators/templates/chewy.yml
212
183
  - lib/tasks/chewy.rake
213
- - migration_guide.md
214
- - spec/chewy/config_spec.rb
215
- - spec/chewy/elastic_client_spec.rb
216
- - spec/chewy/fields/base_spec.rb
217
- - spec/chewy/fields/root_spec.rb
218
- - spec/chewy/fields/time_fields_spec.rb
219
- - spec/chewy/index/actions_spec.rb
220
- - spec/chewy/index/adapter/active_record_spec.rb
221
- - spec/chewy/index/adapter/object_spec.rb
222
- - spec/chewy/index/aliases_spec.rb
223
- - spec/chewy/index/import/bulk_builder_spec.rb
224
- - spec/chewy/index/import/bulk_request_spec.rb
225
- - spec/chewy/index/import/journal_builder_spec.rb
226
- - spec/chewy/index/import/routine_spec.rb
227
- - spec/chewy/index/import_spec.rb
228
- - spec/chewy/index/mapping_spec.rb
229
- - spec/chewy/index/observe/active_record_methods_spec.rb
230
- - spec/chewy/index/observe/callback_spec.rb
231
- - spec/chewy/index/observe_spec.rb
232
- - spec/chewy/index/settings_spec.rb
233
- - spec/chewy/index/specification_spec.rb
234
- - spec/chewy/index/syncer_spec.rb
235
- - spec/chewy/index/witchcraft_spec.rb
236
- - spec/chewy/index/wrapper_spec.rb
237
- - spec/chewy/index_spec.rb
238
- - spec/chewy/journal_spec.rb
239
- - spec/chewy/minitest/helpers_spec.rb
240
- - spec/chewy/minitest/search_index_receiver_spec.rb
241
- - spec/chewy/multi_search_spec.rb
242
- - spec/chewy/rake_helper_spec.rb
243
- - spec/chewy/repository_spec.rb
244
- - spec/chewy/rspec/build_query_spec.rb
245
- - spec/chewy/rspec/helpers_spec.rb
246
- - spec/chewy/rspec/update_index_spec.rb
247
- - spec/chewy/runtime/version_spec.rb
248
- - spec/chewy/runtime_spec.rb
249
- - spec/chewy/search/loader_spec.rb
250
- - spec/chewy/search/pagination/kaminari_examples.rb
251
- - spec/chewy/search/pagination/kaminari_spec.rb
252
- - spec/chewy/search/parameters/aggs_spec.rb
253
- - spec/chewy/search/parameters/bool_storage_examples.rb
254
- - spec/chewy/search/parameters/collapse_spec.rb
255
- - spec/chewy/search/parameters/docvalue_fields_spec.rb
256
- - spec/chewy/search/parameters/explain_spec.rb
257
- - spec/chewy/search/parameters/filter_spec.rb
258
- - spec/chewy/search/parameters/hash_storage_examples.rb
259
- - spec/chewy/search/parameters/highlight_spec.rb
260
- - spec/chewy/search/parameters/ignore_unavailable_spec.rb
261
- - spec/chewy/search/parameters/indices_spec.rb
262
- - spec/chewy/search/parameters/integer_storage_examples.rb
263
- - spec/chewy/search/parameters/knn_spec.rb
264
- - spec/chewy/search/parameters/limit_spec.rb
265
- - spec/chewy/search/parameters/load_spec.rb
266
- - spec/chewy/search/parameters/min_score_spec.rb
267
- - spec/chewy/search/parameters/none_spec.rb
268
- - spec/chewy/search/parameters/offset_spec.rb
269
- - spec/chewy/search/parameters/order_spec.rb
270
- - spec/chewy/search/parameters/post_filter_spec.rb
271
- - spec/chewy/search/parameters/preference_spec.rb
272
- - spec/chewy/search/parameters/profile_spec.rb
273
- - spec/chewy/search/parameters/query_spec.rb
274
- - spec/chewy/search/parameters/query_storage_examples.rb
275
- - spec/chewy/search/parameters/request_cache_spec.rb
276
- - spec/chewy/search/parameters/rescore_spec.rb
277
- - spec/chewy/search/parameters/script_fields_spec.rb
278
- - spec/chewy/search/parameters/search_after_spec.rb
279
- - spec/chewy/search/parameters/search_type_spec.rb
280
- - spec/chewy/search/parameters/source_spec.rb
281
- - spec/chewy/search/parameters/storage_spec.rb
282
- - spec/chewy/search/parameters/stored_fields_spec.rb
283
- - spec/chewy/search/parameters/string_array_storage_examples.rb
284
- - spec/chewy/search/parameters/string_storage_examples.rb
285
- - spec/chewy/search/parameters/suggest_spec.rb
286
- - spec/chewy/search/parameters/terminate_after_spec.rb
287
- - spec/chewy/search/parameters/timeout_spec.rb
288
- - spec/chewy/search/parameters/track_scores_spec.rb
289
- - spec/chewy/search/parameters/track_total_hits_spec.rb
290
- - spec/chewy/search/parameters/version_spec.rb
291
- - spec/chewy/search/parameters_spec.rb
292
- - spec/chewy/search/query_proxy_spec.rb
293
- - spec/chewy/search/request_spec.rb
294
- - spec/chewy/search/response_spec.rb
295
- - spec/chewy/search/scrolling_spec.rb
296
- - spec/chewy/search_spec.rb
297
- - spec/chewy/stash_spec.rb
298
- - spec/chewy/strategy/active_job_spec.rb
299
- - spec/chewy/strategy/atomic_no_refresh_spec.rb
300
- - spec/chewy/strategy/atomic_spec.rb
301
- - spec/chewy/strategy/delayed_sidekiq_spec.rb
302
- - spec/chewy/strategy/lazy_sidekiq_spec.rb
303
- - spec/chewy/strategy/sidekiq_spec.rb
304
- - spec/chewy/strategy_spec.rb
305
- - spec/chewy_spec.rb
306
- - spec/spec_helper.rb
307
- - spec/support/active_record.rb
308
- - spec/support/class_helpers.rb
309
- - spec/support/fail_helpers.rb
310
184
  homepage: https://github.com/toptal/chewy
311
185
  licenses:
312
186
  - MIT
@@ -317,7 +191,7 @@ require_paths:
317
191
  - lib
318
192
  required_ruby_version: !ruby/object:Gem::Requirement
319
193
  requirements:
320
- - - "~>"
194
+ - - ">="
321
195
  - !ruby/object:Gem::Version
322
196
  version: '3.2'
323
197
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -326,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
200
  - !ruby/object:Gem::Version
327
201
  version: '0'
328
202
  requirements: []
329
- rubygems_version: 3.6.2
203
+ rubygems_version: 4.0.12
330
204
  specification_version: 4
331
205
  summary: Elasticsearch ODM client wrapper
332
206
  test_files: []
data/.github/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @toptal/platform-foundation
@@ -1,39 +0,0 @@
1
- ---
2
- name: Bug Report
3
- about: Report an issue with Chewy you've discovered.
4
- ---
5
-
6
- *Be clear, concise and precise in your description of the problem.
7
- Open an issue with a descriptive title and a summary in grammatically correct,
8
- complete sentences.*
9
-
10
- *Use the template below when reporting bugs. Please, make sure that
11
- you're running the latest stable Chewy and that the problem you're reporting
12
- hasn't been reported (and potentially fixed) already.*
13
-
14
- *Before filing the ticket you should replace all text above the horizontal
15
- rule with your own words.*
16
-
17
- --------
18
-
19
- ## Expected behavior
20
-
21
- Describe here how you expected Chewy to behave in this particular situation.
22
-
23
- ## Actual behavior
24
-
25
- Describe here what actually happened.
26
-
27
- ## Steps to reproduce the problem
28
-
29
- This is extremely important! Providing us with a reliable way to reproduce
30
- a problem will expedite its solution.
31
-
32
- ## Version Information
33
-
34
- Share here essential version information such as:
35
-
36
- * Chewy version
37
- * Elasticsearch version
38
- * Ruby version
39
- * Rails version
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature Request
3
- about: Suggest new Chewy features or improvements to existing features.
4
- ---
5
-
6
- ## Is your feature request related to a problem? Please describe.
7
-
8
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
-
10
- ## Describe the solution you'd like
11
-
12
- A clear and concise description of what you want to happen.
13
-
14
- ## Describe alternatives you've considered
15
-
16
- A clear and concise description of any alternative solutions or features you've considered.
17
-
18
- ## Additional context
19
-
20
- Add any other context or screenshots about the feature request here.
@@ -1,16 +0,0 @@
1
- **Replace this text with a summary of the changes in your PR.
2
- The more detailed you are, the better.**
3
-
4
- -----------------
5
-
6
- Before submitting the PR make sure the following are checked:
7
-
8
- * [ ] The PR relates to *only* one subject with a clear title and description in grammatically correct, complete sentences.
9
- * [ ] Wrote [good commit messages][1].
10
- * [ ] Commit message starts with `[Fix #issue-number]` (if the related issue exists).
11
- * [ ] Feature branch is up-to-date with `master` (if not - rebase it).
12
- * [ ] Squashed related commits together.
13
- * [ ] Added tests.
14
- * [ ] Added an entry to the changelog if the new code introduces user-observable changes. See [changelog entry format](https://github.com/toptal/chewy/blob/master/CONTRIBUTING.md#changelog-entry-format) for details.
15
-
16
- [1]: https://chris.beams.io/posts/git-commit/
@@ -1,42 +0,0 @@
1
- version: 2
2
- registries:
3
- toptal-github:
4
- type: "git"
5
- url: "https://github.com"
6
- username: "x-access-token"
7
- password: "${{secrets.DEPENDABOT_GITHUB_TOKEN}}"
8
-
9
- updates:
10
- - package-ecosystem: bundler
11
- directory: "/"
12
- schedule:
13
- interval: "weekly"
14
- day: "wednesday"
15
- time: "07:00"
16
- pull-request-branch-name:
17
- separator: "-"
18
- labels:
19
- - "no-jira"
20
- - "ruby"
21
- - "dependencies"
22
- reviewers:
23
- - "toptal/sre"
24
- registries:
25
- - toptal-github
26
- insecure-external-code-execution: allow
27
- open-pull-requests-limit: 3
28
- - package-ecosystem: "github-actions"
29
- directory: "/"
30
- schedule:
31
- interval: "weekly"
32
- day: "wednesday"
33
- time: "07:00"
34
- pull-request-branch-name:
35
- separator: "-"
36
- labels:
37
- - "no-jira"
38
- - "dependencies"
39
- - "gha"
40
- reviewers:
41
- - "toptal/sre"
42
- open-pull-requests-limit: 3
@@ -1,61 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- workflow_dispatch:
7
- pull_request:
8
- types: [
9
- synchronize, # PR was updated
10
- opened, # PR was open
11
- reopened # PR was reopened
12
- ]
13
-
14
- jobs:
15
- ruby-3:
16
- runs-on: ubuntu-latest
17
- strategy:
18
- fail-fast: false
19
- matrix:
20
- ruby: [ '3.2', '3.3', '3.4' ]
21
- gemfile: [rails.7.2.activerecord, rails.8.0.activerecord]
22
- name: ${{ matrix.ruby }}-${{ matrix.gemfile }}
23
-
24
- env:
25
- BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
26
-
27
- services:
28
- redis:
29
- # Docker Hub image
30
- image: redis
31
- ports:
32
- - '6379:6379'
33
- # Set health checks to wait until redis has started
34
- options: >-
35
- --health-cmd "redis-cli ping"
36
- --health-interval 10s
37
- --health-timeout 5s
38
- --health-retries 5
39
- steps:
40
- - uses: actions/checkout@v6
41
- - uses: ruby/setup-ruby@v1
42
- with:
43
- ruby-version: ${{ matrix.ruby }}
44
- bundler-cache: true
45
- - name: Start containers
46
- run: |
47
- docker compose up elasticsearch_test -d
48
- sleep 15
49
-
50
- - name: Tests
51
- run: bundle exec rspec
52
-
53
- rubocop:
54
- runs-on: ubuntu-latest
55
- steps:
56
- - uses: actions/checkout@v6
57
- - uses: ruby/setup-ruby@v1
58
- with:
59
- ruby-version: 3.4
60
- bundler-cache: true
61
- - run: bundle exec rubocop --format simple
data/.gitignore DELETED
@@ -1,22 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- gemfiles/*.lock
8
- InstalledFiles
9
- _yardoc
10
- coverage
11
- doc/
12
- lib/bundler/man
13
- pkg
14
- rdoc
15
- spec/reports
16
- test/tmp
17
- test/version_tmp
18
- tmp
19
- .rvmrc
20
- _site
21
- .sass-cache
22
- file::memory:?cache=shared
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --backtrace
data/.rubocop.yml DELETED
@@ -1,64 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- NewCops: enable
5
- TargetRubyVersion: 3.2
6
-
7
- Layout/AccessModifierIndentation:
8
- EnforcedStyle: outdent
9
-
10
- Layout/HashAlignment:
11
- EnforcedLastArgumentHashStyle: always_ignore
12
-
13
- Layout/ParameterAlignment:
14
- EnforcedStyle: with_fixed_indentation
15
-
16
- Layout/CaseIndentation:
17
- EnforcedStyle: end
18
-
19
- Layout/EndAlignment:
20
- EnforcedStyleAlignWith: variable
21
-
22
- Layout/FirstArrayElementIndentation:
23
- EnforcedStyle: consistent
24
-
25
- Layout/FirstHashElementIndentation:
26
- EnforcedStyle: consistent
27
-
28
- Layout/HeredocIndentation:
29
- Enabled: false
30
-
31
- Layout/MultilineMethodCallIndentation:
32
- EnforcedStyle: indented
33
-
34
- Layout/MultilineOperationIndentation:
35
- EnforcedStyle: indented
36
-
37
- Layout/SpaceInsideHashLiteralBraces:
38
- EnforcedStyle: no_space
39
-
40
- Lint/AmbiguousBlockAssociation:
41
- Enabled: false
42
-
43
- Style/Alias:
44
- EnforcedStyle: prefer_alias_method
45
-
46
- Style/AndOr:
47
- EnforcedStyle: conditionals
48
-
49
- Style/DoubleNegation:
50
- Enabled: false
51
-
52
- Metrics/BlockLength:
53
- Exclude:
54
- - '**/*_spec.rb'
55
- - '**/*_examples.rb'
56
- - '**/*.rake'
57
-
58
- Metrics/ModuleLength:
59
- Exclude:
60
- - 'lib/chewy/rake_helper.rb'
61
- - '**/*_spec.rb'
62
-
63
- Style/ArgumentsForwarding:
64
- Enabled: false
data/.rubocop_todo.yml DELETED
@@ -1,225 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2026-02-25 10:21:58 UTC using RuboCop version 1.84.2.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 5
10
- # This cop supports safe autocorrection (--autocorrect).
11
- Layout/EmptyLinesAfterModuleInclusion:
12
- Exclude:
13
- - 'lib/chewy/rspec/helpers.rb'
14
- - 'lib/chewy/runtime/version.rb'
15
- - 'lib/chewy/search/parameters/limit.rb'
16
- - 'lib/chewy/search/parameters/offset.rb'
17
- - 'lib/chewy/search/request.rb'
18
-
19
- # Offense count: 1
20
- # This cop supports safe autocorrection (--autocorrect).
21
- # Configuration parameters: EnforcedStyle, IndentationWidth.
22
- # SupportedStyles: aligned, indented, indented_relative_to_receiver
23
- Layout/MultilineMethodCallIndentation:
24
- Exclude:
25
- - 'spec/chewy/rake_helper_spec.rb'
26
-
27
- # Offense count: 1
28
- # This cop supports safe autocorrection (--autocorrect).
29
- # Configuration parameters: EnforcedStyle.
30
- # SupportedStyles: final_newline, final_blank_line
31
- Layout/TrailingEmptyLines:
32
- Exclude:
33
- - 'gemfiles/rails.8.0.activerecord.gemfile'
34
-
35
- # Offense count: 2
36
- # Configuration parameters: AllowedMethods.
37
- # AllowedMethods: enums
38
- Lint/ConstantDefinitionInBlock:
39
- Exclude:
40
- - 'lib/chewy/rspec/update_index.rb'
41
- - 'spec/chewy/config_spec.rb'
42
-
43
- # Offense count: 11
44
- # Configuration parameters: AllowComments, AllowEmptyLambdas.
45
- Lint/EmptyBlock:
46
- Exclude:
47
- - 'spec/chewy/index/import/bulk_request_spec.rb'
48
- - 'spec/chewy/index/witchcraft_spec.rb'
49
- - 'spec/chewy/minitest/helpers_spec.rb'
50
- - 'spec/chewy/rspec/update_index_spec.rb'
51
- - 'spec/chewy/search/scrolling_spec.rb'
52
- - 'spec/chewy/strategy/atomic_spec.rb'
53
- - 'spec/chewy/strategy_spec.rb'
54
-
55
- # Offense count: 3
56
- # Configuration parameters: AllowedParentClasses.
57
- Lint/MissingSuper:
58
- Exclude:
59
- - 'lib/chewy/index/adapter/object.rb'
60
- - 'lib/chewy/index/adapter/orm.rb'
61
- - 'lib/chewy/strategy/atomic.rb'
62
-
63
- # Offense count: 41
64
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
65
- Metrics/AbcSize:
66
- Max: 41
67
-
68
- # Offense count: 7
69
- # Configuration parameters: CountComments, CountAsOne.
70
- Metrics/ClassLength:
71
- Max: 267
72
-
73
- # Offense count: 15
74
- # Configuration parameters: AllowedMethods, AllowedPatterns.
75
- Metrics/CyclomaticComplexity:
76
- Max: 12
77
-
78
- # Offense count: 53
79
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
80
- Metrics/MethodLength:
81
- Max: 29
82
-
83
- # Offense count: 2
84
- # Configuration parameters: CountComments, CountAsOne.
85
- Metrics/ModuleLength:
86
- Max: 123
87
-
88
- # Offense count: 19
89
- # Configuration parameters: AllowedMethods, AllowedPatterns.
90
- Metrics/PerceivedComplexity:
91
- Max: 13
92
-
93
- # Offense count: 33
94
- # This cop supports safe autocorrection (--autocorrect).
95
- # Configuration parameters: EnforcedStyle, BlockForwardingName.
96
- # SupportedStyles: anonymous, explicit
97
- Naming/BlockForwarding:
98
- Exclude:
99
- - 'lib/chewy/elastic_client.rb'
100
- - 'lib/chewy/index.rb'
101
- - 'lib/chewy/index/adapter/base.rb'
102
- - 'lib/chewy/index/adapter/object.rb'
103
- - 'lib/chewy/index/adapter/orm.rb'
104
- - 'lib/chewy/index/mapping.rb'
105
- - 'lib/chewy/index/wrapper.rb'
106
- - 'lib/chewy/minitest/helpers.rb'
107
- - 'lib/chewy/search.rb'
108
- - 'spec/chewy/index/adapter/active_record_spec.rb'
109
- - 'spec/support/active_record.rb'
110
- - 'spec/support/class_helpers.rb'
111
-
112
- # Offense count: 10
113
- # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
114
- # AllowedMethods: call
115
- # WaywardPredicates: infinite?, nonzero?
116
- Naming/PredicateMethod:
117
- Exclude:
118
- - 'lib/chewy/index/adapter/object.rb'
119
- - 'lib/chewy/index/import.rb'
120
- - 'lib/chewy/index/import/routine.rb'
121
- - 'lib/chewy/index/observe.rb'
122
- - 'lib/chewy/index/syncer.rb'
123
- - 'lib/chewy/rspec/update_index.rb'
124
- - 'lib/chewy/search/parameters.rb'
125
- - 'lib/chewy/search/parameters/concerns/bool_storage.rb'
126
- - 'lib/chewy/search/request.rb'
127
-
128
- # Offense count: 11
129
- # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
130
- # SupportedStyles: snake_case, normalcase, non_integer
131
- # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
132
- Naming/VariableNumber:
133
- Exclude:
134
- - 'spec/chewy/fields/root_spec.rb'
135
-
136
- # Offense count: 3
137
- Style/DocumentDynamicEvalDefinition:
138
- Exclude:
139
- - 'lib/chewy/index/witchcraft.rb'
140
- - 'lib/chewy/repository.rb'
141
- - 'lib/chewy/search/pagination/kaminari.rb'
142
-
143
- # Offense count: 56
144
- # Configuration parameters: AllowedConstants.
145
- Style/Documentation:
146
- Enabled: false
147
-
148
- # Offense count: 2
149
- # This cop supports safe autocorrection (--autocorrect).
150
- Style/EvalWithLocation:
151
- Exclude:
152
- - 'spec/chewy/index_spec.rb'
153
-
154
- # Offense count: 4
155
- # This cop supports unsafe autocorrection (--autocorrect-all).
156
- Style/FileNull:
157
- Exclude:
158
- - 'spec/chewy/config_spec.rb'
159
- - 'spec/chewy/index/adapter/active_record_spec.rb'
160
- - 'spec/support/active_record.rb'
161
-
162
- # Offense count: 208
163
- # This cop supports unsafe autocorrection (--autocorrect-all).
164
- # Configuration parameters: EnforcedStyle.
165
- # SupportedStyles: always, always_true, never
166
- Style/FrozenStringLiteralComment:
167
- Enabled: false
168
-
169
- # Offense count: 2
170
- # This cop supports safe autocorrection (--autocorrect).
171
- # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
172
- Style/GuardClause:
173
- Exclude:
174
- - 'lib/chewy.rb'
175
- - 'spec/support/active_record.rb'
176
-
177
- # Offense count: 8
178
- # This cop supports safe autocorrection (--autocorrect).
179
- # Configuration parameters: EnforcedStyle.
180
- # SupportedStyles: braces, no_braces
181
- Style/HashAsLastArrayItem:
182
- Exclude:
183
- - 'lib/chewy/index/specification.rb'
184
- - 'spec/chewy/search/parameters/query_storage_examples.rb'
185
- - 'spec/chewy/search/request_spec.rb'
186
- - 'spec/chewy/stash_spec.rb'
187
-
188
- # Offense count: 1
189
- # This cop supports unsafe autocorrection (--autocorrect-all).
190
- Style/HashSlice:
191
- Exclude:
192
- - 'lib/chewy/search/parameters.rb'
193
-
194
- # Offense count: 7
195
- # This cop supports safe autocorrection (--autocorrect).
196
- Style/IfUnlessModifier:
197
- Exclude:
198
- - 'lib/chewy.rb'
199
- - 'lib/chewy/railtie.rb'
200
- - 'lib/chewy/rspec/update_index.rb'
201
- - 'lib/chewy/search/query_proxy.rb'
202
- - 'spec/support/active_record.rb'
203
-
204
- # Offense count: 5
205
- # This cop supports safe autocorrection (--autocorrect).
206
- Style/KeywordArgumentsMerging:
207
- Exclude:
208
- - 'lib/chewy/index/actions.rb'
209
- - 'lib/chewy/index/import/bulk_request.rb'
210
- - 'lib/chewy/index/mapping.rb'
211
- - 'lib/chewy/search/loader.rb'
212
-
213
- # Offense count: 5
214
- # This cop supports safe autocorrection (--autocorrect).
215
- Style/RedundantParentheses:
216
- Exclude:
217
- - 'lib/chewy/rake_helper.rb'
218
- - 'lib/chewy/rspec/update_index.rb'
219
-
220
- # Offense count: 120
221
- # This cop supports safe autocorrection (--autocorrect).
222
- # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
223
- # URISchemes: http, https
224
- Layout/LineLength:
225
- Max: 190
data/.yardopts DELETED
@@ -1,5 +0,0 @@
1
- --markup-provider=redcarpet
2
- --markup=markdown
3
- -
4
- README.md
5
- CHANGELOG.md