chewy 5.1.0 → 7.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +16 -0
  6. data/.github/workflows/ruby.yml +73 -0
  7. data/.rubocop.yml +13 -8
  8. data/.rubocop_todo.yml +110 -22
  9. data/CHANGELOG.md +449 -347
  10. data/CODE_OF_CONDUCT.md +14 -0
  11. data/CONTRIBUTING.md +63 -0
  12. data/Gemfile +3 -7
  13. data/Guardfile +3 -1
  14. data/LICENSE.txt +1 -1
  15. data/README.md +423 -311
  16. data/chewy.gemspec +8 -10
  17. data/gemfiles/rails.5.2.activerecord.gemfile +9 -14
  18. data/gemfiles/rails.6.0.activerecord.gemfile +11 -0
  19. data/gemfiles/rails.6.1.activerecord.gemfile +13 -0
  20. data/gemfiles/rails.7.0.activerecord.gemfile +13 -0
  21. data/lib/chewy/config.rb +42 -60
  22. data/lib/chewy/errors.rb +4 -10
  23. data/lib/chewy/fields/base.rb +80 -20
  24. data/lib/chewy/fields/root.rb +7 -17
  25. data/lib/chewy/index/actions.rb +62 -35
  26. data/lib/chewy/{type → index}/adapter/active_record.rb +18 -4
  27. data/lib/chewy/{type → index}/adapter/base.rb +2 -3
  28. data/lib/chewy/{type → index}/adapter/object.rb +28 -32
  29. data/lib/chewy/{type → index}/adapter/orm.rb +26 -24
  30. data/lib/chewy/index/aliases.rb +14 -5
  31. data/lib/chewy/{type → index}/crutch.rb +5 -5
  32. data/lib/chewy/index/import/bulk_builder.rb +311 -0
  33. data/lib/chewy/{type → index}/import/bulk_request.rb +6 -7
  34. data/lib/chewy/{type → index}/import/journal_builder.rb +11 -12
  35. data/lib/chewy/{type → index}/import/routine.rb +17 -16
  36. data/lib/chewy/{type → index}/import.rb +51 -33
  37. data/lib/chewy/{type → index}/mapping.rb +32 -37
  38. data/lib/chewy/index/observe/active_record_methods.rb +87 -0
  39. data/lib/chewy/index/observe/callback.rb +34 -0
  40. data/lib/chewy/index/observe.rb +17 -0
  41. data/lib/chewy/index/specification.rb +1 -0
  42. data/lib/chewy/{type → index}/syncer.rb +61 -62
  43. data/lib/chewy/{type → index}/witchcraft.rb +15 -9
  44. data/lib/chewy/{type → index}/wrapper.rb +13 -3
  45. data/lib/chewy/index.rb +46 -96
  46. data/lib/chewy/journal.rb +25 -14
  47. data/lib/chewy/minitest/helpers.rb +86 -13
  48. data/lib/chewy/minitest/search_index_receiver.rb +22 -26
  49. data/lib/chewy/multi_search.rb +62 -0
  50. data/lib/chewy/railtie.rb +6 -20
  51. data/lib/chewy/rake_helper.rb +136 -108
  52. data/lib/chewy/rspec/build_query.rb +12 -0
  53. data/lib/chewy/rspec/helpers.rb +55 -0
  54. data/lib/chewy/rspec/update_index.rb +55 -44
  55. data/lib/chewy/rspec.rb +2 -0
  56. data/lib/chewy/runtime.rb +1 -1
  57. data/lib/chewy/search/loader.rb +19 -41
  58. data/lib/chewy/search/parameters/collapse.rb +16 -0
  59. data/lib/chewy/search/parameters/concerns/query_storage.rb +2 -2
  60. data/lib/chewy/search/parameters/ignore_unavailable.rb +27 -0
  61. data/lib/chewy/search/parameters/indices.rb +12 -57
  62. data/lib/chewy/search/parameters/none.rb +1 -3
  63. data/lib/chewy/search/parameters/order.rb +6 -19
  64. data/lib/chewy/search/parameters/source.rb +5 -1
  65. data/lib/chewy/search/parameters/track_total_hits.rb +16 -0
  66. data/lib/chewy/search/parameters.rb +7 -4
  67. data/lib/chewy/search/query_proxy.rb +9 -2
  68. data/lib/chewy/search/request.rb +180 -154
  69. data/lib/chewy/search/response.rb +5 -5
  70. data/lib/chewy/search/scoping.rb +7 -8
  71. data/lib/chewy/search/scrolling.rb +16 -13
  72. data/lib/chewy/search.rb +7 -22
  73. data/lib/chewy/stash.rb +19 -30
  74. data/lib/chewy/strategy/active_job.rb +2 -2
  75. data/lib/chewy/strategy/atomic_no_refresh.rb +18 -0
  76. data/lib/chewy/strategy/base.rb +10 -0
  77. data/lib/chewy/strategy/lazy_sidekiq.rb +64 -0
  78. data/lib/chewy/strategy/sidekiq.rb +3 -2
  79. data/lib/chewy/strategy.rb +5 -19
  80. data/lib/chewy/version.rb +1 -1
  81. data/lib/chewy.rb +36 -80
  82. data/lib/generators/chewy/install_generator.rb +1 -1
  83. data/lib/tasks/chewy.rake +26 -32
  84. data/migration_guide.md +56 -0
  85. data/spec/chewy/config_spec.rb +15 -61
  86. data/spec/chewy/fields/base_spec.rb +432 -145
  87. data/spec/chewy/fields/root_spec.rb +20 -28
  88. data/spec/chewy/fields/time_fields_spec.rb +5 -5
  89. data/spec/chewy/index/actions_spec.rb +388 -55
  90. data/spec/chewy/{type → index}/adapter/active_record_spec.rb +110 -44
  91. data/spec/chewy/{type → index}/adapter/object_spec.rb +21 -6
  92. data/spec/chewy/index/aliases_spec.rb +3 -3
  93. data/spec/chewy/index/import/bulk_builder_spec.rb +494 -0
  94. data/spec/chewy/{type → index}/import/bulk_request_spec.rb +5 -12
  95. data/spec/chewy/{type → index}/import/journal_builder_spec.rb +14 -22
  96. data/spec/chewy/{type → index}/import/routine_spec.rb +19 -19
  97. data/spec/chewy/{type → index}/import_spec.rb +149 -96
  98. data/spec/chewy/index/mapping_spec.rb +135 -0
  99. data/spec/chewy/index/observe/active_record_methods_spec.rb +68 -0
  100. data/spec/chewy/index/observe/callback_spec.rb +139 -0
  101. data/spec/chewy/index/observe_spec.rb +143 -0
  102. data/spec/chewy/index/settings_spec.rb +3 -1
  103. data/spec/chewy/index/specification_spec.rb +20 -30
  104. data/spec/chewy/{type → index}/syncer_spec.rb +14 -19
  105. data/spec/chewy/{type → index}/witchcraft_spec.rb +34 -21
  106. data/spec/chewy/index/wrapper_spec.rb +100 -0
  107. data/spec/chewy/index_spec.rb +69 -137
  108. data/spec/chewy/journal_spec.rb +46 -91
  109. data/spec/chewy/minitest/helpers_spec.rb +122 -14
  110. data/spec/chewy/minitest/search_index_receiver_spec.rb +24 -26
  111. data/spec/chewy/multi_search_spec.rb +84 -0
  112. data/spec/chewy/rake_helper_spec.rb +293 -101
  113. data/spec/chewy/rspec/build_query_spec.rb +34 -0
  114. data/spec/chewy/rspec/helpers_spec.rb +61 -0
  115. data/spec/chewy/rspec/update_index_spec.rb +106 -102
  116. data/spec/chewy/runtime_spec.rb +2 -2
  117. data/spec/chewy/search/loader_spec.rb +19 -53
  118. data/spec/chewy/search/pagination/kaminari_examples.rb +3 -5
  119. data/spec/chewy/search/pagination/kaminari_spec.rb +1 -1
  120. data/spec/chewy/search/parameters/collapse_spec.rb +5 -0
  121. data/spec/chewy/search/parameters/ignore_unavailable_spec.rb +67 -0
  122. data/spec/chewy/search/parameters/indices_spec.rb +26 -118
  123. data/spec/chewy/search/parameters/none_spec.rb +1 -1
  124. data/spec/chewy/search/parameters/order_spec.rb +18 -11
  125. data/spec/chewy/search/parameters/query_storage_examples.rb +67 -21
  126. data/spec/chewy/search/parameters/search_after_spec.rb +4 -1
  127. data/spec/chewy/search/parameters/source_spec.rb +8 -2
  128. data/spec/chewy/search/parameters/track_total_hits_spec.rb +5 -0
  129. data/spec/chewy/search/parameters_spec.rb +23 -7
  130. data/spec/chewy/search/query_proxy_spec.rb +68 -17
  131. data/spec/chewy/search/request_spec.rb +344 -149
  132. data/spec/chewy/search/response_spec.rb +35 -25
  133. data/spec/chewy/search/scrolling_spec.rb +28 -26
  134. data/spec/chewy/search_spec.rb +69 -59
  135. data/spec/chewy/stash_spec.rb +16 -26
  136. data/spec/chewy/strategy/active_job_spec.rb +23 -10
  137. data/spec/chewy/strategy/atomic_no_refresh_spec.rb +60 -0
  138. data/spec/chewy/strategy/atomic_spec.rb +9 -10
  139. data/spec/chewy/strategy/lazy_sidekiq_spec.rb +214 -0
  140. data/spec/chewy/strategy/sidekiq_spec.rb +14 -10
  141. data/spec/chewy/strategy_spec.rb +19 -15
  142. data/spec/chewy_spec.rb +17 -110
  143. data/spec/spec_helper.rb +6 -29
  144. data/spec/support/active_record.rb +43 -5
  145. metadata +102 -198
  146. data/.travis.yml +0 -45
  147. data/Appraisals +0 -81
  148. data/LEGACY_DSL.md +0 -497
  149. data/gemfiles/rails.4.0.activerecord.gemfile +0 -15
  150. data/gemfiles/rails.4.1.activerecord.gemfile +0 -15
  151. data/gemfiles/rails.4.2.activerecord.gemfile +0 -16
  152. data/gemfiles/rails.4.2.mongoid.5.2.gemfile +0 -16
  153. data/gemfiles/rails.5.0.activerecord.gemfile +0 -16
  154. data/gemfiles/rails.5.0.mongoid.6.1.gemfile +0 -16
  155. data/gemfiles/rails.5.1.activerecord.gemfile +0 -16
  156. data/gemfiles/rails.5.1.mongoid.6.3.gemfile +0 -16
  157. data/gemfiles/sequel.4.45.gemfile +0 -11
  158. data/lib/chewy/backports/deep_dup.rb +0 -46
  159. data/lib/chewy/backports/duplicable.rb +0 -91
  160. data/lib/chewy/query/compose.rb +0 -68
  161. data/lib/chewy/query/criteria.rb +0 -191
  162. data/lib/chewy/query/filters.rb +0 -244
  163. data/lib/chewy/query/loading.rb +0 -110
  164. data/lib/chewy/query/nodes/and.rb +0 -25
  165. data/lib/chewy/query/nodes/base.rb +0 -17
  166. data/lib/chewy/query/nodes/bool.rb +0 -34
  167. data/lib/chewy/query/nodes/equal.rb +0 -34
  168. data/lib/chewy/query/nodes/exists.rb +0 -20
  169. data/lib/chewy/query/nodes/expr.rb +0 -28
  170. data/lib/chewy/query/nodes/field.rb +0 -110
  171. data/lib/chewy/query/nodes/has_child.rb +0 -15
  172. data/lib/chewy/query/nodes/has_parent.rb +0 -15
  173. data/lib/chewy/query/nodes/has_relation.rb +0 -59
  174. data/lib/chewy/query/nodes/match_all.rb +0 -11
  175. data/lib/chewy/query/nodes/missing.rb +0 -20
  176. data/lib/chewy/query/nodes/not.rb +0 -25
  177. data/lib/chewy/query/nodes/or.rb +0 -25
  178. data/lib/chewy/query/nodes/prefix.rb +0 -19
  179. data/lib/chewy/query/nodes/query.rb +0 -20
  180. data/lib/chewy/query/nodes/range.rb +0 -63
  181. data/lib/chewy/query/nodes/raw.rb +0 -15
  182. data/lib/chewy/query/nodes/regexp.rb +0 -35
  183. data/lib/chewy/query/nodes/script.rb +0 -20
  184. data/lib/chewy/query/pagination.rb +0 -25
  185. data/lib/chewy/query.rb +0 -1142
  186. data/lib/chewy/search/pagination/will_paginate.rb +0 -43
  187. data/lib/chewy/search/parameters/types.rb +0 -20
  188. data/lib/chewy/strategy/resque.rb +0 -27
  189. data/lib/chewy/strategy/shoryuken.rb +0 -40
  190. data/lib/chewy/type/actions.rb +0 -43
  191. data/lib/chewy/type/adapter/mongoid.rb +0 -67
  192. data/lib/chewy/type/adapter/sequel.rb +0 -93
  193. data/lib/chewy/type/import/bulk_builder.rb +0 -122
  194. data/lib/chewy/type/observe.rb +0 -82
  195. data/lib/chewy/type.rb +0 -117
  196. data/lib/sequel/plugins/chewy_observe.rb +0 -63
  197. data/spec/chewy/query/criteria_spec.rb +0 -700
  198. data/spec/chewy/query/filters_spec.rb +0 -201
  199. data/spec/chewy/query/loading_spec.rb +0 -124
  200. data/spec/chewy/query/nodes/and_spec.rb +0 -12
  201. data/spec/chewy/query/nodes/bool_spec.rb +0 -14
  202. data/spec/chewy/query/nodes/equal_spec.rb +0 -32
  203. data/spec/chewy/query/nodes/exists_spec.rb +0 -18
  204. data/spec/chewy/query/nodes/has_child_spec.rb +0 -59
  205. data/spec/chewy/query/nodes/has_parent_spec.rb +0 -59
  206. data/spec/chewy/query/nodes/match_all_spec.rb +0 -11
  207. data/spec/chewy/query/nodes/missing_spec.rb +0 -16
  208. data/spec/chewy/query/nodes/not_spec.rb +0 -14
  209. data/spec/chewy/query/nodes/or_spec.rb +0 -12
  210. data/spec/chewy/query/nodes/prefix_spec.rb +0 -16
  211. data/spec/chewy/query/nodes/query_spec.rb +0 -12
  212. data/spec/chewy/query/nodes/range_spec.rb +0 -32
  213. data/spec/chewy/query/nodes/raw_spec.rb +0 -11
  214. data/spec/chewy/query/nodes/regexp_spec.rb +0 -43
  215. data/spec/chewy/query/nodes/script_spec.rb +0 -15
  216. data/spec/chewy/query/pagination/kaminari_spec.rb +0 -5
  217. data/spec/chewy/query/pagination/will_paginate_spec.rb +0 -5
  218. data/spec/chewy/query/pagination_spec.rb +0 -39
  219. data/spec/chewy/query_spec.rb +0 -637
  220. data/spec/chewy/search/pagination/will_paginate_examples.rb +0 -63
  221. data/spec/chewy/search/pagination/will_paginate_spec.rb +0 -23
  222. data/spec/chewy/search/parameters/types_spec.rb +0 -5
  223. data/spec/chewy/strategy/resque_spec.rb +0 -46
  224. data/spec/chewy/strategy/shoryuken_spec.rb +0 -66
  225. data/spec/chewy/type/actions_spec.rb +0 -50
  226. data/spec/chewy/type/adapter/mongoid_spec.rb +0 -372
  227. data/spec/chewy/type/adapter/sequel_spec.rb +0 -472
  228. data/spec/chewy/type/import/bulk_builder_spec.rb +0 -279
  229. data/spec/chewy/type/mapping_spec.rb +0 -173
  230. data/spec/chewy/type/observe_spec.rb +0 -137
  231. data/spec/chewy/type/wrapper_spec.rb +0 -98
  232. data/spec/chewy/type_spec.rb +0 -55
  233. data/spec/support/mongoid.rb +0 -93
  234. data/spec/support/sequel.rb +0 -80
