chewy 7.3.5 → 7.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +2 -28
  3. data/.rubocop.yml +1 -1
  4. data/CHANGELOG.md +20 -0
  5. data/Gemfile +4 -4
  6. data/README.md +1 -1
  7. data/chewy.gemspec +3 -17
  8. data/gemfiles/base.gemfile +12 -0
  9. data/gemfiles/rails.6.1.activerecord.gemfile +2 -1
  10. data/gemfiles/rails.7.0.activerecord.gemfile +2 -1
  11. data/gemfiles/rails.7.1.activerecord.gemfile +2 -1
  12. data/lib/chewy/config.rb +12 -10
  13. data/lib/chewy/fields/root.rb +1 -1
  14. data/lib/chewy/index/adapter/active_record.rb +1 -1
  15. data/lib/chewy/index/adapter/object.rb +3 -3
  16. data/lib/chewy/index/adapter/orm.rb +2 -2
  17. data/lib/chewy/index/import/bulk_builder.rb +2 -2
  18. data/lib/chewy/index/import.rb +2 -2
  19. data/lib/chewy/index/observe/active_record_methods.rb +1 -1
  20. data/lib/chewy/index/syncer.rb +1 -1
  21. data/lib/chewy/minitest/search_index_receiver.rb +3 -1
  22. data/lib/chewy/rake_helper.rb +3 -3
  23. data/lib/chewy/rspec/update_index.rb +3 -3
  24. data/lib/chewy/runtime/version.rb +1 -1
  25. data/lib/chewy/search/parameters/indices.rb +1 -1
  26. data/lib/chewy/search/parameters/knn.rb +16 -0
  27. data/lib/chewy/search/parameters/storage.rb +1 -1
  28. data/lib/chewy/search/parameters.rb +3 -3
  29. data/lib/chewy/search/request.rb +14 -3
  30. data/lib/chewy/search.rb +6 -4
  31. data/lib/chewy/version.rb +1 -1
  32. data/lib/chewy.rb +1 -1
  33. data/spec/chewy/index/actions_spec.rb +4 -4
  34. data/spec/chewy/index/import/bulk_builder_spec.rb +3 -3
  35. data/spec/chewy/index/import_spec.rb +3 -3
  36. data/spec/chewy/minitest/helpers_spec.rb +1 -1
  37. data/spec/chewy/minitest/search_index_receiver_spec.rb +6 -4
  38. data/spec/chewy/rake_helper_spec.rb +4 -4
  39. data/spec/chewy/rspec/helpers_spec.rb +1 -1
  40. data/spec/chewy/search/pagination/kaminari_examples.rb +1 -1
  41. data/spec/chewy/search/pagination/kaminari_spec.rb +1 -1
  42. data/spec/chewy/search/parameters/knn_spec.rb +5 -0
  43. data/spec/chewy/search/request_spec.rb +9 -7
  44. data/spec/chewy/strategy/active_job_spec.rb +8 -8
  45. data/spec/chewy/strategy/lazy_sidekiq_spec.rb +10 -10
  46. data/spec/chewy/strategy/sidekiq_spec.rb +4 -4
  47. data/spec/chewy_spec.rb +1 -1
  48. data/spec/spec_helper.rb +1 -1
  49. metadata +8 -268
  50. data/gemfiles/rails.5.2.activerecord.gemfile +0 -11
  51. data/gemfiles/rails.6.0.activerecord.gemfile +0 -11
@@ -10,7 +10,7 @@ describe :minitest_helper do
10
10
  expect(haystack).to include(needle)
11
11
  end
12
12
 
13
- include ::Chewy::Minitest::Helpers
13
+ include Chewy::Minitest::Helpers
14
14
 
15
15
  def assert_equal(expected, actual, message)
16
16
  raise message unless expected == actual
@@ -24,6 +24,8 @@ describe :search_index_receiver do
24
24
  SearchIndexReceiver.new
25
25
  end
26
26
 
27
+ let(:dummy_class) { Struct.new(:id) }
28
+
27
29
  before do
28
30
  stub_index(:dummies) do
29
31
  root value: ->(_o) { {} }
@@ -82,12 +84,12 @@ describe :search_index_receiver do
82
84
  end
