chewy 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +34 -0
- data/.rubocop_todo.yml +44 -0
- data/.travis.yml +20 -60
- data/Appraisals +15 -40
- data/CHANGELOG.md +42 -0
- data/Gemfile +1 -0
- data/Guardfile +5 -5
- data/README.md +155 -6
- data/Rakefile +11 -1
- data/chewy.gemspec +5 -7
- data/gemfiles/rails.3.2.activerecord.gemfile +1 -0
- data/gemfiles/rails.3.2.activerecord.kaminari.gemfile +1 -0
- data/gemfiles/rails.3.2.activerecord.will_paginate.gemfile +1 -0
- data/gemfiles/rails.4.2.activerecord.gemfile +1 -0
- data/gemfiles/rails.4.2.activerecord.kaminari.gemfile +1 -0
- data/gemfiles/rails.4.2.activerecord.will_paginate.gemfile +1 -0
- data/gemfiles/{rails.4.2.mongoid.4.0.0.gemfile → rails.4.2.mongoid.4.0.gemfile} +2 -1
- data/gemfiles/{rails.4.2.mongoid.4.0.0.kaminari.gemfile → rails.4.2.mongoid.4.0.kaminari.gemfile} +2 -1
- data/gemfiles/{rails.4.2.mongoid.4.0.0.will_paginate.gemfile → rails.4.2.mongoid.4.0.will_paginate.gemfile} +2 -1
- data/gemfiles/{rails.4.2.mongoid.5.1.0.gemfile → rails.4.2.mongoid.5.1.gemfile} +2 -1
- data/gemfiles/{rails.4.2.mongoid.5.1.0.kaminari.gemfile → rails.4.2.mongoid.5.1.kaminari.gemfile} +2 -1
- data/gemfiles/{rails.4.2.mongoid.5.1.0.will_paginate.gemfile → rails.4.2.mongoid.5.1.will_paginate.gemfile} +2 -1
- data/gemfiles/{rails.4.0.activerecord.gemfile → rails.5.0.activerecord.gemfile} +4 -2
- data/gemfiles/{rails.4.0.mongoid.4.0.0.kaminari.gemfile → rails.5.0.activerecord.kaminari.gemfile} +4 -2
- data/gemfiles/{rails.4.0.mongoid.4.0.0.will_paginate.gemfile → rails.5.0.activerecord.will_paginate.gemfile} +4 -2
- data/gemfiles/{sequel.4.31.gemfile → sequel.4.38.gemfile} +3 -2
- data/lib/chewy.rb +24 -16
- data/lib/chewy/backports/deep_dup.rb +1 -1
- data/lib/chewy/backports/duplicable.rb +1 -0
- data/lib/chewy/config.rb +13 -7
- data/lib/chewy/errors.rb +4 -4
- data/lib/chewy/fields/base.rb +19 -14
- data/lib/chewy/fields/root.rb +11 -9
- data/lib/chewy/index.rb +38 -25
- data/lib/chewy/index/actions.rb +17 -17
- data/lib/chewy/index/settings.rb +3 -4
- data/lib/chewy/journal.rb +107 -0
- data/lib/chewy/journal/apply.rb +31 -0
- data/lib/chewy/journal/clean.rb +24 -0
- data/lib/chewy/journal/entry.rb +83 -0
- data/lib/chewy/journal/query.rb +87 -0
- data/lib/chewy/log_subscriber.rb +8 -8
- data/lib/chewy/minitest.rb +1 -0
- data/lib/chewy/minitest/helpers.rb +77 -0
- data/lib/chewy/minitest/search_index_receiver.rb +80 -0
- data/lib/chewy/query.rb +116 -60
- data/lib/chewy/query/compose.rb +5 -6
- data/lib/chewy/query/criteria.rb +26 -16
- data/lib/chewy/query/filters.rb +9 -9
- data/lib/chewy/query/loading.rb +2 -2
- data/lib/chewy/query/nodes/and.rb +3 -3
- data/lib/chewy/query/nodes/base.rb +1 -1
- data/lib/chewy/query/nodes/bool.rb +6 -4
- data/lib/chewy/query/nodes/equal.rb +6 -6
- data/lib/chewy/query/nodes/exists.rb +2 -2
- data/lib/chewy/query/nodes/expr.rb +2 -2
- data/lib/chewy/query/nodes/field.rb +35 -31
- data/lib/chewy/query/nodes/has_child.rb +1 -0
- data/lib/chewy/query/nodes/has_parent.rb +1 -0
- data/lib/chewy/query/nodes/has_relation.rb +11 -13
- data/lib/chewy/query/nodes/match_all.rb +1 -1
- data/lib/chewy/query/nodes/missing.rb +2 -2
- data/lib/chewy/query/nodes/not.rb +3 -3
- data/lib/chewy/query/nodes/or.rb +3 -3
- data/lib/chewy/query/nodes/prefix.rb +4 -3
- data/lib/chewy/query/nodes/query.rb +3 -3
- data/lib/chewy/query/nodes/range.rb +11 -11
- data/lib/chewy/query/nodes/raw.rb +1 -1
- data/lib/chewy/query/nodes/regexp.rb +15 -11
- data/lib/chewy/query/nodes/script.rb +6 -6
- data/lib/chewy/query/pagination/will_paginate.rb +2 -2
- data/lib/chewy/railtie.rb +3 -3
- data/lib/chewy/rake_helper.rb +51 -30
- data/lib/chewy/repository.rb +2 -2
- data/lib/chewy/rspec.rb +1 -1
- data/lib/chewy/rspec/update_index.rb +46 -47
- data/lib/chewy/runtime/version.rb +4 -4
- data/lib/chewy/search.rb +7 -5
- data/lib/chewy/strategy.rb +10 -8
- data/lib/chewy/strategy/atomic.rb +2 -2
- data/lib/chewy/strategy/base.rb +4 -4
- data/lib/chewy/strategy/bypass.rb +1 -2
- data/lib/chewy/strategy/sidekiq.rb +2 -0
- data/lib/chewy/strategy/urgent.rb +1 -1
- data/lib/chewy/type.rb +51 -45
- data/lib/chewy/type/adapter/active_record.rb +23 -12
- data/lib/chewy/type/adapter/base.rb +4 -4
- data/lib/chewy/type/adapter/mongoid.rb +6 -6
- data/lib/chewy/type/adapter/object.rb +15 -12
- data/lib/chewy/type/adapter/orm.rb +24 -15
- data/lib/chewy/type/adapter/sequel.rb +11 -7
- data/lib/chewy/type/crutch.rb +4 -3
- data/lib/chewy/type/import.rb +51 -32
- data/lib/chewy/type/mapping.rb +17 -17
- data/lib/chewy/type/observe.rb +9 -7
- data/lib/chewy/type/witchcraft.rb +62 -23
- data/lib/chewy/type/wrapper.rb +20 -14
- data/lib/chewy/version.rb +1 -1
- data/lib/generators/chewy/install_generator.rb +3 -3
- data/lib/tasks/chewy.rake +28 -23
- data/spec/chewy/config_spec.rb +33 -12
- data/spec/chewy/fields/base_spec.rb +143 -154
- data/spec/chewy/fields/root_spec.rb +22 -20
- data/spec/chewy/fields/time_fields_spec.rb +11 -9
- data/spec/chewy/index/actions_spec.rb +27 -4
- data/spec/chewy/index/aliases_spec.rb +2 -2
- data/spec/chewy/index/settings_spec.rb +72 -50
- data/spec/chewy/index_spec.rb +95 -43
- data/spec/chewy/journal/apply_spec.rb +120 -0
- data/spec/chewy/journal/entry_spec.rb +237 -0
- data/spec/chewy/journal_spec.rb +173 -0
- data/spec/chewy/minitest/helpers_spec.rb +90 -0
- data/spec/chewy/minitest/search_index_receiver_spec.rb +120 -0
- data/spec/chewy/query/criteria_spec.rb +504 -237
- data/spec/chewy/query/filters_spec.rb +94 -66
- data/spec/chewy/query/loading_spec.rb +76 -40
- data/spec/chewy/query/nodes/and_spec.rb +3 -7
- data/spec/chewy/query/nodes/bool_spec.rb +5 -13
- data/spec/chewy/query/nodes/equal_spec.rb +20 -20
- data/spec/chewy/query/nodes/exists_spec.rb +7 -7
- data/spec/chewy/query/nodes/has_child_spec.rb +42 -23
- data/spec/chewy/query/nodes/has_parent_spec.rb +42 -23
- data/spec/chewy/query/nodes/match_all_spec.rb +2 -2
- data/spec/chewy/query/nodes/missing_spec.rb +6 -5
- data/spec/chewy/query/nodes/not_spec.rb +3 -7
- data/spec/chewy/query/nodes/or_spec.rb +3 -7
- data/spec/chewy/query/nodes/prefix_spec.rb +6 -6
- data/spec/chewy/query/nodes/query_spec.rb +3 -3
- data/spec/chewy/query/nodes/range_spec.rb +19 -19
- data/spec/chewy/query/nodes/raw_spec.rb +2 -2
- data/spec/chewy/query/nodes/regexp_spec.rb +31 -19
- data/spec/chewy/query/nodes/script_spec.rb +5 -5
- data/spec/chewy/query/pagination/kaminari_spec.rb +2 -2
- data/spec/chewy/query/pagination/will_paginage_spec.rb +6 -7
- data/spec/chewy/query/pagination_spec.rb +2 -3
- data/spec/chewy/query_spec.rb +208 -145
- data/spec/chewy/repository_spec.rb +8 -8
- data/spec/chewy/rspec/update_index_spec.rb +180 -111
- data/spec/chewy/search_spec.rb +8 -8
- data/spec/chewy/strategy/active_job_spec.rb +2 -2
- data/spec/chewy/strategy/atomic_spec.rb +4 -1
- data/spec/chewy/strategy/resque_spec.rb +2 -2
- data/spec/chewy/strategy/sidekiq_spec.rb +2 -2
- data/spec/chewy/type/actions_spec.rb +1 -1
- data/spec/chewy/type/adapter/active_record_spec.rb +255 -149
- data/spec/chewy/type/adapter/mongoid_spec.rb +169 -108
- data/spec/chewy/type/adapter/object_spec.rb +56 -40
- data/spec/chewy/type/adapter/sequel_spec.rb +248 -163
- data/spec/chewy/type/import_spec.rb +78 -47
- data/spec/chewy/type/mapping_spec.rb +6 -6
- data/spec/chewy/type/observe_spec.rb +20 -14
- data/spec/chewy/type/witchcraft_spec.rb +89 -43
- data/spec/chewy/type_spec.rb +4 -3
- data/spec/chewy_spec.rb +10 -8
- data/spec/spec_helper.rb +3 -0
- data/spec/support/active_record.rb +1 -1
- data/spec/support/class_helpers.rb +10 -11
- data/spec/support/mongoid.rb +2 -2
- data/spec/support/sequel.rb +1 -1
- metadata +65 -35
- data/gemfiles/rails.4.0.activerecord.kaminari.gemfile +0 -14
- data/gemfiles/rails.4.0.activerecord.will_paginate.gemfile +0 -14
- data/gemfiles/rails.4.0.mongoid.4.0.0.gemfile +0 -15
- data/gemfiles/rails.4.0.mongoid.5.1.0.gemfile +0 -15
- data/gemfiles/rails.4.0.mongoid.5.1.0.kaminari.gemfile +0 -14
- data/gemfiles/rails.4.0.mongoid.5.1.0.will_paginate.gemfile +0 -14
- data/gemfiles/rails.4.1.activerecord.gemfile +0 -15
- data/gemfiles/rails.4.1.activerecord.kaminari.gemfile +0 -14
- data/gemfiles/rails.4.1.activerecord.will_paginate.gemfile +0 -14
- data/gemfiles/rails.4.1.mongoid.4.0.0.gemfile +0 -15
- data/gemfiles/rails.4.1.mongoid.4.0.0.kaminari.gemfile +0 -14
- data/gemfiles/rails.4.1.mongoid.4.0.0.will_paginate.gemfile +0 -14
- data/gemfiles/rails.4.1.mongoid.5.1.0.gemfile +0 -15
- data/gemfiles/rails.4.1.mongoid.5.1.0.kaminari.gemfile +0 -14
- data/gemfiles/rails.4.1.mongoid.5.1.0.will_paginate.gemfile +0 -14
- data/gemfiles/rails.5.0.0.beta3.activerecord.gemfile +0 -16
- data/gemfiles/rails.5.0.0.beta3.activerecord.kaminari.gemfile +0 -16
- data/gemfiles/rails.5.0.0.beta3.activerecord.will_paginate.gemfile +0 -15
data/spec/chewy/type_spec.rb
CHANGED
@@ -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:
|
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
|
-
|
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
|
data/spec/chewy_spec.rb
CHANGED
@@ -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
|
23
|
-
specify { expect { described_class.derive_type('some#developers') }.to raise_error
|
24
|
-
specify { expect { described_class.derive_type('borogoves#developers') }.to raise_error
|
25
|
-
specify { expect { described_class.derive_type('developers#borogoves') }.to raise_error
|
26
|
-
specify { expect { described_class.derive_type('namespace/autocomplete') }.to raise_error
|
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 |*
|
125
|
-
# RSpec's `with(
|
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
|
|
data/spec/spec_helper.rb
CHANGED
@@ -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'
|
@@ -1,31 +1,30 @@
|
|
1
1
|
module ClassHelpers
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
|
-
def stub_index
|
5
|
-
stub_class("#{name.to_s.camelize}Index", superclass || Chewy::Index)
|
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
|
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
|
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
|
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
|
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
|
26
|
-
if Chewy::Runtime.version
|
27
|
-
|
28
|
-
|
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
|
data/spec/support/mongoid.rb
CHANGED
@@ -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
|
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
|
data/spec/support/sequel.rb
CHANGED
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.
|
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:
|
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:
|
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:
|
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.
|
240
|
-
- gemfiles/rails.4.2.mongoid.4.0.
|
241
|
-
- gemfiles/rails.4.2.mongoid.4.0.
|
242
|
-
- gemfiles/rails.4.2.mongoid.5.1.
|
243
|
-
- gemfiles/rails.4.2.mongoid.5.1.
|
244
|
-
- gemfiles/rails.4.2.mongoid.5.1.
|
245
|
-
- gemfiles/rails.5.0.
|
246
|
-
- gemfiles/rails.5.0.
|
247
|
-
- gemfiles/rails.5.0.
|
248
|
-
- gemfiles/sequel.4.
|
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.
|
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 => "../"
|