@@ -1,11 +1,14 @@
1
1
  require 'database_cleaner'
2
2
 
3
- ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: 'file::memory:?cache=shared', pool: 10)
3
+ ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:', pool: 10)
4
4
  ActiveRecord::Base.logger = Logger.new('/dev/null')
5
- ActiveRecord::Base.raise_in_transactional_callbacks = true if ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks)
5
+ if ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks)
6
+ ActiveRecord::Base.raise_in_transactional_callbacks = true
7
+ end
6
8
 
7
9
  ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS 'countries'")
8
10
  ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS 'cities'")
11
+ ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS 'locations'")
9
12
  ActiveRecord::Schema.define do
10
13
  create_table :countries do |t|
11
14
  t.column :name, :string
@@ -17,9 +20,24 @@ ActiveRecord::Schema.define do
17
20
  create_table :cities do |t|
18
21
  t.column :country_id, :integer
19
22
  t.column :name, :string
23
+ t.column :historical_name, :string
24
+ t.column :description, :string
20
25
  t.column :rating, :integer
21
26
  t.column :updated_at, :datetime
22
27
  end
28
+
29
+ create_table :locations do |t|
30
+ t.column :city_id, :integer
31
+ t.column :lat, :string
32
+ t.column :lon, :string
33
+ end
34
+
35
+ create_table :comments do |t|
36
+ t.column :content, :string
37
+ t.column :comment_type, :string
38
+ t.column :commented_id, :integer
39
+ t.column :updated_at, :datetime
40
+ end
23
41
  end
