chewy 8.0.0 → 8.0.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 (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +29 -1
  4. data/lib/chewy/index/witchcraft.rb +19 -4
  5. data/lib/chewy/version.rb +1 -1
  6. metadata +7 -131
  7. data/.github/CODEOWNERS +0 -1
  8. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -39
  9. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  10. data/.github/PULL_REQUEST_TEMPLATE.md +0 -16
  11. data/.github/dependabot.yml +0 -42
  12. data/.github/workflows/ruby.yml +0 -61
  13. data/.gitignore +0 -22
  14. data/.rspec +0 -2
  15. data/.rubocop.yml +0 -64
  16. data/.rubocop_todo.yml +0 -225
  17. data/.yardopts +0 -5
  18. data/CODE_OF_CONDUCT.md +0 -14
  19. data/CONTRIBUTING.md +0 -63
  20. data/Gemfile +0 -22
  21. data/Guardfile +0 -25
  22. data/Rakefile +0 -17
  23. data/chewy.gemspec +0 -24
  24. data/docker-compose.yml +0 -14
  25. data/docs/README.md +0 -16
  26. data/docs/configuration.md +0 -440
  27. data/docs/import.md +0 -122
  28. data/docs/indexing.md +0 -329
  29. data/docs/querying.md +0 -72
  30. data/docs/rake_tasks.md +0 -108
  31. data/docs/testing.md +0 -41
  32. data/docs/troubleshooting.md +0 -101
  33. data/filters +0 -78
  34. data/gemfiles/base.gemfile +0 -12
  35. data/gemfiles/rails.7.2.activerecord.gemfile +0 -14
  36. data/gemfiles/rails.8.0.activerecord.gemfile +0 -14
  37. data/migration_guide.md +0 -56
  38. data/spec/chewy/config_spec.rb +0 -110
  39. data/spec/chewy/elastic_client_spec.rb +0 -26
  40. data/spec/chewy/fields/base_spec.rb +0 -700
  41. data/spec/chewy/fields/root_spec.rb +0 -142
  42. data/spec/chewy/fields/time_fields_spec.rb +0 -28
  43. data/spec/chewy/index/actions_spec.rb +0 -851
  44. data/spec/chewy/index/adapter/active_record_spec.rb +0 -663
  45. data/spec/chewy/index/adapter/object_spec.rb +0 -243
  46. data/spec/chewy/index/aliases_spec.rb +0 -49
  47. data/spec/chewy/index/import/bulk_builder_spec.rb +0 -494
  48. data/spec/chewy/index/import/bulk_request_spec.rb +0 -95
  49. data/spec/chewy/index/import/journal_builder_spec.rb +0 -87
  50. data/spec/chewy/index/import/routine_spec.rb +0 -110
  51. data/spec/chewy/index/import_spec.rb +0 -615
  52. data/spec/chewy/index/mapping_spec.rb +0 -135
  53. data/spec/chewy/index/observe/active_record_methods_spec.rb +0 -68
  54. data/spec/chewy/index/observe/callback_spec.rb +0 -139
  55. data/spec/chewy/index/observe_spec.rb +0 -143
  56. data/spec/chewy/index/settings_spec.rb +0 -136
  57. data/spec/chewy/index/specification_spec.rb +0 -156
  58. data/spec/chewy/index/syncer_spec.rb +0 -118
  59. data/spec/chewy/index/witchcraft_spec.rb +0 -245
  60. data/spec/chewy/index/wrapper_spec.rb +0 -100
  61. data/spec/chewy/index_spec.rb +0 -269
  62. data/spec/chewy/journal_spec.rb +0 -223
  63. data/spec/chewy/minitest/helpers_spec.rb +0 -194
  64. data/spec/chewy/minitest/search_index_receiver_spec.rb +0 -120
  65. data/spec/chewy/multi_search_spec.rb +0 -84
  66. data/spec/chewy/rake_helper_spec.rb +0 -656
  67. data/spec/chewy/repository_spec.rb +0 -50
  68. data/spec/chewy/rspec/build_query_spec.rb +0 -34
  69. data/spec/chewy/rspec/helpers_spec.rb +0 -61
  70. data/spec/chewy/rspec/update_index_spec.rb +0 -313
  71. data/spec/chewy/runtime/version_spec.rb +0 -48
  72. data/spec/chewy/runtime_spec.rb +0 -9
  73. data/spec/chewy/search/loader_spec.rb +0 -83
  74. data/spec/chewy/search/pagination/kaminari_examples.rb +0 -69
  75. data/spec/chewy/search/pagination/kaminari_spec.rb +0 -21
  76. data/spec/chewy/search/parameters/aggs_spec.rb +0 -5
  77. data/spec/chewy/search/parameters/bool_storage_examples.rb +0 -53
  78. data/spec/chewy/search/parameters/collapse_spec.rb +0 -5
  79. data/spec/chewy/search/parameters/docvalue_fields_spec.rb +0 -5
  80. data/spec/chewy/search/parameters/explain_spec.rb +0 -5
  81. data/spec/chewy/search/parameters/filter_spec.rb +0 -5
  82. data/spec/chewy/search/parameters/hash_storage_examples.rb +0 -59
  83. data/spec/chewy/search/parameters/highlight_spec.rb +0 -5
  84. data/spec/chewy/search/parameters/ignore_unavailable_spec.rb +0 -67
  85. data/spec/chewy/search/parameters/indices_spec.rb +0 -99
  86. data/spec/chewy/search/parameters/integer_storage_examples.rb +0 -32
  87. data/spec/chewy/search/parameters/knn_spec.rb +0 -5
  88. data/spec/chewy/search/parameters/limit_spec.rb +0 -5
  89. data/spec/chewy/search/parameters/load_spec.rb +0 -60
  90. data/spec/chewy/search/parameters/min_score_spec.rb +0 -32
  91. data/spec/chewy/search/parameters/none_spec.rb +0 -5
  92. data/spec/chewy/search/parameters/offset_spec.rb +0 -5
  93. data/spec/chewy/search/parameters/order_spec.rb +0 -72
  94. data/spec/chewy/search/parameters/post_filter_spec.rb +0 -5
  95. data/spec/chewy/search/parameters/preference_spec.rb +0 -5
  96. data/spec/chewy/search/parameters/profile_spec.rb +0 -5
  97. data/spec/chewy/search/parameters/query_spec.rb +0 -5
  98. data/spec/chewy/search/parameters/query_storage_examples.rb +0 -434
  99. data/spec/chewy/search/parameters/request_cache_spec.rb +0 -67
  100. data/spec/chewy/search/parameters/rescore_spec.rb +0 -62
  101. data/spec/chewy/search/parameters/script_fields_spec.rb +0 -5
  102. data/spec/chewy/search/parameters/search_after_spec.rb +0 -35
  103. data/spec/chewy/search/parameters/search_type_spec.rb +0 -5
  104. data/spec/chewy/search/parameters/source_spec.rb +0 -162
  105. data/spec/chewy/search/parameters/storage_spec.rb +0 -60
  106. data/spec/chewy/search/parameters/stored_fields_spec.rb +0 -126
  107. data/spec/chewy/search/parameters/string_array_storage_examples.rb +0 -63
  108. data/spec/chewy/search/parameters/string_storage_examples.rb +0 -32
  109. data/spec/chewy/search/parameters/suggest_spec.rb +0 -5
  110. data/spec/chewy/search/parameters/terminate_after_spec.rb +0 -5
  111. data/spec/chewy/search/parameters/timeout_spec.rb +0 -5
  112. data/spec/chewy/search/parameters/track_scores_spec.rb +0 -5
  113. data/spec/chewy/search/parameters/track_total_hits_spec.rb +0 -5
  114. data/spec/chewy/search/parameters/version_spec.rb +0 -5
  115. data/spec/chewy/search/parameters_spec.rb +0 -161
  116. data/spec/chewy/search/query_proxy_spec.rb +0 -95
  117. data/spec/chewy/search/request_spec.rb +0 -886
  118. data/spec/chewy/search/response_spec.rb +0 -180
  119. data/spec/chewy/search/scrolling_spec.rb +0 -171
  120. data/spec/chewy/search_spec.rb +0 -127
  121. data/spec/chewy/stash_spec.rb +0 -85
  122. data/spec/chewy/strategy/active_job_spec.rb +0 -73
  123. data/spec/chewy/strategy/atomic_no_refresh_spec.rb +0 -60
  124. data/spec/chewy/strategy/atomic_spec.rb +0 -61
  125. data/spec/chewy/strategy/delayed_sidekiq_spec.rb +0 -225
  126. data/spec/chewy/strategy/lazy_sidekiq_spec.rb +0 -214
  127. data/spec/chewy/strategy/sidekiq_spec.rb +0 -52
  128. data/spec/chewy/strategy_spec.rb +0 -125
  129. data/spec/chewy_spec.rb +0 -100
  130. data/spec/spec_helper.rb +0 -69
  131. data/spec/support/active_record.rb +0 -124
  132. data/spec/support/class_helpers.rb +0 -16
  133. data/spec/support/fail_helpers.rb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5ed854e820d95af1d41232ffab69a142b8cb45591ba01f8b316349120ec49b5
4
- data.tar.gz: b2ea3e975b6fcc5af8e3a993e731e1bb5a1e64ffab9edb1b26687e91e4c05763
3
+ metadata.gz: 36ec23aabab2b6b62d9425ad6505f5589958400f21411c90d9808113336aac35
4
+ data.tar.gz: 0b082e6327fa4092477c7888714662f791a940b9a1045047ce7a183d41656f2c
5
5
  SHA512:
6
- metadata.gz: 92b482a9606d2e0e2dfcf8560d70679a1542f6e89012c012f7d46f4844dd568c04feca8a949b9c100444de73819d821edcb07cf9bbbb997a10f8cbcf93b033eb
7
- data.tar.gz: c0595cbc913c89c295f653b124c545153f2775cdb64050bee435067020700093a69b137e132ec743feb4a5f477efd8c4a278eb3dce569c86f67cce1188c4e9da
6
+ metadata.gz: ad839b902eeb12a5f94547e21f0ed9b2d078be1869b0070be7698fd357edde8d6d759502301dd823eb53d8a3fa42bd6d5584cee53dd482df6c05d1b46e2d110a
7
+ data.tar.gz: 3fdef90ea2c73f41274556d5f001e7931bcbbb9b2bdd02df6204fbd75c5b8139ed2cbff00cd448922e8215d2f35f6f3695bd52505db2f30cd20968b54732c401
data/CHANGELOG.md CHANGED
@@ -1,10 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.0.1 (2026-03-12)
4
+
5
+ ### New Features
6
+
7
+ ### Changes
8
+
9
+ * [#1003](https://github.com/toptal/chewy/pull/1003): Ruby 4.0 support added [@mjankowski](https://github.com/mjankowski)
10
+
11
+ ### Bugs Fixed
12
+
3
13
  ## 8.0.0 (2026-02-25)
4
14
 
5
15
  ### New Features
6
16
 
7
17
  ### Changes
18
+ * [#977](https://github.com/toptal/chewy/pull/977): Fewer files on gem installation [@ericproulx](https://github.com/ericproulx).
8
19
 
9
20
  * **(Breaking)** Drop support for Ruby < 3.2 and Rails < 7.2. Chewy now requires Ruby ~> 3.2 and ActiveSupport >= 7.2. ([@bbatsov][])
10
21
 
data/README.md CHANGED
@@ -53,7 +53,7 @@ Chewy is compatible with MRI 3.2-3.4.
53
53
 
54
54
  | Chewy version | Elasticsearch version |
55
55
  | ------------- | ---------------------------------- |
56
- | 8.0.0 | 8.x |
56
+ | 8.0.x | 8.x |
57
57
  | 7.2.x | 7.x |
58
58
  | 7.1.x | 7.x |
59
59
  | 7.0.x | 6.8, 7.x |
@@ -236,6 +236,7 @@ end
236
236
 
237
237
  ## Documentation
238
238
 
239
+ - [Getting Started](docs/getting_started.md) — end-to-end tutorial building search for a media library
239
240
  - [Configuration](docs/configuration.md) — client settings, update strategies, notifications, integrations
240
241
  - [Indexing](docs/indexing.md) — index definition, field types, crutches, witchcraft, index manipulation
241
242
  - [Import](docs/import.md) — import options, raw import, journaling
@@ -243,6 +244,33 @@ end
243
244
  - [Rake Tasks](docs/rake_tasks.md) — all rake tasks and parallelization
244
245
  - [Testing](docs/testing.md) — RSpec, Minitest, DatabaseCleaner
245
246
  - [Troubleshooting](docs/troubleshooting.md) — pre-request filter
247
+ - [Non-Rails Usage](docs/non_rails.md) — using Chewy without Rails
248
+
249
+ ## FAQ
250
+
251
+ **Can I use Chewy without Rails?**
252
+
253
+ Yes. ActiveSupport and the elasticsearch gem are the only hard dependencies; the Rails railtie loads conditionally. See the [Non-Rails Usage](docs/non_rails.md) guide.
254
+
255
+ **Does Chewy follow SemVer?**
256
+
257
+ No. The major version tracks the newest supported Elasticsearch version and minor version bumps may include breaking changes. Always check the [release notes](https://github.com/toptal/chewy/releases) before upgrading.
258
+
259
+ **Which versions of Ruby, Rails and Elasticsearch are supported?**
260
+
261
+ See the [Compatibility](#compatibility) section above. When a Ruby or Rails version reaches end-of-life we may drop support in a future release.
262
+
263
+ **What's the `UndefinedUpdateStrategy` error?**
264
+
265
+ Chewy raises this when you save a model with an `update_index` callback and no strategy is active. Wrap your code in `Chewy.strategy(:atomic) { ... }` or set `Chewy.root_strategy = :bypass`. See [Troubleshooting](docs/troubleshooting.md#undefinedupdatestrategy-error) for details.
266
+
267
+ **Can I use Chewy with OpenSearch?**
268
+
269
+ OpenSearch is not officially supported or tested. Chewy depends on the official `elasticsearch` Ruby client and targets Elasticsearch.
270
+
271
+ **How do I connect to Elastic Cloud?**
272
+
273
+ Use the standard client settings with your Cloud credentials (API key or user/password). See [Configuration](docs/configuration.md#client-settings) for examples.
246
274
 
247
275
  ## Contributing
248
276
 
@@ -1,6 +1,10 @@
1
1
  begin
2
2
  require 'method_source'
3
- require 'parser/current'
3
+ begin
4
+ require 'prism'
5
+ rescue LoadError
6
+ require 'parser/current'
7
+ end
4
8
  require 'unparser'
5
9
  rescue LoadError
6
10
  nil
@@ -24,7 +28,11 @@ module Chewy
24
28
  def check_requirements!
25
29
  messages = []
26
30
  messages << "MethodSource gem is required for the Witchcraft, please add `gem 'method_source'` to your Gemfile" unless Proc.method_defined?(:source)
27
- messages << "Parser gem is required for the Witchcraft, please add `gem 'parser'` to your Gemfile" unless '::Parser'.safe_constantize
31
+ if RUBY_VERSION >= '3.3'
32
+ messages << "Prism gem is required for the Witchcraft, please add `gem 'prism'` to your Gemfile" unless '::Prism'.safe_constantize
33
+ else
34
+ messages << "Parser gem is required for the Witchcraft, please add `gem 'parser'` to your Gemfile" unless '::Parser'.safe_constantize
35
+ end
28
36
  messages << "Unparser gem is required for the Witchcraft, please add `gem 'unparser'` to your Gemfile" unless '::Unparser'.safe_constantize
29
37
  messages = messages.join("\n")
30
38
 
@@ -164,8 +172,7 @@ module Chewy
164
172
  end
165
173
 
166
174
  def source_for(proc, nesting)
167
- ast = Parser::CurrentRuby.parse(proc.source)
168
- lambdas = exctract_lambdas(ast)
175
+ lambdas = exctract_lambdas(ast_from_proc(proc))
169
176
 
170
177
  raise "No lambdas found, try to reformat your code:\n`#{proc.source}`" unless lambdas
171
178
 
@@ -192,6 +199,14 @@ module Chewy
192
199
  Unparser.unparse(source)
193
200
  end
194
201
 
202
+ def ast_from_proc(proc)
203
+ if defined?(Prism)
204
+ Prism::Translation::ParserCurrent.parse(proc.source)
205
+ else
206
+ Parser::CurrentRuby.parse(proc.source)
207
+ end
208
+ end
209
+
195
210
  def exctract_lambdas(node)
196
211
  return unless node.is_a?(Parser::AST::Node)
197
212
 
data/lib/chewy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Chewy
2
- VERSION = '8.0.0'.freeze
2
+ VERSION = '8.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
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.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toptal, LLC
8
8
  - pyromaniac
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2026-02-25 00:00:00.000000000 Z
12
+ date: 2026-03-12 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activesupport
@@ -67,39 +68,9 @@ executables: []
67
68
  extensions: []
68
69
  extra_rdoc_files: []
69
70
  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
71
  - CHANGELOG.md
82
- - CODE_OF_CONDUCT.md
83
- - CONTRIBUTING.md
84
- - Gemfile
85
- - Guardfile
86
72
  - LICENSE.txt
87
73
  - 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
74
  - lib/chewy.rb
104
75
  - lib/chewy/config.rb
105
76
  - lib/chewy/elastic_client.rb
@@ -210,114 +181,18 @@ 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
313
187
  metadata:
314
188
  rubygems_mfa_required: 'true'
189
+ post_install_message:
315
190
  rdoc_options: []
316
191
  require_paths:
317
192
  - lib
318
193
  required_ruby_version: !ruby/object:Gem::Requirement
319
194
  requirements:
320
- - - "~>"
195
+ - - ">="
321
196
  - !ruby/object:Gem::Version
322
197
  version: '3.2'
323
198
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -326,7 +201,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
201
  - !ruby/object:Gem::Version
327
202
  version: '0'
328
203
  requirements: []
329
- rubygems_version: 3.6.2
204
+ rubygems_version: 3.4.19
205
+ signing_key:
330
206
  specification_version: 4
331
207
  summary: Elasticsearch ODM client wrapper
332
208
  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