chewy 0.8.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +34 -0
  3. data/.rubocop_todo.yml +44 -0
  4. data/.travis.yml +20 -60
  5. data/Appraisals +15 -40
  6. data/CHANGELOG.md +42 -0
  7. data/Gemfile +1 -0
  8. data/Guardfile +5 -5
  9. data/README.md +155 -6
  10. data/Rakefile +11 -1
  11. data/chewy.gemspec +5 -7
  12. data/gemfiles/rails.3.2.activerecord.gemfile +1 -0
  13. data/gemfiles/rails.3.2.activerecord.kaminari.gemfile +1 -0
  14. data/gemfiles/rails.3.2.activerecord.will_paginate.gemfile +1 -0
  15. data/gemfiles/rails.4.2.activerecord.gemfile +1 -0
  16. data/gemfiles/rails.4.2.activerecord.kaminari.gemfile +1 -0
  17. data/gemfiles/rails.4.2.activerecord.will_paginate.gemfile +1 -0
  18. data/gemfiles/{rails.4.2.mongoid.4.0.0.gemfile → rails.4.2.mongoid.4.0.gemfile} +2 -1
  19. data/gemfiles/{rails.4.2.mongoid.4.0.0.kaminari.gemfile → rails.4.2.mongoid.4.0.kaminari.gemfile} +2 -1
  20. data/gemfiles/{rails.4.2.mongoid.4.0.0.will_paginate.gemfile → rails.4.2.mongoid.4.0.will_paginate.gemfile} +2 -1
  21. data/gemfiles/{rails.4.2.mongoid.5.1.0.gemfile → rails.4.2.mongoid.5.1.gemfile} +2 -1
  22. data/gemfiles/{rails.4.2.mongoid.5.1.0.kaminari.gemfile → rails.4.2.mongoid.5.1.kaminari.gemfile} +2 -1
  23. data/gemfiles/{rails.4.2.mongoid.5.1.0.will_paginate.gemfile → rails.4.2.mongoid.5.1.will_paginate.gemfile} +2 -1
  24. data/gemfiles/{rails.4.0.activerecord.gemfile → rails.5.0.activerecord.gemfile} +4 -2
  25. data/gemfiles/{rails.4.0.mongoid.4.0.0.kaminari.gemfile → rails.5.0.activerecord.kaminari.gemfile} +4 -2
  26. data/gemfiles/{rails.4.0.mongoid.4.0.0.will_paginate.gemfile → rails.5.0.activerecord.will_paginate.gemfile} +4 -2
  27. data/gemfiles/{sequel.4.31.gemfile → sequel.4.38.gemfile} +3 -2
  28. data/lib/chewy.rb +24 -16
  29. data/lib/chewy/backports/deep_dup.rb +1 -1
  30. data/lib/chewy/backports/duplicable.rb +1 -0
  31. data/lib/chewy/config.rb +13 -7
  32. data/lib/chewy/errors.rb +4 -4
  33. data/lib/chewy/fields/base.rb +19 -14
  34. data/lib/chewy/fields/root.rb +11 -9
  35. data/lib/chewy/index.rb +38 -25
  36. data/lib/chewy/index/actions.rb +17 -17
  37. data/lib/chewy/index/settings.rb +3 -4
  38. data/lib/chewy/journal.rb +107 -0
  39. data/lib/chewy/journal/apply.rb +31 -0
  40. data/lib/chewy/journal/clean.rb +24 -0
  41. data/lib/chewy/journal/entry.rb +83 -0
  42. data/lib/chewy/journal/query.rb +87 -0
  43. data/lib/chewy/log_subscriber.rb +8 -8
  44. data/lib/chewy/minitest.rb +1 -0
  45. data/lib/chewy/minitest/helpers.rb +77 -0
  46. data/lib/chewy/minitest/search_index_receiver.rb +80 -0
  47. data/lib/chewy/query.rb +116 -60
  48. data/lib/chewy/query/compose.rb +5 -6
  49. data/lib/chewy/query/criteria.rb +26 -16
  50. data/lib/chewy/query/filters.rb +9 -9
  51. data/lib/chewy/query/loading.rb +2 -2
  52. data/lib/chewy/query/nodes/and.rb +3 -3
  53. data/lib/chewy/query/nodes/base.rb +1 -1
  54. data/lib/chewy/query/nodes/bool.rb +6 -4
  55. data/lib/chewy/query/nodes/equal.rb +6 -6
  56. data/lib/chewy/query/nodes/exists.rb +2 -2
  57. data/lib/chewy/query/nodes/expr.rb +2 -2
  58. data/lib/chewy/query/nodes/field.rb +35 -31
  59. data/lib/chewy/query/nodes/has_child.rb +1 -0
  60. data/lib/chewy/query/nodes/has_parent.rb +1 -0
  61. data/lib/chewy/query/nodes/has_relation.rb +11 -13
  62. data/lib/chewy/query/nodes/match_all.rb +1 -1
  63. data/lib/chewy/query/nodes/missing.rb +2 -2
  64. data/lib/chewy/query/nodes/not.rb +3 -3
  65. data/lib/chewy/query/nodes/or.rb +3 -3
  66. data/lib/chewy/query/nodes/prefix.rb +4 -3
  67. data/lib/chewy/query/nodes/query.rb +3 -3
  68. data/lib/chewy/query/nodes/range.rb +11 -11
  69. data/lib/chewy/query/nodes/raw.rb +1 -1
  70. data/lib/chewy/query/nodes/regexp.rb +15 -11
  71. data/lib/chewy/query/nodes/script.rb +6 -6
  72. data/lib/chewy/query/pagination/will_paginate.rb +2 -2
  73. data/lib/chewy/railtie.rb +3 -3
  74. data/lib/chewy/rake_helper.rb +51 -30
  75. data/lib/chewy/repository.rb +2 -2
  76. data/lib/chewy/rspec.rb +1 -1
  77. data/lib/chewy/rspec/update_index.rb +46 -47
  78. data/lib/chewy/runtime/version.rb +4 -4
  79. data/lib/chewy/search.rb +7 -5
  80. data/lib/chewy/strategy.rb +10 -8
  81. data/lib/chewy/strategy/atomic.rb +2 -2
  82. data/lib/chewy/strategy/base.rb +4 -4
  83. data/lib/chewy/strategy/bypass.rb +1 -2
  84. data/lib/chewy/strategy/sidekiq.rb +2 -0
  85. data/lib/chewy/strategy/urgent.rb +1 -1
  86. data/lib/chewy/type.rb +51 -45
  87. data/lib/chewy/type/adapter/active_record.rb +23 -12
  88. data/lib/chewy/type/adapter/base.rb +4 -4
  89. data/lib/chewy/type/adapter/mongoid.rb +6 -6
  90. data/lib/chewy/type/adapter/object.rb +15 -12
  91. data/lib/chewy/type/adapter/orm.rb +24 -15
  92. data/lib/chewy/type/adapter/sequel.rb +11 -7
  93. data/lib/chewy/type/crutch.rb +4 -3
  94. data/lib/chewy/type/import.rb +51 -32
  95. data/lib/chewy/type/mapping.rb +17 -17
  96. data/lib/chewy/type/observe.rb +9 -7
  97. data/lib/chewy/type/witchcraft.rb +62 -23
  98. data/lib/chewy/type/wrapper.rb +20 -14
  99. data/lib/chewy/version.rb +1 -1
  100. data/lib/generators/chewy/install_generator.rb +3 -3
  101. data/lib/tasks/chewy.rake +28 -23
  102. data/spec/chewy/config_spec.rb +33 -12
  103. data/spec/chewy/fields/base_spec.rb +143 -154
  104. data/spec/chewy/fields/root_spec.rb +22 -20
  105. data/spec/chewy/fields/time_fields_spec.rb +11 -9
  106. data/spec/chewy/index/actions_spec.rb +27 -4
  107. data/spec/chewy/index/aliases_spec.rb +2 -2
  108. data/spec/chewy/index/settings_spec.rb +72 -50
  109. data/spec/chewy/index_spec.rb +95 -43
  110. data/spec/chewy/journal/apply_spec.rb +120 -0
  111. data/spec/chewy/journal/entry_spec.rb +237 -0
  112. data/spec/chewy/journal_spec.rb +173 -0
  113. data/spec/chewy/minitest/helpers_spec.rb +90 -0
  114. data/spec/chewy/minitest/search_index_receiver_spec.rb +120 -0
  115. data/spec/chewy/query/criteria_spec.rb +504 -237
  116. data/spec/chewy/query/filters_spec.rb +94 -66
  117. data/spec/chewy/query/loading_spec.rb +76 -40
  118. data/spec/chewy/query/nodes/and_spec.rb +3 -7
  119. data/spec/chewy/query/nodes/bool_spec.rb +5 -13
  120. data/spec/chewy/query/nodes/equal_spec.rb +20 -20
  121. data/spec/chewy/query/nodes/exists_spec.rb +7 -7
  122. data/spec/chewy/query/nodes/has_child_spec.rb +42 -23
  123. data/spec/chewy/query/nodes/has_parent_spec.rb +42 -23
  124. data/spec/chewy/query/nodes/match_all_spec.rb +2 -2
  125. data/spec/chewy/query/nodes/missing_spec.rb +6 -5
  126. data/spec/chewy/query/nodes/not_spec.rb +3 -7
  127. data/spec/chewy/query/nodes/or_spec.rb +3 -7
  128. data/spec/chewy/query/nodes/prefix_spec.rb +6 -6
  129. data/spec/chewy/query/nodes/query_spec.rb +3 -3
  130. data/spec/chewy/query/nodes/range_spec.rb +19 -19
  131. data/spec/chewy/query/nodes/raw_spec.rb +2 -2
  132. data/spec/chewy/query/nodes/regexp_spec.rb +31 -19
  133. data/spec/chewy/query/nodes/script_spec.rb +5 -5
  134. data/spec/chewy/query/pagination/kaminari_spec.rb +2 -2
  135. data/spec/chewy/query/pagination/will_paginage_spec.rb +6 -7
  136. data/spec/chewy/query/pagination_spec.rb +2 -3
  137. data/spec/chewy/query_spec.rb +208 -145
  138. data/spec/chewy/repository_spec.rb +8 -8
  139. data/spec/chewy/rspec/update_index_spec.rb +180 -111
  140. data/spec/chewy/search_spec.rb +8 -8
  141. data/spec/chewy/strategy/active_job_spec.rb +2 -2
  142. data/spec/chewy/strategy/atomic_spec.rb +4 -1
  143. data/spec/chewy/strategy/resque_spec.rb +2 -2
  144. data/spec/chewy/strategy/sidekiq_spec.rb +2 -2
  145. data/spec/chewy/type/actions_spec.rb +1 -1
  146. data/spec/chewy/type/adapter/active_record_spec.rb +255 -149
  147. data/spec/chewy/type/adapter/mongoid_spec.rb +169 -108
  148. data/spec/chewy/type/adapter/object_spec.rb +56 -40
  149. data/spec/chewy/type/adapter/sequel_spec.rb +248 -163
  150. data/spec/chewy/type/import_spec.rb +78 -47
  151. data/spec/chewy/type/mapping_spec.rb +6 -6
  152. data/spec/chewy/type/observe_spec.rb +20 -14
  153. data/spec/chewy/type/witchcraft_spec.rb +89 -43
  154. data/spec/chewy/type_spec.rb +4 -3
  155. data/spec/chewy_spec.rb +10 -8
  156. data/spec/spec_helper.rb +3 -0
  157. data/spec/support/active_record.rb +1 -1
  158. data/spec/support/class_helpers.rb +10 -11
  159. data/spec/support/mongoid.rb +2 -2
  160. data/spec/support/sequel.rb +1 -1
  161. metadata +65 -35
  162. data/gemfiles/rails.4.0.activerecord.kaminari.gemfile +0 -14
  163. data/gemfiles/rails.4.0.activerecord.will_paginate.gemfile +0 -14
  164. data/gemfiles/rails.4.0.mongoid.4.0.0.gemfile +0 -15
  165. data/gemfiles/rails.4.0.mongoid.5.1.0.gemfile +0 -15
  166. data/gemfiles/rails.4.0.mongoid.5.1.0.kaminari.gemfile +0 -14
  167. data/gemfiles/rails.4.0.mongoid.5.1.0.will_paginate.gemfile +0 -14
  168. data/gemfiles/rails.4.1.activerecord.gemfile +0 -15
  169. data/gemfiles/rails.4.1.activerecord.kaminari.gemfile +0 -14
  170. data/gemfiles/rails.4.1.activerecord.will_paginate.gemfile +0 -14
  171. data/gemfiles/rails.4.1.mongoid.4.0.0.gemfile +0 -15
  172. data/gemfiles/rails.4.1.mongoid.4.0.0.kaminari.gemfile +0 -14
  173. data/gemfiles/rails.4.1.mongoid.4.0.0.will_paginate.gemfile +0 -14
  174. data/gemfiles/rails.4.1.mongoid.5.1.0.gemfile +0 -15
  175. data/gemfiles/rails.4.1.mongoid.5.1.0.kaminari.gemfile +0 -14
  176. data/gemfiles/rails.4.1.mongoid.5.1.0.will_paginate.gemfile +0 -14
  177. data/gemfiles/rails.5.0.0.beta3.activerecord.gemfile +0 -16
  178. data/gemfiles/rails.5.0.0.beta3.activerecord.kaminari.gemfile +0 -16
  179. data/gemfiles/rails.5.0.0.beta3.activerecord.will_paginate.gemfile +0 -15