83
85
 
84
86
  specify 'validates that an object was indexed' do
85
- dummy = OpenStruct.new(id: 1)
87
+ dummy = dummy_class.new(1)
86
88
  expect(receiver.indexed?(dummy, DummiesIndex)).to be(true)
87
89
  end
88
90
 
89
91
  specify 'doesn\'t validate than unindexed objects were indexed' do
90
- dummy = OpenStruct.new(id: 2)
92
+ dummy = dummy_class.new(2)
91
93
  expect(receiver.indexed?(dummy, DummiesIndex)).to be(false)
92
94
  end
93
95
  end
@@ -98,12 +100,12 @@ describe :search_index_receiver do
98
100
  end
99
101
 
100
102
  specify 'validates than an object was deleted' do
101
- dummy = OpenStruct.new(id: 1)
103
+ dummy = dummy_class.new(1)
102
104
  expect(receiver.deleted?(dummy, DummiesIndex)).to be(true)
103
105
  end
104
106
 
105
107
  specify 'doesn\'t validate than undeleted objects were deleted' do
106
- dummy = OpenStruct.new(id: 2)
108
+ dummy = dummy_class.new(2)
107
109
  expect(receiver.deleted?(dummy, DummiesIndex)).to be(false)
108
110
  end
109
111
  end
@@ -105,10 +105,10 @@ Total: \\d+s\\Z
105
105
  expect { described_class.reset(only: [CitiesIndex], output: output) }
106
106
  .to update_index(CitiesIndex)
107
107
  expect(output.string).to include(
108
- "############################################################\n"\
109
- "WARN: You are risking to lose some changes during the reset.\n" \
110
- " Please consider enabling journaling.\n" \
111
- ' See https://github.com/toptal/chewy#journaling'
108
+ "############################################################\n" \
109
+ "WARN: You are risking to lose some changes during the reset.\n " \
110
+ "Please consider enabling journaling.\n " \
111
+ 'See https://github.com/toptal/chewy#journaling'
112
112
  )
113
113
  end
114
114
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe :rspec_helper do
4
- include ::Chewy::Rspec::Helpers
4
+ include Chewy::Rspec::Helpers
5
5
 
6
6
  before do
7
7
  stub_model(:city)
@@ -24,7 +24,7 @@ shared_examples :kaminari do |request_base_class|
24
24
  let(:data) { Array.new(10) { |i| {id: i.next.to_s, name: "Name#{i.next}", age: 10 * i.next}.stringify_keys! } }
25
25
 
26
26
  before { ProductsIndex.import!(data.map { |h| double(h) }) }
27
- before { allow(::Kaminari.config).to receive_messages(default_per_page: 3) }
27
+ before { allow(Kaminari.config).to receive_messages(default_per_page: 3) }
28
28
 
29
29
  describe '#per, #page' do
30
30
  specify { expect(search.map { |e| e.attributes.except(*except_fields) }).to match_array(data) }
@@ -6,7 +6,7 @@ describe Chewy::Search::Pagination::Kaminari do
6
6
  let(:data) { Array.new(12) { |i| {id: i.next.to_s, name: "Name#{i.next}", age: 10 * i.next}.stringify_keys! } }
7
7
 
8
8
  before { ProductsIndex.import!(data.map { |h| double(h) }) }
9
- before { allow(::Kaminari.config).to receive_messages(default_per_page: 17) }
9
+ before { allow(Kaminari.config).to receive_messages(default_per_page: 17) }
10
10
 
11
11
  specify { expect(search.objects.class).to eq(Kaminari::PaginatableArray) }
12
12
  specify { expect(search.objects.total_count).to eq(12) }
@@ -0,0 +1,5 @@
1
+ require 'chewy/search/parameters/hash_storage_examples'
2
+
3
+ describe Chewy::Search::Parameters::Knn do
4
+ it_behaves_like :hash_storage, :knn
5
+ end
@@ -314,14 +314,16 @@ describe Chewy::Search::Request do
314
314
  end
315
315
  end
316
316
 