24
42
 
25
43
  module ActiveRecordClassHelpers
@@ -29,6 +47,29 @@ module ActiveRecordClassHelpers
29
47
  :active_record
30
48
  end
31
49
 
50
+ def expects_db_queries(&block)
51
+ have_queries = false
52
+ ActiveSupport::Notifications.subscribed(
53
+ ->(*_) { have_queries = true },
54
+ 'sql.active_record',
55
+ &block
56
+ )
57
+ raise 'Expected some db queries, but none were made' unless have_queries
58
+ end
59
+
60
+ def expects_no_query(except: nil, &block)
61
+ queries = []
62
+ ActiveSupport::Notifications.subscribed(
63
+ ->(*args) { queries << args[4][:sql] },
64
+ 'sql.active_record',
65
+ &block
66
+ )
67
+ ofending_queries = except ? queries.find_all { |query| !query.match(except) } : queries
68
+ if ofending_queries.present?
69
+ raise "Expected no DB queries, but the following ones were made: #{ofending_queries.join(', ')}"
70
+ end
71
+ end
72
+
32
73
  def stub_model(name, superclass = nil, &block)
33
74
  stub_class(name, superclass || ActiveRecord::Base, &block)
34
75
  end
@@ -37,9 +78,6 @@ end
37
78
  RSpec.configure do |config|
