elasticsearch-model 7.1.1 → 7.1.2.pre
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e1e98703f1834d64dc969afcc75f107460220a9e213dc128dc5e1015be5a7b
|
4
|
+
data.tar.gz: b44da631182388ef384dcab9f6e9d3626c40bf2b6272ef35c6f4857670320f6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a627d5e725a0a3ffb0476873617e0f5d99f297ac1bad49554b69e1546f28bbc58a6cd3b3e54282d0127ed3da828f187f6dba4dc449bbe51ad8229b0b0167a276
|
7
|
+
data.tar.gz: 35b7bc2cb6161fff40247e4cf76fd789ffbc12c4c2acfb1e8223b567ce799bcb12a9fd8857cf1bdbdb13999a981114b2e46f6054f5a27dfb1d487cb188f86860
|
data/elasticsearch-model.gemspec
CHANGED
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.required_ruby_version = '>= 2.4'
|
43
43
|
|
44
44
|
s.add_dependency 'activesupport', '> 3'
|
45
|
-
s.add_dependency 'elasticsearch', '
|
45
|
+
s.add_dependency 'elasticsearch', '~> 7'
|
46
46
|
s.add_dependency 'hashie'
|
47
47
|
|
48
48
|
s.add_development_dependency 'activemodel', '> 3'
|
@@ -270,7 +270,7 @@ module Elasticsearch
|
|
270
270
|
def index_exists?(options={})
|
271
271
|
target_index = options[:index] || self.index_name
|
272
272
|
|
273
|
-
self.client.indices.exists(index: target_index
|
273
|
+
self.client.indices.exists(index: target_index, ignore: 404)
|
274
274
|
end
|
275
275
|
|
276
276
|
# Deletes the index with corresponding name
|
@@ -85,7 +85,7 @@ module Elasticsearch
|
|
85
85
|
# @return [Array] the list of document types used for retrieving documents
|
86
86
|
#
|
87
87
|
def document_type
|
88
|
-
models.map { |m| m.document_type }
|
88
|
+
models.map { |m| m.document_type }.compact.presence
|
89
89
|
end
|
90
90
|
|
91
91
|
# Get the client common for all models
|
@@ -659,36 +659,6 @@ describe Elasticsearch::Model::Indexing do
|
|
659
659
|
expect(DummyIndexingModel.index_exists?).to be(false)
|
660
660
|
end
|
661
661
|
end
|
662
|
-
|
663
|
-
context 'when the index API raises an error' do
|
664
|
-
|
665
|
-
let(:client) do
|
666
|
-
double('client').tap do |cl|
|
667
|
-
expect(cl).to receive(:indices).and_raise(StandardError)
|
668
|
-
end
|
669
|
-
end
|
670
|
-
|
671
|
-
it 'returns false' do
|
672
|
-
expect(DummyIndexingModel.index_exists?).to be(false)
|
673
|
-
end
|
674
|
-
end
|
675
|
-
|
676
|
-
context 'when the indices.exists API raises an error' do
|
677
|
-
|
678
|
-
let(:client) do
|
679
|
-
double('client', indices: indices)
|
680
|
-
end
|
681
|
-
|
682
|
-
let(:indices) do
|
683
|
-
double('indices').tap do |ind|
|
684
|
-
expect(ind).to receive(:exists).and_raise(StandardError)
|
685
|
-
end
|
686
|
-
end
|
687
|
-
|
688
|
-
it 'returns false' do
|
689
|
-
expect(DummyIndexingModel.index_exists?).to be(false)
|
690
|
-
end
|
691
|
-
end
|
692
662
|
end
|
693
663
|
|
694
664
|
describe '#delete_index!' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.1.
|
4
|
+
version: 7.1.2.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: elasticsearch
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: hashie
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -452,11 +452,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
452
452
|
version: '2.4'
|
453
453
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
454
454
|
requirements:
|
455
|
-
- - "
|
455
|
+
- - ">"
|
456
456
|
- !ruby/object:Gem::Version
|
457
|
-
version:
|
457
|
+
version: 1.3.1
|
458
458
|
requirements: []
|
459
|
-
rubygems_version: 3.1.
|
459
|
+
rubygems_version: 3.1.4
|
460
460
|
signing_key:
|
461
461
|
specification_version: 4
|
462
462
|
summary: ActiveModel/Record integrations for Elasticsearch.
|