317
- describe '#collapse' do
318
- specify { expect(subject.collapse(foo: {bar: 42}).render[:body]).to include(collapse: {'foo' => {bar: 42}}) }
319
- specify do
320
- expect(subject.collapse(foo: {bar: 42}).collapse(moo: {baz: 43}).render[:body])
321
- .to include(collapse: {'moo' => {baz: 43}})
317
+ %i[collapse knn].each do |name|
318
+ describe "##{name}" do
319
+ specify { expect(subject.send(name, foo: {bar: 42}).render[:body]).to include(name => {'foo' => {bar: 42}}) }
320
+ specify do
321
+ expect(subject.send(name, foo: {bar: 42}).send(name, moo: {baz: 43}).render[:body])
322
+ .to include(name => {'moo' => {baz: 43}})
323
+ end
324
+ specify { expect(subject.send(name, foo: {bar: 42}).send(name, nil).render[:body]).to be_blank }
325
+ specify { expect { subject.send(name, foo: {bar: 42}) }.not_to change { subject.render } }
322
326
  end
323
- specify { expect(subject.collapse(foo: {bar: 42}).collapse(nil).render[:body]).to be_blank }
324
- specify { expect { subject.collapse(foo: {bar: 42}) }.not_to change { subject.render } }
325
327
  end
326
328
 
327
329
  describe '#docvalue_fields' do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- if defined?(::ActiveJob)
3
+ if defined?(ActiveJob)
4
4
  describe Chewy::Strategy::ActiveJob do
5
5
  around do |example|
6
6
  active_job_settings = Chewy.settings[:active_job]
@@ -9,12 +9,12 @@ if defined?(::ActiveJob)
9
9
  Chewy.settings[:active_job] = active_job_settings
10
10
  end
11
11
  before(:all) do
12
- ::ActiveJob::Base.logger = Chewy.logger
12
+ ActiveJob::Base.logger = Chewy.logger
13
13
  end
14
14
  before do
15
- ::ActiveJob::Base.queue_adapter = :test
16
- ::ActiveJob::Base.queue_adapter.enqueued_jobs.clear
17
- ::ActiveJob::Base.queue_adapter.performed_jobs.clear
15
+ ActiveJob::Base.queue_adapter = :test
16
+ ActiveJob::Base.queue_adapter.enqueued_jobs.clear
17
+ ActiveJob::Base.queue_adapter.performed_jobs.clear
18
18
  end
19
19
 
20
20
  before do
@@ -39,7 +39,7 @@ if defined?(::ActiveJob)
39
39
  Chewy.strategy(:active_job) do
40
40
  [city, other_city].map(&:save!)
41
41
  end
42
- enqueued_job = ::ActiveJob::Base.queue_adapter.enqueued_jobs.first
42
+ enqueued_job = ActiveJob::Base.queue_adapter.enqueued_jobs.first
43
43
  expect(enqueued_job[:job]).to eq(Chewy::Strategy::ActiveJob::Worker)
44
44
  expect(enqueued_job[:queue]).to eq('low')
45
45
  end
@@ -48,12 +48,12 @@ if defined?(::ActiveJob)
48
48
  Chewy.strategy(:active_job) do
49
49
  [city, other_city].map(&:save!)
50
50
  end
51
- enqueued_job = ::ActiveJob::Base.queue_adapter.enqueued_jobs.first
51
+ enqueued_job = ActiveJob::Base.queue_adapter.enqueued_jobs.first
52
52
  expect(enqueued_job[:queue]).to eq('low')
53
53
  end
54
54
 
55
55
  specify do
56
- ::ActiveJob::Base.queue_adapter = :inline
56
+ ActiveJob::Base.queue_adapter = :inline
57
57
  expect { [city, other_city].map(&:save!) }
58
58
  .to update_index(CitiesIndex, strategy: :active_job)
59
59
  .and_reindex(city, other_city).only
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- if defined?(::Sidekiq)
3
+ if defined?(Sidekiq)
4
4
  require 'sidekiq/testing'
5
5
 
6
6
  describe Chewy::Strategy::LazySidekiq do
@@ -10,7 +10,7 @@ if defined?(::Sidekiq)
10
10
  Chewy.strategy(:bypass) { example.run }
11
11
  Chewy.settings[:sidekiq] = sidekiq_settings