38
79
  config.include ActiveRecordClassHelpers
39
80
 
40
- config.filter_run_excluding :mongoid
41
- config.filter_run_excluding :sequel
42
-
43
81
  config.before(:suite) do
44
82
  DatabaseCleaner.clean_with :truncation
45
83
  DatabaseCleaner.strategy = :truncation
metadata CHANGED
@@ -1,29 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 7.2.7
5
5
  platform: ruby
6
6
  authors:
7
+ - Toptal, LLC
7
8
  - pyromaniac
8
- autorequire:
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2019-09-24 00:00:00.000000000 Z
12
+ date: 2022-11-15 00:00:00.000000000 Z
12
13
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: appraisal
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
14
  - !ruby/object:Gem::Dependency
28
15
  name: database_cleaner
29
16
  requirement: !ruby/object:Gem::Requirement
@@ -66,32 +53,18 @@ dependencies:
66
53
  - - ">="
67
54
  - !ruby/object:Gem::Version
68
55
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: resque_spec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
56
  - !ruby/object:Gem::Dependency
84
57
  name: rspec
85
58
  requirement: !ruby/object:Gem::Requirement
86
59
  requirements:
87
- - - "~>"
60
+ - - ">="
88
61
  - !ruby/object:Gem::Version
89
62
  version: 3.7.0
90
63
  type: :development
91
64
  prerelease: false
92
65
  version_requirements: !ruby/object:Gem::Requirement
93
66
  requirements:
94
- - - "~>"
67
+ - - ">="
95
68
  - !ruby/object:Gem::Version
96
69
  version: 3.7.0
97
70
  - !ruby/object:Gem::Dependency
@@ -128,14 +101,14 @@ dependencies:
128
101
  requirements:
129
102
  - - '='
130
103
  - !ruby/object:Gem::Version
131
- version: 0.52.1
104
+ version: '1.11'
132
105
  type: :development
133
106
  prerelease: false
134
107
  version_requirements: !ruby/object:Gem::Requirement
135
108
  requirements:
136
109
  - - '='
137
110
  - !ruby/object:Gem::Version
138
- version: 0.52.1
111
+ version: '1.11'
139
112
  - !ruby/object:Gem::Dependency
140
113
  name: sqlite3
141
114
  requirement: !ruby/object:Gem::Requirement
@@ -198,28 +171,34 @@ dependencies:
198
171
  requirements:
199
172
  - - ">="
200
173
  - !ruby/object:Gem::Version
201
- version: '4.0'
174
+ version: '5.2'
202
175
  type: :runtime
203
176
  prerelease: false
204
177
  version_requirements: !ruby/object:Gem::Requirement
205
178
  requirements:
206
179
  - - ">="
207
180
  - !ruby/object:Gem::Version
208
- version: '4.0'
181
+ version: '5.2'
209
182
  - !ruby/object:Gem::Dependency
210
183
  name: elasticsearch
211
184
  requirement: !ruby/object:Gem::Requirement
212
185
  requirements:
213
186
  - - ">="
214
187
  - !ruby/object:Gem::Version
215
- version: 2.0.0
188
+ version: 7.12.0
189
+ - - "<"
190
+ - !ruby/object:Gem::Version
191
+ version: 7.14.0
216
192
  type: :runtime
217
193
  prerelease: false
218
194
  version_requirements: !ruby/object:Gem::Requirement
219
195
  requirements:
220
196
  - - ">="
221
197
  - !ruby/object:Gem::Version
222
- version: 2.0.0
198
+ version: 7.12.0
199
+ - - "<"
200
+ - !ruby/object:Gem::Version
201
+ version: 7.14.0
223
202
  - !ruby/object:Gem::Dependency
224
203
  name: elasticsearch-dsl
225
204
  requirement: !ruby/object:Gem::Requirement
@@ -237,94 +216,85 @@ dependencies:
237
216
  description: Chewy provides functionality for Elasticsearch index handling, documents
238
217
  import mappings and chainable query DSL
239
218
  email:
219
+ - open-source@toptal.com
240
220
  - kinwizard@gmail.com
241
221
  executables: []
242
222
  extensions: []
243
223
  extra_rdoc_files: []
244
224
  files:
225
+ - ".github/CODEOWNERS"
226
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
227
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
228
+ - ".github/PULL_REQUEST_TEMPLATE.md"
229
+ - ".github/workflows/ruby.yml"
245
230
  - ".gitignore"
246
231
  - ".rspec"
247
232
  - ".rubocop.yml"
248
233
  - ".rubocop_todo.yml"
249
- - ".travis.yml"
250
234
  - ".yardopts"
251
- - Appraisals
252
235
  - CHANGELOG.md
236
+ - CODE_OF_CONDUCT.md
237
+ - CONTRIBUTING.md
253
238
  - Gemfile
254
239
  - Guardfile
255
- - LEGACY_DSL.md
256
240
  - LICENSE.txt
257
241
  - README.md
258
242
  - Rakefile
259
243
  - chewy.gemspec
260
244
  - filters
261
- - gemfiles/rails.4.0.activerecord.gemfile
262
- - gemfiles/rails.4.1.activerecord.gemfile
263
- - gemfiles/rails.4.2.activerecord.gemfile
264
- - gemfiles/rails.4.2.mongoid.5.2.gemfile
265
- - gemfiles/rails.5.0.activerecord.gemfile
266
- - gemfiles/rails.5.0.mongoid.6.1.gemfile
267
- - gemfiles/rails.5.1.activerecord.gemfile
268
- - gemfiles/rails.5.1.mongoid.6.3.gemfile
269
245
  - gemfiles/rails.5.2.activerecord.gemfile
270
- - gemfiles/sequel.4.45.gemfile
246
+ - gemfiles/rails.6.0.activerecord.gemfile
247
+ - gemfiles/rails.6.1.activerecord.gemfile
248
+ - gemfiles/rails.7.0.activerecord.gemfile
271
249
  - lib/chewy.rb