@@ -22,12 +22,13 @@ describe Chewy::Type do
22
22
  specify { expect { PlacesIndex::City.non_existing_method_call }.to raise_error(NoMethodError) }
23
23
 
24
24
  specify { expect(PlacesIndex::City._default_import_options).to eq({}) }
25
- specify { expect { PlacesIndex::City.default_import_options(invalid_option: "Yeah!") }.to raise_error(ArgumentError) }
25
+ specify { expect { PlacesIndex::City.default_import_options(invalid_option: 'Yeah!') }.to raise_error(ArgumentError) }
26
26
 
27
27
  context 'default_import_options is set' do
28
- before { PlacesIndex::City.default_import_options(batch_size: 500) }
28
+ let(:converter) { -> {} }
29
+ before { PlacesIndex::City.default_import_options(batch_size: 500, raw_import: converter) }
29
30
 
30
- specify { expect(PlacesIndex::City._default_import_options).to eq(batch_size: 500) }
31
+ specify { expect(PlacesIndex::City._default_import_options).to eq(batch_size: 500, raw_import: converter) }
31
32
  end
32
33
  end
33
34
  end
@@ -19,11 +19,11 @@ describe Chewy do
19
19
  end
20
20
  end
21
21
 
22
- specify { expect { described_class.derive_type('developers_index#developers') }.to raise_error Chewy::UnderivableType, /DevelopersIndexIndex/ }
23
- specify { expect { described_class.derive_type('some#developers') }.to raise_error Chewy::UnderivableType, /SomeIndex/ }
24
- specify { expect { described_class.derive_type('borogoves#developers') }.to raise_error Chewy::UnderivableType, /Borogoves/ }
25
- specify { expect { described_class.derive_type('developers#borogoves') }.to raise_error Chewy::UnderivableType, /DevelopersIndex.*borogoves/ }
26
- specify { expect { described_class.derive_type('namespace/autocomplete') }.to raise_error Chewy::UnderivableType, /AutocompleteIndex.*namespace\/autocomplete#type_name/ }
22
+ specify { expect { described_class.derive_type('developers_index#developers') }.to raise_error(Chewy::UnderivableType, /DevelopersIndexIndex/) }
23
+ specify { expect { described_class.derive_type('some#developers') }.to raise_error(Chewy::UnderivableType, /SomeIndex/) }
24
+ specify { expect { described_class.derive_type('borogoves#developers') }.to raise_error(Chewy::UnderivableType, /Borogoves/) }
25
+ specify { expect { described_class.derive_type('developers#borogoves') }.to raise_error(Chewy::UnderivableType, /DevelopersIndex.*borogoves/) }
26
+ specify { expect { described_class.derive_type('namespace/autocomplete') }.to raise_error(Chewy::UnderivableType, %r{AutocompleteIndex.*namespace/autocomplete#type_name}) }
27
27
 
28
28
  specify { expect(described_class.derive_type(DevelopersIndex::Developer)).to eq(DevelopersIndex::Developer) }
29
29
  specify { expect(described_class.derive_type('developers')).to eq(DevelopersIndex::Developer) }
@@ -64,6 +64,7 @@ describe Chewy do
64
64
  it { is_expected.to be < Chewy::Type }
65
65
  its(:name) { should == 'CitiesIndex::City' }
66
66
  its(:index) { should == CitiesIndex }
67
+ its(:derivable_index_name) { should == 'cities' }
67
68
  its(:type_name) { should == 'city' }
68
69
  end
69
70
 
@@ -77,6 +78,7 @@ describe Chewy do
77
78
  it { is_expected.to be < Chewy::Type }
78
79
  its(:name) { should == 'Namespace::CitiesIndex::City' }
79
80
  its(:index) { should == Namespace::CitiesIndex }
81
+ its(:derivable_index_name) { should == 'namespace/cities' }
80
82
  its(:type_name) { should == 'city' }
81
83
  end
82
84
 
@@ -113,7 +115,7 @@ describe Chewy do
113
115
 
114
116
  describe '.client' do
115
117
  let!(:initial_client) { Thread.current[:chewy_client] }
116
- let(:faraday_block) { proc { } }
118
+ let(:faraday_block) { proc {} }
117
119
  let(:mock_client) { double(:client) }
118
120
  let(:expected_client_config) { { transport_options: {} } }
119
121
 
@@ -121,8 +123,8 @@ describe Chewy do
121
123
  Thread.current[:chewy_client] = nil
122
124
  allow(Chewy).to receive_messages(configuration: { transport_options: { proc: faraday_block } })
123
125
 
124
- allow(::Elasticsearch::Client).to receive(:new).with(expected_client_config) do |*args, &passed_block|
125
- # RSpec's `with(…, &block)` was used previously, but doesn't actually do
126
+ allow(::Elasticsearch::Client).to receive(:new).with(expected_client_config) do |*_args, &passed_block|
127
+ # RSpec's `with(..., &block)` was used previously, but doesn't actually do
126
128
  # any verification of the passed block (even of its presence).
127
129
  expect(passed_block.source_location).to eq(faraday_block.source_location)
128
130
 
@@ -6,11 +6,14 @@ begin
6
6
  require 'active_record'
7
7
  require 'sequel'
8
8
  rescue LoadError
9
+ nil
9
10
  end
10
11
 
11
12
  require 'rspec/its'
12
13
  require 'rspec/collection_matchers'
13
14
 
15
+ require 'timecop'
16
+
14
17
  Kaminari::Hooks.init if defined?(::Kaminari)
15
18
 
16
19
  require 'support/fail_helpers'
@@ -25,7 +25,7 @@ module ActiveRecordClassHelpers
25
25
  :active_record
26
26
  end
27
27
 
28
- def stub_model name, superclass = nil, &block
28
+ def stub_model(name, superclass = nil, &block)
29
29
  stub_class(name, superclass || ActiveRecord::Base, &block)
30
30
  end
31
31
  end
@@ -1,31 +1,30 @@
1
1
  module ClassHelpers
2
2
  extend ActiveSupport::Concern
3
3
 
4
- def stub_index name, superclass = nil, &block
5
- stub_class("#{name.to_s.camelize}Index", superclass || Chewy::Index) { index_name = name }
4
+ def stub_index(name, superclass = nil, &block)
5
+ stub_class("#{name.to_s.camelize}Index", superclass || Chewy::Index)
6
6
  .tap { |i| i.class_eval(&block) if block }
7
7
  end
8
8
 
9
- def stub_class name, superclass = nil, &block
9
+ def stub_class(name, superclass = nil, &block)
10
10
  stub_const(name.to_s.camelize, Class.new(superclass || Object, &block))
11
11
  end
12
12
 
13
- def stub_model name, superclass = nil, &block
13
+ def stub_model(_name, _superclass = nil)
14
14
  raise NotImplementedError, 'Seems like no ORM/ODM are loaded, please check your Gemfile'
15
15
  end
16
16
 
17
- def skip_on_version_gte version, message = "Removed from elasticsearch #{version}"
17
+ def skip_on_version_gte(version, message = "Removed from elasticsearch #{version}")
18
18
  skip message if Chewy::Runtime.version >= version
19
19
  end
20
20
 
21
- def skip_on_version_lt version, message = "Only for elasticsearch #{version} and greater"
21
+ def skip_on_version_lt(version, message = "Only for elasticsearch #{version} and greater")
22
22
  skip message if Chewy::Runtime.version < version
23
23
  end
24
24
 
25
- def skip_on_plugin_missing_from_version plugin, version, message = "Plugin '#{plugin}' is missing on elasticsearch > #{version}"
26
- if Chewy::Runtime.version >= version
27
- plugins = Chewy.client.nodes.info(plugins: true)["nodes"].values.map { |item| item["plugins"] }.flatten
28
- skip message unless plugins.find { |item| item["name"] == plugin }
29
- end
25
+ def skip_on_plugin_missing_from_version(plugin, version, message = "Plugin '#{plugin}' is missing on elasticsearch > #{version}")
26
+ return if Chewy::Runtime.version < version
27
+ plugins = Chewy.client.nodes.info(plugins: true)['nodes'].values.map { |item| item['plugins'] }.flatten
28
+ skip message unless plugins.find { |item| item['name'] == plugin }
30
29
  end
31
30
  end
@@ -11,7 +11,7 @@ CONFIG = {
11
11
  uri: 'mongodb://127.0.0.1:27017/chewy_mongoid_test'
12
12
  }
13
13
  }
14
- }
14
+ }.freeze
15
15
 
16
16
  Mongoid.configure do |config|
17
17
  config.load_configuration(CONFIG)
@@ -49,7 +49,7 @@ module MongoidClassHelpers
49
49
  :mongoid
50
50
  end
51
51
 
52
- def stub_model name, superclass = nil, &block
52
+ def stub_model(name, superclass = nil, &block)
53
53
  mixin = "MongoidClassHelpers::#{name.to_s.camelize}".safe_constantize || Mongoid::Document
54
54
  superclass ||= Class.new do
55
55
  include mixin
@@ -1,6 +1,6 @@
1
1
  require 'database_cleaner'
2
2
 
3
- DB = Sequel.sqlite# logger: Logger.new(STDOUT)
3
+ DB = Sequel.sqlite # logger: Logger.new(STDOUT)
4
4
 
5
5
  DB.create_table :countries do
6
6
  primary_key :id
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pyromaniac
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-20 00:00:00.000000000 Z
11
+ date: 2017-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 3.4.0
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 3.4.0
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-its
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +136,34 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: timecop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
139
167
  - !ruby/object:Gem::Dependency
140
168
  name: method_source
141
169
  requirement: !ruby/object:Gem::Requirement
@@ -202,6 +230,8 @@ extra_rdoc_files: []
202
230
  files:
203
231
  - ".gitignore"
204
232
  - ".rspec"
233
+ - ".rubocop.yml"
234
+ - ".rubocop_todo.yml"
205
235
  - ".travis.yml"
206
236
  - Appraisals
207
237
  - CHANGELOG.md
@@ -215,37 +245,19 @@ files:
215
245
  - gemfiles/rails.3.2.activerecord.gemfile
216
246
  - gemfiles/rails.3.2.activerecord.kaminari.gemfile
217
247
  - gemfiles/rails.3.2.activerecord.will_paginate.gemfile
218
- - gemfiles/rails.4.0.activerecord.gemfile
219
- - gemfiles/rails.4.0.activerecord.kaminari.gemfile
220
- - gemfiles/rails.4.0.activerecord.will_paginate.gemfile
221
- - gemfiles/rails.4.0.mongoid.4.0.0.gemfile
222
- - gemfiles/rails.4.0.mongoid.4.0.0.kaminari.gemfile
223
- - gemfiles/rails.4.0.mongoid.4.0.0.will_paginate.gemfile
224
- - gemfiles/rails.4.0.mongoid.5.1.0.gemfile
225
- - gemfiles/rails.4.0.mongoid.5.1.0.kaminari.gemfile
226
- - gemfiles/rails.4.0.mongoid.5.1.0.will_paginate.gemfile
227
- - gemfiles/rails.4.1.activerecord.gemfile
228
- - gemfiles/rails.4.1.activerecord.kaminari.gemfile
229
- - gemfiles/rails.4.1.activerecord.will_paginate.gemfile
230
- - gemfiles/rails.4.1.mongoid.4.0.0.gemfile
231
- - gemfiles/rails.4.1.mongoid.4.0.0.kaminari.gemfile
232
- - gemfiles/rails.4.1.mongoid.4.0.0.will_paginate.gemfile
233
- - gemfiles/rails.4.1.mongoid.5.1.0.gemfile
234
- - gemfiles/rails.4.1.mongoid.5.1.0.kaminari.gemfile
235
- - gemfiles/rails.4.1.mongoid.5.1.0.will_paginate.gemfile
236
248
  - gemfiles/rails.4.2.activerecord.gemfile
237
249
  - gemfiles/rails.4.2.activerecord.kaminari.gemfile
238
250
  - gemfiles/rails.4.2.activerecord.will_paginate.gemfile
239
- - gemfiles/rails.4.2.mongoid.4.0.0.gemfile
240
- - gemfiles/rails.4.2.mongoid.4.0.0.kaminari.gemfile
241
- - gemfiles/rails.4.2.mongoid.4.0.0.will_paginate.gemfile
242
- - gemfiles/rails.4.2.mongoid.5.1.0.gemfile
243
- - gemfiles/rails.4.2.mongoid.5.1.0.kaminari.gemfile
244
- - gemfiles/rails.4.2.mongoid.5.1.0.will_paginate.gemfile
245
- - gemfiles/rails.5.0.0.beta3.activerecord.gemfile
246
- - gemfiles/rails.5.0.0.beta3.activerecord.kaminari.gemfile
247
- - gemfiles/rails.5.0.0.beta3.activerecord.will_paginate.gemfile
248
- - gemfiles/sequel.4.31.gemfile
251
+ - gemfiles/rails.4.2.mongoid.4.0.gemfile
252
+ - gemfiles/rails.4.2.mongoid.4.0.kaminari.gemfile
253
+ - gemfiles/rails.4.2.mongoid.4.0.will_paginate.gemfile
254
+ - gemfiles/rails.4.2.mongoid.5.1.gemfile
255
+ - gemfiles/rails.4.2.mongoid.5.1.kaminari.gemfile
256
+ - gemfiles/rails.4.2.mongoid.5.1.will_paginate.gemfile
257
+ - gemfiles/rails.5.0.activerecord.gemfile
258
+ - gemfiles/rails.5.0.activerecord.kaminari.gemfile
259
+ - gemfiles/rails.5.0.activerecord.will_paginate.gemfile
260
+ - gemfiles/sequel.4.38.gemfile
249
261
  - lib/chewy.rb
250
262
  - lib/chewy/backports/deep_dup.rb
251
263
  - lib/chewy/backports/duplicable.rb
@@ -257,7 +269,15 @@ files:
257
269
  - lib/chewy/index/actions.rb
258
270
  - lib/chewy/index/aliases.rb
259
271
  - lib/chewy/index/settings.rb
272
+ - lib/chewy/journal.rb
273
+ - lib/chewy/journal/apply.rb
274
+ - lib/chewy/journal/clean.rb
275
+ - lib/chewy/journal/entry.rb
276
+ - lib/chewy/journal/query.rb
260
277
  - lib/chewy/log_subscriber.rb
278
+ - lib/chewy/minitest.rb
279
+ - lib/chewy/minitest/helpers.rb
280
+ - lib/chewy/minitest/search_index_receiver.rb
261
281
  - lib/chewy/query.rb
262
282
  - lib/chewy/query/compose.rb
263
283
  - lib/chewy/query/criteria.rb
@@ -330,6 +350,11 @@ files:
330
350
  - spec/chewy/index/aliases_spec.rb
331
351
  - spec/chewy/index/settings_spec.rb
332
352
  - spec/chewy/index_spec.rb
353
+ - spec/chewy/journal/apply_spec.rb
354
+ - spec/chewy/journal/entry_spec.rb
355
+ - spec/chewy/journal_spec.rb
356
+ - spec/chewy/minitest/helpers_spec.rb
357
+ - spec/chewy/minitest/search_index_receiver_spec.rb
333
358
  - spec/chewy/query/criteria_spec.rb
334
359
  - spec/chewy/query/filters_spec.rb
335
360
  - spec/chewy/query/loading_spec.rb
@@ -401,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
401
426
  version: '0'
402
427
  requirements: []
403
428
  rubyforge_project:
404
- rubygems_version: 2.4.8
429
+ rubygems_version: 2.6.8
405
430
  signing_key:
406
431
  specification_version: 4
407
432
  summary: Elasticsearch ODM client wrapper
@@ -414,6 +439,11 @@ test_files:
414
439
  - spec/chewy/index/aliases_spec.rb
415
440
  - spec/chewy/index/settings_spec.rb
416
441
  - spec/chewy/index_spec.rb
442
+ - spec/chewy/journal/apply_spec.rb
443
+ - spec/chewy/journal/entry_spec.rb
444
+ - spec/chewy/journal_spec.rb
445
+ - spec/chewy/minitest/helpers_spec.rb
446
+ - spec/chewy/minitest/search_index_receiver_spec.rb
417
447
  - spec/chewy/query/criteria_spec.rb
418
448
  - spec/chewy/query/filters_spec.rb
419
449
  - spec/chewy/query/loading_spec.rb
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 4.0.0"
6
- gem "activesupport", "~> 4.0.0"
7
- gem "kaminari", "0.16.3", :require => false
8
-
9
- group :test do
10
- gem "guard"
11
- gem "guard-rspec"
12
- end
13
-
14
- gemspec :path => "../"
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 4.0.0"
6
- gem "activesupport", "~> 4.0.0"
7
- gem "will_paginate", :require => false
8
-
9
- group :test do
10
- gem "guard"
11
- gem "guard-rspec"
12
- end
13
-
14
- gemspec :path => "../"
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "mongoid", "> 4.0.0"
6
- gem "activesupport", "~> 4.0.0"
7
- gem "resque", :require => false
8
- gem "sidekiq", :require => false
9
-
10
- group :test do
11
- gem "guard"
12
- gem "guard-rspec"
13
- end
14
-
15
- gemspec :path => "../"
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "mongoid", "> 5.1.0"
6
- gem "activesupport", "~> 4.0.0"
7
- gem "resque", :require => false
8
- gem "sidekiq", :require => false
9
-
10
- group :test do
11
- gem "guard"
12
- gem "guard-rspec"
13
- end
14
-
15
- gemspec :path => "../"
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "mongoid", "> 5.1.0"
6
- gem "activesupport", "~> 4.0.0"
7
- gem "kaminari", "0.16.3", :require => false
8
-
9
- group :test do
10
- gem "guard"
11
- gem "guard-rspec"
12
- end
13
-
14
- gemspec :path => "../"
@@ -1,14 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "mongoid", "> 5.1.0"
6
- gem "activesupport", "~> 4.0.0"
7
- gem "will_paginate", :require => false
8
-
9
- group :test do
10
- gem "guard"
11
- gem "guard-rspec"
12
- end
13
-
14
- gemspec :path => "../"
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 4.1.0"
6
- gem "activesupport", "~> 4.1.0"
7
- gem "resque", :require => false
8
- gem "sidekiq", :require => false
9
-
10
- group :test do
11
- gem "guard"
12
- gem "guard-rspec"
13
- end
14
-
15
- gemspec :path => "../"