12
12
  end
13
- before { ::Sidekiq::Worker.clear_all }
13
+ before { Sidekiq::Worker.clear_all }
14
14
 
15
15
  context 'strategy' do
16
16
  before do
@@ -32,14 +32,14 @@ if defined?(::Sidekiq)
32
32
  end
33
33
 
34
34
  it 'updates indices asynchronously on record save' do
35
- expect(::Sidekiq::Client).to receive(:push)
35
+ expect(Sidekiq::Client).to receive(:push)
36
36
  .with(hash_including(
37
37
  'class' => Chewy::Strategy::LazySidekiq::IndicesUpdateWorker,
38
38
  'queue' => 'low'
39
39
  ))
40
40
  .and_call_original
41
41
  .once
42
- ::Sidekiq::Testing.inline! do
42
+ Sidekiq::Testing.inline! do
43
43
  expect { [city, other_city].map(&:save!) }
44
44
  .to update_index(CitiesIndex, strategy: :lazy_sidekiq)
45
45
  .and_reindex(city, other_city).only
@@ -47,12 +47,12 @@ if defined?(::Sidekiq)
47
47
  end
48
48
 
49
49
  it 'updates indices asynchronously with falling back to sidekiq strategy on record destroy' do
50
- expect(::Sidekiq::Client).not_to receive(:push)
50
+ expect(Sidekiq::Client).not_to receive(:push)
51
51
  .with(hash_including(
52
52
  'class' => Chewy::Strategy::LazySidekiq::IndicesUpdateWorker,
53
53
  'queue' => 'low'
54
54
  ))
55
- expect(::Sidekiq::Client).to receive(:push)
55
+ expect(Sidekiq::Client).to receive(:push)
56
56
  .with(hash_including(
57
57
  'class' => Chewy::Strategy::Sidekiq::Worker,
58
58
  'queue' => 'low',
@@ -60,7 +60,7 @@ if defined?(::Sidekiq)
60
60
  ))
61
61
  .and_call_original
62
62
  .once
63
- ::Sidekiq::Testing.inline! do
63
+ Sidekiq::Testing.inline! do
64
64
  expect { [city, other_city].map(&:destroy) }.to update_index(CitiesIndex, strategy: :sidekiq)
65
65
  end
66
66
  end
@@ -71,7 +71,7 @@ if defined?(::Sidekiq)
71
71
  expect(other_city).to receive(:run_chewy_callbacks).and_call_original
72
72
 
73
73
  expect do
74
- ::Sidekiq::Testing.inline! do
74
+ Sidekiq::Testing.inline! do
75
75
  Chewy::Strategy::LazySidekiq::IndicesUpdateWorker.new.perform({'City' => [city.id, other_city.id]})
76
76
  end
77
77
  end.to update_index(CitiesIndex).and_reindex(city, other_city).only
@@ -88,7 +88,7 @@ if defined?(::Sidekiq)
88
88
  expect(other_city).to receive(:run_chewy_callbacks).and_call_original
89
89
 
90
90
  expect do
91
- ::Sidekiq::Testing.inline! do
91
+ Sidekiq::Testing.inline! do
92
92
  Chewy::Strategy::LazySidekiq::IndicesUpdateWorker.new.perform({'City' => [city.id, other_city.id]})
93
93
  end
94
94
  end.to update_index(CitiesIndex).and_reindex(city, other_city).only.no_refresh
@@ -97,7 +97,7 @@ if defined?(::Sidekiq)
97
97
  end
98
98
 
99
99
  context 'integration' do
100
- around { |example| ::Sidekiq::Testing.inline! { example.run } }
100
+ around { |example| Sidekiq::Testing.inline! { example.run } }
101
101
 
102
102
  let(:update_condition) { true }
103
103
 
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- if defined?(::Sidekiq)
3
+ if defined?(Sidekiq)
4
4
  require 'sidekiq/testing'
5
5
 
6
6
  describe Chewy::Strategy::Sidekiq do
@@ -10,7 +10,7 @@ if defined?(::Sidekiq)
10
10
  Chewy.strategy(:bypass) { example.run }
11
11
  Chewy.settings[:sidekiq] = sidekiq_settings