272
- - lib/chewy/backports/deep_dup.rb
273
- - lib/chewy/backports/duplicable.rb
274
250
  - lib/chewy/config.rb
275
251
  - lib/chewy/errors.rb
276
252
  - lib/chewy/fields/base.rb
277
253
  - lib/chewy/fields/root.rb
278
254
  - lib/chewy/index.rb
279
255
  - lib/chewy/index/actions.rb
256
+ - lib/chewy/index/adapter/active_record.rb
257
+ - lib/chewy/index/adapter/base.rb
258
+ - lib/chewy/index/adapter/object.rb
259
+ - lib/chewy/index/adapter/orm.rb
280
260
  - lib/chewy/index/aliases.rb
261
+ - lib/chewy/index/crutch.rb
262
+ - lib/chewy/index/import.rb
263
+ - lib/chewy/index/import/bulk_builder.rb
264
+ - lib/chewy/index/import/bulk_request.rb
265
+ - lib/chewy/index/import/journal_builder.rb
266
+ - lib/chewy/index/import/routine.rb
267
+ - lib/chewy/index/mapping.rb
268
+ - lib/chewy/index/observe.rb
269
+ - lib/chewy/index/observe/active_record_methods.rb
270
+ - lib/chewy/index/observe/callback.rb
281
271
  - lib/chewy/index/settings.rb
282
272
  - lib/chewy/index/specification.rb
273
+ - lib/chewy/index/syncer.rb
274
+ - lib/chewy/index/witchcraft.rb
275
+ - lib/chewy/index/wrapper.rb
283
276
  - lib/chewy/journal.rb
284
277
  - lib/chewy/log_subscriber.rb
285
278
  - lib/chewy/minitest.rb
286
279
  - lib/chewy/minitest/helpers.rb
287
280
  - lib/chewy/minitest/search_index_receiver.rb
288
- - lib/chewy/query.rb
289
- - lib/chewy/query/compose.rb
290
- - lib/chewy/query/criteria.rb
291
- - lib/chewy/query/filters.rb
292
- - lib/chewy/query/loading.rb
293
- - lib/chewy/query/nodes/and.rb
294
- - lib/chewy/query/nodes/base.rb
295
- - lib/chewy/query/nodes/bool.rb
296
- - lib/chewy/query/nodes/equal.rb
297
- - lib/chewy/query/nodes/exists.rb
298
- - lib/chewy/query/nodes/expr.rb
299
- - lib/chewy/query/nodes/field.rb
300
- - lib/chewy/query/nodes/has_child.rb
301
- - lib/chewy/query/nodes/has_parent.rb
302
- - lib/chewy/query/nodes/has_relation.rb
303
- - lib/chewy/query/nodes/match_all.rb
304
- - lib/chewy/query/nodes/missing.rb
305
- - lib/chewy/query/nodes/not.rb
306
- - lib/chewy/query/nodes/or.rb
307
- - lib/chewy/query/nodes/prefix.rb
308
- - lib/chewy/query/nodes/query.rb
309
- - lib/chewy/query/nodes/range.rb
310
- - lib/chewy/query/nodes/raw.rb
311
- - lib/chewy/query/nodes/regexp.rb
312
- - lib/chewy/query/nodes/script.rb
313
- - lib/chewy/query/pagination.rb
281
+ - lib/chewy/multi_search.rb
314
282
  - lib/chewy/railtie.rb
315
283
  - lib/chewy/rake_helper.rb
316
284
  - lib/chewy/repository.rb
317
285
  - lib/chewy/rspec.rb
286
+ - lib/chewy/rspec/build_query.rb
287
+ - lib/chewy/rspec/helpers.rb
318
288
  - lib/chewy/rspec/update_index.rb
319
289
  - lib/chewy/runtime.rb
320
290
  - lib/chewy/runtime/version.rb
321
291
  - lib/chewy/search.rb
322
292
  - lib/chewy/search/loader.rb
323
293
  - lib/chewy/search/pagination/kaminari.rb
324
- - lib/chewy/search/pagination/will_paginate.rb
325
294
  - lib/chewy/search/parameters.rb
326
295
  - lib/chewy/search/parameters/aggs.rb
327
296
  - lib/chewy/search/parameters/allow_partial_search_results.rb
297
+ - lib/chewy/search/parameters/collapse.rb
328
298
  - lib/chewy/search/parameters/concerns/bool_storage.rb
329
299
  - lib/chewy/search/parameters/concerns/hash_storage.rb
330
300
  - lib/chewy/search/parameters/concerns/integer_storage.rb
@@ -335,6 +305,7 @@ files:
335
305
  - lib/chewy/search/parameters/explain.rb
336
306
  - lib/chewy/search/parameters/filter.rb
337
307
  - lib/chewy/search/parameters/highlight.rb
308
+ - lib/chewy/search/parameters/ignore_unavailable.rb
338
309
  - lib/chewy/search/parameters/indices.rb
339
310
  - lib/chewy/search/parameters/indices_boost.rb
340
311
  - lib/chewy/search/parameters/limit.rb
@@ -359,7 +330,7 @@ files:
359
330
  - lib/chewy/search/parameters/terminate_after.rb
360
331
  - lib/chewy/search/parameters/timeout.rb
361
332
  - lib/chewy/search/parameters/track_scores.rb
362
- - lib/chewy/search/parameters/types.rb
333
+ - lib/chewy/search/parameters/track_total_hits.rb
363
334
  - lib/chewy/search/parameters/version.rb
364
335
  - lib/chewy/search/query_proxy.rb
365
336
  - lib/chewy/search/request.rb
@@ -370,88 +341,63 @@ files:
370
341
  - lib/chewy/strategy.rb
371
342
  - lib/chewy/strategy/active_job.rb
372
343
  - lib/chewy/strategy/atomic.rb
344
+ - lib/chewy/strategy/atomic_no_refresh.rb
373
345
  - lib/chewy/strategy/base.rb
374
346
  - lib/chewy/strategy/bypass.rb
375
- - lib/chewy/strategy/resque.rb
376
- - lib/chewy/strategy/shoryuken.rb
347
+ - lib/chewy/strategy/lazy_sidekiq.rb
377
348
  - lib/chewy/strategy/sidekiq.rb
378
349
  - lib/chewy/strategy/urgent.rb