12
12
  end
13
- before { ::Sidekiq::Worker.clear_all }
13
+ before { Sidekiq::Worker.clear_all }
14
14
  before do
15
15
  stub_model(:city) do
16
16
  update_index('cities') { self }
@@ -30,8 +30,8 @@ if defined?(::Sidekiq)
30
30
  end
31
31
 
32
32
  specify do
33
- expect(::Sidekiq::Client).to receive(:push).with(hash_including('queue' => 'low')).and_call_original
34
- ::Sidekiq::Testing.inline! do
33
+ expect(Sidekiq::Client).to receive(:push).with(hash_including('queue' => 'low')).and_call_original
34
+ Sidekiq::Testing.inline! do
35
35
  expect { [city, other_city].map(&:save!) }
36
36
  .to update_index(CitiesIndex, strategy: :sidekiq)
37
37
  .and_reindex(city, other_city).only
data/spec/chewy_spec.rb CHANGED
@@ -59,7 +59,7 @@ describe Chewy do
59
59
  Chewy.current[:chewy_client] = nil
60
60
  allow(Chewy).to receive_messages(configuration: {transport_options: {proc: faraday_block}})
61
61
 
62
- allow(::Elasticsearch::Client).to receive(:new).with(expected_client_config) do |*_args, &passed_block|
62
+ allow(Elasticsearch::Client).to receive(:new).with(expected_client_config) do |*_args, &passed_block|
63
63
  # RSpec's `with(..., &block)` was used previously, but doesn't actually do
64
64
  # any verification of the passed block (even of its presence).
65
65
  expect(passed_block.source_location).to eq(faraday_block.source_location)
data/spec/spec_helper.rb CHANGED
@@ -9,7 +9,7 @@ require 'rspec/collection_matchers'
9
9
 
10
10
  require 'timecop'
11
11
 
12
- Kaminari::Hooks.init if defined?(::Kaminari::Hooks)
12
+ Kaminari::Hooks.init if defined?(Kaminari::Hooks)
13
13
 
14
14
  require 'support/fail_helpers'
15
15
  require 'support/class_helpers'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.5
4
+ version: 7.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toptal, LLC
@@ -9,176 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-12-06 00:00:00.000000000 Z
12
+ date: 2023-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: database_cleaner
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
- - !ruby/object:Gem::Dependency
29
- name: elasticsearch-extensions
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
- - !ruby/object:Gem::Dependency
43
- name: mock_redis
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: rake
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: rspec
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 3.7.0
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: 3.7.0
84
- - !ruby/object:Gem::Dependency
85
- name: rspec-collection_matchers
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rspec-its
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- - !ruby/object:Gem::Dependency
113
- name: rubocop
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - '='
117
- - !ruby/object:Gem::Version
118
- version: '1.11'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - '='
124
- - !ruby/object:Gem::Version
125
- version: '1.11'
126
- - !ruby/object:Gem::Dependency
127
- name: sqlite3
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- version: '0'
140
- - !ruby/object:Gem::Dependency
141
- name: timecop
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- version: '0'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- version: '0'
154
- - !ruby/object:Gem::Dependency
155
- name: method_source
156
- requirement: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: '0'
161
- type: :development
162
- prerelease: false
163
- version_requirements: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- version: '0'
168
- - !ruby/object:Gem::Dependency
169
- name: unparser
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: '0'
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
14
  - !ruby/object:Gem::Dependency
183
15
  name: activesupport
184
16
  requirement: !ruby/object:Gem::Requirement
@@ -257,8 +89,7 @@ files:
257
89
  - Rakefile
258
90
  - chewy.gemspec
259
91
  - filters
260
- - gemfiles/rails.5.2.activerecord.gemfile
261
- - gemfiles/rails.6.0.activerecord.gemfile
92
+ - gemfiles/base.gemfile
262
93
  - gemfiles/rails.6.1.activerecord.gemfile
263
94
  - gemfiles/rails.7.0.activerecord.gemfile
264
95
  - gemfiles/rails.7.1.activerecord.gemfile
@@ -324,6 +155,7 @@ files:
324
155
  - lib/chewy/search/parameters/ignore_unavailable.rb
325
156
  - lib/chewy/search/parameters/indices.rb
326
157
  - lib/chewy/search/parameters/indices_boost.rb
158
+ - lib/chewy/search/parameters/knn.rb
327
159
  - lib/chewy/search/parameters/limit.rb
328
160
  - lib/chewy/search/parameters/load.rb
329
161
  - lib/chewy/search/parameters/min_score.rb
@@ -419,6 +251,7 @@ files:
419
251
  - spec/chewy/search/parameters/ignore_unavailable_spec.rb
420
252
  - spec/chewy/search/parameters/indices_spec.rb
421
253
  - spec/chewy/search/parameters/integer_storage_examples.rb
254
+ - spec/chewy/search/parameters/knn_spec.rb
422
255
  - spec/chewy/search/parameters/limit_spec.rb
423
256
  - spec/chewy/search/parameters/load_spec.rb
424
257
  - spec/chewy/search/parameters/min_score_spec.rb
@@ -468,7 +301,8 @@ files:
468
301
  homepage: https://github.com/toptal/chewy
469
302
  licenses:
470
303
  - MIT
471
- metadata: {}
304
+ metadata:
305
+ rubygems_mfa_required: 'true'
472
306
  post_install_message:
473
307
  rdoc_options: []
474
308
  require_paths:
@@ -488,98 +322,4 @@ rubygems_version: 3.4.10
488
322
  signing_key:
489
323
  specification_version: 4
490
324
  summary: Elasticsearch ODM client wrapper