379
- - lib/chewy/type.rb
380
- - lib/chewy/type/actions.rb
381
- - lib/chewy/type/adapter/active_record.rb
382
- - lib/chewy/type/adapter/base.rb
383
- - lib/chewy/type/adapter/mongoid.rb
384
- - lib/chewy/type/adapter/object.rb
385
- - lib/chewy/type/adapter/orm.rb
386
- - lib/chewy/type/adapter/sequel.rb
387
- - lib/chewy/type/crutch.rb
388
- - lib/chewy/type/import.rb
389
- - lib/chewy/type/import/bulk_builder.rb
390
- - lib/chewy/type/import/bulk_request.rb
391
- - lib/chewy/type/import/journal_builder.rb
392
- - lib/chewy/type/import/routine.rb
393
- - lib/chewy/type/mapping.rb
394
- - lib/chewy/type/observe.rb
395
- - lib/chewy/type/syncer.rb
396
- - lib/chewy/type/witchcraft.rb
397
- - lib/chewy/type/wrapper.rb
398
350
  - lib/chewy/version.rb
399
351
  - lib/generators/chewy/install_generator.rb
400
352
  - lib/generators/templates/chewy.yml
401
- - lib/sequel/plugins/chewy_observe.rb
402
353
  - lib/tasks/chewy.rake
354
+ - migration_guide.md
403
355
  - spec/chewy/config_spec.rb
404
356
  - spec/chewy/fields/base_spec.rb
405
357
  - spec/chewy/fields/root_spec.rb
406
358
  - spec/chewy/fields/time_fields_spec.rb
407
359
  - spec/chewy/index/actions_spec.rb
360
+ - spec/chewy/index/adapter/active_record_spec.rb
361
+ - spec/chewy/index/adapter/object_spec.rb
408
362
  - spec/chewy/index/aliases_spec.rb
363
+ - spec/chewy/index/import/bulk_builder_spec.rb
364
+ - spec/chewy/index/import/bulk_request_spec.rb
365
+ - spec/chewy/index/import/journal_builder_spec.rb
366
+ - spec/chewy/index/import/routine_spec.rb
367
+ - spec/chewy/index/import_spec.rb
368
+ - spec/chewy/index/mapping_spec.rb
369
+ - spec/chewy/index/observe/active_record_methods_spec.rb
370
+ - spec/chewy/index/observe/callback_spec.rb
371
+ - spec/chewy/index/observe_spec.rb
409
372
  - spec/chewy/index/settings_spec.rb
410
373
  - spec/chewy/index/specification_spec.rb
374
+ - spec/chewy/index/syncer_spec.rb
375
+ - spec/chewy/index/witchcraft_spec.rb
376
+ - spec/chewy/index/wrapper_spec.rb
411
377
  - spec/chewy/index_spec.rb
412
378
  - spec/chewy/journal_spec.rb
413
379
  - spec/chewy/minitest/helpers_spec.rb
414
380
  - spec/chewy/minitest/search_index_receiver_spec.rb
415
- - spec/chewy/query/criteria_spec.rb
416
- - spec/chewy/query/filters_spec.rb
417
- - spec/chewy/query/loading_spec.rb
418
- - spec/chewy/query/nodes/and_spec.rb
419
- - spec/chewy/query/nodes/bool_spec.rb
420
- - spec/chewy/query/nodes/equal_spec.rb
421
- - spec/chewy/query/nodes/exists_spec.rb
422
- - spec/chewy/query/nodes/has_child_spec.rb
423
- - spec/chewy/query/nodes/has_parent_spec.rb
424
- - spec/chewy/query/nodes/match_all_spec.rb
425
- - spec/chewy/query/nodes/missing_spec.rb
426
- - spec/chewy/query/nodes/not_spec.rb
427
- - spec/chewy/query/nodes/or_spec.rb
428
- - spec/chewy/query/nodes/prefix_spec.rb
429
- - spec/chewy/query/nodes/query_spec.rb
430
- - spec/chewy/query/nodes/range_spec.rb
431
- - spec/chewy/query/nodes/raw_spec.rb
432
- - spec/chewy/query/nodes/regexp_spec.rb
433
- - spec/chewy/query/nodes/script_spec.rb
434
- - spec/chewy/query/pagination/kaminari_spec.rb
435
- - spec/chewy/query/pagination/will_paginate_spec.rb
436
- - spec/chewy/query/pagination_spec.rb
437
- - spec/chewy/query_spec.rb
381
+ - spec/chewy/multi_search_spec.rb
438
382
  - spec/chewy/rake_helper_spec.rb
439
383
  - spec/chewy/repository_spec.rb
384
+ - spec/chewy/rspec/build_query_spec.rb
385
+ - spec/chewy/rspec/helpers_spec.rb
440
386
  - spec/chewy/rspec/update_index_spec.rb
441
387
  - spec/chewy/runtime/version_spec.rb
442
388
  - spec/chewy/runtime_spec.rb
443
389
  - spec/chewy/search/loader_spec.rb
444
390
  - spec/chewy/search/pagination/kaminari_examples.rb
445
391
  - spec/chewy/search/pagination/kaminari_spec.rb
446
- - spec/chewy/search/pagination/will_paginate_examples.rb
447
- - spec/chewy/search/pagination/will_paginate_spec.rb
448
392
  - spec/chewy/search/parameters/aggs_spec.rb
449
393
  - spec/chewy/search/parameters/bool_storage_examples.rb
394
+ - spec/chewy/search/parameters/collapse_spec.rb
450
395
  - spec/chewy/search/parameters/docvalue_fields_spec.rb
451
396
  - spec/chewy/search/parameters/explain_spec.rb
452
397
  - spec/chewy/search/parameters/filter_spec.rb
453
398
  - spec/chewy/search/parameters/hash_storage_examples.rb
454
399
  - spec/chewy/search/parameters/highlight_spec.rb
400
+ - spec/chewy/search/parameters/ignore_unavailable_spec.rb
455
401
  - spec/chewy/search/parameters/indices_spec.rb
456
402
  - spec/chewy/search/parameters/integer_storage_examples.rb
457
403
  - spec/chewy/search/parameters/limit_spec.rb
@@ -479,7 +425,7 @@ files:
479
425
  - spec/chewy/search/parameters/terminate_after_spec.rb
480
426
  - spec/chewy/search/parameters/timeout_spec.rb
481
427
  - spec/chewy/search/parameters/track_scores_spec.rb
482
- - spec/chewy/search/parameters/types_spec.rb
428
+ - spec/chewy/search/parameters/track_total_hits_spec.rb
483
429
  - spec/chewy/search/parameters/version_spec.rb
484
430
  - spec/chewy/search/parameters_spec.rb
485
431
  - spec/chewy/search/query_proxy_spec.rb
@@ -489,39 +435,21 @@ files:
489
435
  - spec/chewy/search_spec.rb
490
436
  - spec/chewy/stash_spec.rb
491
437
  - spec/chewy/strategy/active_job_spec.rb
438
+ - spec/chewy/strategy/atomic_no_refresh_spec.rb
492
439
  - spec/chewy/strategy/atomic_spec.rb
493
- - spec/chewy/strategy/resque_spec.rb
494
- - spec/chewy/strategy/shoryuken_spec.rb
440
+ - spec/chewy/strategy/lazy_sidekiq_spec.rb
495
441
  - spec/chewy/strategy/sidekiq_spec.rb
496
442
  - spec/chewy/strategy_spec.rb
497
- - spec/chewy/type/actions_spec.rb
498
- - spec/chewy/type/adapter/active_record_spec.rb
499
- - spec/chewy/type/adapter/mongoid_spec.rb
500
- - spec/chewy/type/adapter/object_spec.rb
501
- - spec/chewy/type/adapter/sequel_spec.rb
502
- - spec/chewy/type/import/bulk_builder_spec.rb
503
- - spec/chewy/type/import/bulk_request_spec.rb
504
- - spec/chewy/type/import/journal_builder_spec.rb
505
- - spec/chewy/type/import/routine_spec.rb
506
- - spec/chewy/type/import_spec.rb
507
- - spec/chewy/type/mapping_spec.rb
508
- - spec/chewy/type/observe_spec.rb
509
- - spec/chewy/type/syncer_spec.rb
510
- - spec/chewy/type/witchcraft_spec.rb
511
- - spec/chewy/type/wrapper_spec.rb
512
- - spec/chewy/type_spec.rb
513
443
  - spec/chewy_spec.rb
514
444
  - spec/spec_helper.rb
515
445
  - spec/support/active_record.rb
516
446
  - spec/support/class_helpers.rb
517
447
  - spec/support/fail_helpers.rb
518
- - spec/support/mongoid.rb
519
- - spec/support/sequel.rb
520
448
  homepage: https://github.com/toptal/chewy
521
449
  licenses:
522
450
  - MIT
523
451
  metadata: {}
524
- post_install_message:
452
+ post_install_message:
525
453
  rdoc_options: []
526
454
  require_paths:
527
455
  - lib
@@ -536,8 +464,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
536
464
  - !ruby/object:Gem::Version
537
465
  version: '0'
538
466
  requirements: []
539
- rubygems_version: 3.0.6
540
- signing_key:
467
+ rubygems_version: 3.2.33
468
+ signing_key:
541
469
  specification_version: 4
542
470
  summary: Elasticsearch ODM client wrapper
543
471
  test_files:
@@ -546,53 +474,47 @@ test_files:
546
474
  - spec/chewy/fields/root_spec.rb
547
475
  - spec/chewy/fields/time_fields_spec.rb
548
476
  - spec/chewy/index/actions_spec.rb
477
+ - spec/chewy/index/adapter/active_record_spec.rb
478
+ - spec/chewy/index/adapter/object_spec.rb
549
479
  - spec/chewy/index/aliases_spec.rb
480
+ - spec/chewy/index/import/bulk_builder_spec.rb
481
+ - spec/chewy/index/import/bulk_request_spec.rb
482
+ - spec/chewy/index/import/journal_builder_spec.rb
483
+ - spec/chewy/index/import/routine_spec.rb
484
+ - spec/chewy/index/import_spec.rb
485
+ - spec/chewy/index/mapping_spec.rb
486
+ - spec/chewy/index/observe/active_record_methods_spec.rb
487
+ - spec/chewy/index/observe/callback_spec.rb
488
+ - spec/chewy/index/observe_spec.rb
550
489
  - spec/chewy/index/settings_spec.rb
551
490
  - spec/chewy/index/specification_spec.rb
491
+ - spec/chewy/index/syncer_spec.rb
492
+ - spec/chewy/index/witchcraft_spec.rb
493
+ - spec/chewy/index/wrapper_spec.rb
552
494
  - spec/chewy/index_spec.rb
553
495
  - spec/chewy/journal_spec.rb
554
496
  - spec/chewy/minitest/helpers_spec.rb
555
497
  - spec/chewy/minitest/search_index_receiver_spec.rb
556
- - spec/chewy/query/criteria_spec.rb
557
- - spec/chewy/query/filters_spec.rb
558
- - spec/chewy/query/loading_spec.rb
559
- - spec/chewy/query/nodes/and_spec.rb
560
- - spec/chewy/query/nodes/bool_spec.rb
561
- - spec/chewy/query/nodes/equal_spec.rb
562
- - spec/chewy/query/nodes/exists_spec.rb
563
- - spec/chewy/query/nodes/has_child_spec.rb
564
- - spec/chewy/query/nodes/has_parent_spec.rb
565
- - spec/chewy/query/nodes/match_all_spec.rb
566
- - spec/chewy/query/nodes/missing_spec.rb
567
- - spec/chewy/query/nodes/not_spec.rb
568
- - spec/chewy/query/nodes/or_spec.rb
569
- - spec/chewy/query/nodes/prefix_spec.rb
570
- - spec/chewy/query/nodes/query_spec.rb
571
- - spec/chewy/query/nodes/range_spec.rb
572
- - spec/chewy/query/nodes/raw_spec.rb
573
- - spec/chewy/query/nodes/regexp_spec.rb
574
- - spec/chewy/query/nodes/script_spec.rb
575
- - spec/chewy/query/pagination/kaminari_spec.rb
576
- - spec/chewy/query/pagination/will_paginate_spec.rb
577
- - spec/chewy/query/pagination_spec.rb
578
- - spec/chewy/query_spec.rb
498
+ - spec/chewy/multi_search_spec.rb
579
499
  - spec/chewy/rake_helper_spec.rb