491
- test_files:
492
- - spec/chewy/config_spec.rb
493
- - spec/chewy/fields/base_spec.rb
494
- - spec/chewy/fields/root_spec.rb
495
- - spec/chewy/fields/time_fields_spec.rb
496
- - spec/chewy/index/actions_spec.rb
497
- - spec/chewy/index/adapter/active_record_spec.rb
498
- - spec/chewy/index/adapter/object_spec.rb
499
- - spec/chewy/index/aliases_spec.rb
500
- - spec/chewy/index/import/bulk_builder_spec.rb
501
- - spec/chewy/index/import/bulk_request_spec.rb
502
- - spec/chewy/index/import/journal_builder_spec.rb
503
- - spec/chewy/index/import/routine_spec.rb
504
- - spec/chewy/index/import_spec.rb
505
- - spec/chewy/index/mapping_spec.rb
506
- - spec/chewy/index/observe/active_record_methods_spec.rb
507
- - spec/chewy/index/observe/callback_spec.rb
508
- - spec/chewy/index/observe_spec.rb
509
- - spec/chewy/index/settings_spec.rb
510
- - spec/chewy/index/specification_spec.rb
511
- - spec/chewy/index/syncer_spec.rb
512
- - spec/chewy/index/witchcraft_spec.rb
513
- - spec/chewy/index/wrapper_spec.rb
514
- - spec/chewy/index_spec.rb
515
- - spec/chewy/journal_spec.rb
516
- - spec/chewy/minitest/helpers_spec.rb
517
- - spec/chewy/minitest/search_index_receiver_spec.rb
518
- - spec/chewy/multi_search_spec.rb
519
- - spec/chewy/rake_helper_spec.rb
520
- - spec/chewy/repository_spec.rb
521
- - spec/chewy/rspec/build_query_spec.rb
522
- - spec/chewy/rspec/helpers_spec.rb
523
- - spec/chewy/rspec/update_index_spec.rb
524
- - spec/chewy/runtime/version_spec.rb
525
- - spec/chewy/runtime_spec.rb
526
- - spec/chewy/search/loader_spec.rb
527
- - spec/chewy/search/pagination/kaminari_examples.rb
528
- - spec/chewy/search/pagination/kaminari_spec.rb
529
- - spec/chewy/search/parameters/aggs_spec.rb
530
- - spec/chewy/search/parameters/bool_storage_examples.rb
531
- - spec/chewy/search/parameters/collapse_spec.rb
532
- - spec/chewy/search/parameters/docvalue_fields_spec.rb
533
- - spec/chewy/search/parameters/explain_spec.rb
534
- - spec/chewy/search/parameters/filter_spec.rb
535
- - spec/chewy/search/parameters/hash_storage_examples.rb
536
- - spec/chewy/search/parameters/highlight_spec.rb
537
- - spec/chewy/search/parameters/ignore_unavailable_spec.rb
538
- - spec/chewy/search/parameters/indices_spec.rb
539
- - spec/chewy/search/parameters/integer_storage_examples.rb
540
- - spec/chewy/search/parameters/limit_spec.rb
541
- - spec/chewy/search/parameters/load_spec.rb
542
- - spec/chewy/search/parameters/min_score_spec.rb
543
- - spec/chewy/search/parameters/none_spec.rb
544
- - spec/chewy/search/parameters/offset_spec.rb
545
- - spec/chewy/search/parameters/order_spec.rb
546
- - spec/chewy/search/parameters/post_filter_spec.rb
547
- - spec/chewy/search/parameters/preference_spec.rb
548
- - spec/chewy/search/parameters/profile_spec.rb
549
- - spec/chewy/search/parameters/query_spec.rb
550
- - spec/chewy/search/parameters/query_storage_examples.rb
551
- - spec/chewy/search/parameters/request_cache_spec.rb
552
- - spec/chewy/search/parameters/rescore_spec.rb
553
- - spec/chewy/search/parameters/script_fields_spec.rb
554
- - spec/chewy/search/parameters/search_after_spec.rb
555
- - spec/chewy/search/parameters/search_type_spec.rb
556
- - spec/chewy/search/parameters/source_spec.rb
557
- - spec/chewy/search/parameters/storage_spec.rb
558
- - spec/chewy/search/parameters/stored_fields_spec.rb
559
- - spec/chewy/search/parameters/string_array_storage_examples.rb
560
- - spec/chewy/search/parameters/string_storage_examples.rb
561
- - spec/chewy/search/parameters/suggest_spec.rb
562
- - spec/chewy/search/parameters/terminate_after_spec.rb
563
- - spec/chewy/search/parameters/timeout_spec.rb
564
- - spec/chewy/search/parameters/track_scores_spec.rb
565
- - spec/chewy/search/parameters/track_total_hits_spec.rb
566
- - spec/chewy/search/parameters/version_spec.rb
567
- - spec/chewy/search/parameters_spec.rb
568
- - spec/chewy/search/query_proxy_spec.rb
569
- - spec/chewy/search/request_spec.rb
570
- - spec/chewy/search/response_spec.rb
571
- - spec/chewy/search/scrolling_spec.rb
572
- - spec/chewy/search_spec.rb
573
- - spec/chewy/stash_spec.rb
574
- - spec/chewy/strategy/active_job_spec.rb
575
- - spec/chewy/strategy/atomic_no_refresh_spec.rb
576
- - spec/chewy/strategy/atomic_spec.rb
577
- - spec/chewy/strategy/delayed_sidekiq_spec.rb
578
- - spec/chewy/strategy/lazy_sidekiq_spec.rb
579
- - spec/chewy/strategy/sidekiq_spec.rb
580
- - spec/chewy/strategy_spec.rb
581
- - spec/chewy_spec.rb
582
- - spec/spec_helper.rb
583
- - spec/support/active_record.rb
584
- - spec/support/class_helpers.rb
585
- - spec/support/fail_helpers.rb
325
+ test_files: []
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activejob', '~> 5.2.0'
4
- gem 'activerecord', '~> 5.2.0'
5
- gem 'activesupport', '~> 5.2.0'
6
- gem 'kaminari-core', '~> 1.1.0', require: false
7
- gem 'parallel', require: false
8
- gem 'rspec_junit_formatter', '~> 0.4.1'
9
- gem 'sidekiq', require: false
10
-
11
- gemspec path: '../'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activejob', '~> 6.0.0'
4
- gem 'activerecord', '~> 6.0.0'
5
- gem 'activesupport', '~> 6.0.0'
6
- gem 'kaminari-core', '~> 1.1.0', require: false
7
- gem 'parallel', require: false
8
- gem 'rspec_junit_formatter', '~> 0.4.1'
9
- gem 'sidekiq', require: false
10
-
11
- gemspec path: '../'