580
500
  - spec/chewy/repository_spec.rb
501
+ - spec/chewy/rspec/build_query_spec.rb
502
+ - spec/chewy/rspec/helpers_spec.rb
581
503
  - spec/chewy/rspec/update_index_spec.rb
582
504
  - spec/chewy/runtime/version_spec.rb
583
505
  - spec/chewy/runtime_spec.rb
584
506
  - spec/chewy/search/loader_spec.rb
585
507
  - spec/chewy/search/pagination/kaminari_examples.rb
586
508
  - spec/chewy/search/pagination/kaminari_spec.rb
587
- - spec/chewy/search/pagination/will_paginate_examples.rb
588
- - spec/chewy/search/pagination/will_paginate_spec.rb
589
509
  - spec/chewy/search/parameters/aggs_spec.rb
590
510
  - spec/chewy/search/parameters/bool_storage_examples.rb
511
+ - spec/chewy/search/parameters/collapse_spec.rb
591
512
  - spec/chewy/search/parameters/docvalue_fields_spec.rb
592
513
  - spec/chewy/search/parameters/explain_spec.rb
593
514
  - spec/chewy/search/parameters/filter_spec.rb
594
515
  - spec/chewy/search/parameters/hash_storage_examples.rb
595
516
  - spec/chewy/search/parameters/highlight_spec.rb
517
+ - spec/chewy/search/parameters/ignore_unavailable_spec.rb
596
518
  - spec/chewy/search/parameters/indices_spec.rb
597
519
  - spec/chewy/search/parameters/integer_storage_examples.rb
598
520
  - spec/chewy/search/parameters/limit_spec.rb
@@ -620,7 +542,7 @@ test_files:
620
542
  - spec/chewy/search/parameters/terminate_after_spec.rb
621
543
  - spec/chewy/search/parameters/timeout_spec.rb
622
544
  - spec/chewy/search/parameters/track_scores_spec.rb
623
- - spec/chewy/search/parameters/types_spec.rb
545
+ - spec/chewy/search/parameters/track_total_hits_spec.rb
624
546
  - spec/chewy/search/parameters/version_spec.rb
625
547
  - spec/chewy/search/parameters_spec.rb
626
548
  - spec/chewy/search/query_proxy_spec.rb
@@ -630,31 +552,13 @@ test_files:
630
552
  - spec/chewy/search_spec.rb
631
553
  - spec/chewy/stash_spec.rb
632
554
  - spec/chewy/strategy/active_job_spec.rb
555
+ - spec/chewy/strategy/atomic_no_refresh_spec.rb
633
556
  - spec/chewy/strategy/atomic_spec.rb
634
- - spec/chewy/strategy/resque_spec.rb
635
- - spec/chewy/strategy/shoryuken_spec.rb
557
+ - spec/chewy/strategy/lazy_sidekiq_spec.rb
636
558
  - spec/chewy/strategy/sidekiq_spec.rb
637
559
  - spec/chewy/strategy_spec.rb
638
- - spec/chewy/type/actions_spec.rb
639
- - spec/chewy/type/adapter/active_record_spec.rb
640
- - spec/chewy/type/adapter/mongoid_spec.rb
641
- - spec/chewy/type/adapter/object_spec.rb
642
- - spec/chewy/type/adapter/sequel_spec.rb
643
- - spec/chewy/type/import/bulk_builder_spec.rb
644
- - spec/chewy/type/import/bulk_request_spec.rb
645
- - spec/chewy/type/import/journal_builder_spec.rb
646
- - spec/chewy/type/import/routine_spec.rb
647
- - spec/chewy/type/import_spec.rb
648
- - spec/chewy/type/mapping_spec.rb
649
- - spec/chewy/type/observe_spec.rb
650
- - spec/chewy/type/syncer_spec.rb
651
- - spec/chewy/type/witchcraft_spec.rb
652
- - spec/chewy/type/wrapper_spec.rb
653
- - spec/chewy/type_spec.rb
654
560
  - spec/chewy_spec.rb
655
561
  - spec/spec_helper.rb
656
562
  - spec/support/active_record.rb
657
563
  - spec/support/class_helpers.rb
658
564
  - spec/support/fail_helpers.rb
659
- - spec/support/mongoid.rb
660
- - spec/support/sequel.rb
data/.travis.yml DELETED
@@ -1,45 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- services:
4
- - mongodb
5
- jdk:
6
- - oraclejdk8
7
- rvm:
8
- - 2.4.3
9
- env:
10
- global:
11
- - TEST_CLUSTER_NODES=1
12
- matrix:
13
- - ES_VERSION=5.6.7
14
- gemfile:
15
- - gemfiles/rails.5.0.activerecord.gemfile
16
- - gemfiles/rails.5.1.activerecord.gemfile
17
- - gemfiles/rails.5.0.mongoid.6.1.gemfile
18
- - gemfiles/rails.5.1.mongoid.6.3.gemfile
19
- - gemfiles/sequel.4.45.gemfile
20
- matrix:
21
- include:
22
- - rvm: 2.2.9
23
- gemfile: gemfiles/rails.4.0.activerecord.gemfile
24
- env: ES_VERSION=2.4.6
25
- - rvm: 2.2.9
26
- gemfile: gemfiles/rails.4.1.activerecord.gemfile
27
- env: ES_VERSION=2.4.6
28
- - rvm: 2.3.6
29
- gemfile: gemfiles/rails.4.2.activerecord.gemfile
30
- env: ES_VERSION=2.4.6
31
- - rvm: 2.3.6
32
- gemfile: gemfiles/rails.4.2.mongoid.5.2.gemfile
33
- env: ES_VERSION=2.4.6
34
- - rvm: 2.5.1
35
- gemfile: gemfiles/rails.5.2.activerecord.gemfile
36
- env: ES_VERSION=5.6.7
37
- before_install:
38
- - curl -s https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz | tar xz -C /tmp
39
- - curl -s https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.7.tar.gz | tar xz -C /tmp
40
- before_script:
41
- - /tmp/elasticsearch-2.4.6/bin/plugin install delete-by-query
42
- - TEST_CLUSTER_COMMAND=/tmp/elasticsearch-$ES_VERSION/bin/elasticsearch TEST_CLUSTER_LOGS=/tmp/log rake es:start
43
- script:
44
- - bundle exec rspec
45
- - bundle exec rubocop