elastic_search_framework 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elastic_search_framework/repository.rb +1 -1
- data/lib/elastic_search_framework/version.rb +1 -1
- data/spec/example_index.rb +1 -1
- data/spec/index_spec.rb +2 -1
- data/spec/repository_spec.rb +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e23ee6298391cfe3bc938401389e780c3ac547ac
|
4
|
+
data.tar.gz: c839ee9ef85c1357eb569cca339964825f1ce45d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eb9226a2e1cdf367d4a61d6f6264be7cb562c8f673b5c44d862edbea793c8b0f71107c841d99803acc9698a4da1a69a0cd705f5c2a9b1288871168fc773f1f1
|
7
|
+
data.tar.gz: 46019ded50e4290cc7a0815f4aa8159f374bc7118e250e1d31466fa3b08298cbfd5704340da724c40d2276e8b4fc331309e9c832f278de686cb56f60fbcded17
|
@@ -14,7 +14,7 @@ module ElasticSearchFramework
|
|
14
14
|
|
15
15
|
unless is_valid_response?(response.code)
|
16
16
|
raise ElasticSearchFramework::Exceptions::IndexError.new(
|
17
|
-
"An error occurred setting an index document. Response: #{response.body}"
|
17
|
+
"An error occurred setting an index document. Response: #{response.body} | Code: #{response.code}"
|
18
18
|
)
|
19
19
|
end
|
20
20
|
return true
|
data/spec/example_index.rb
CHANGED
data/spec/index_spec.rb
CHANGED
@@ -4,7 +4,8 @@ RSpec.describe ElasticSearchFramework::Index do
|
|
4
4
|
it 'should return the index details' do
|
5
5
|
expect(ExampleIndex.description).to be_a(Hash)
|
6
6
|
expect(ExampleIndex.description[:name]).to eq 'example_index'
|
7
|
-
expect(
|
7
|
+
expect(ExampleIndex.description[:id]).to eq :id
|
8
|
+
expect(ExampleIndexWithId.description[:id]).to eq :number
|
8
9
|
expect(ExampleIndexWithShard.description[:shards]).to eq 1
|
9
10
|
end
|
10
11
|
end
|
data/spec/repository_spec.rb
CHANGED
@@ -49,8 +49,10 @@ RSpec.describe ElasticSearchFramework::Repository do
|
|
49
49
|
|
50
50
|
describe '#CRUD' do
|
51
51
|
before do
|
52
|
-
|
53
|
-
|
52
|
+
ElasticSearchFramework.namespace = 'test'
|
53
|
+
ElasticSearchFramework.namespace_delimiter = '_'
|
54
|
+
ExampleIndexWithId.delete
|
55
|
+
ExampleIndexWithId.create
|
54
56
|
end
|
55
57
|
|
56
58
|
it 'should create, read and delete an index document' do
|
@@ -71,7 +73,7 @@ RSpec.describe ElasticSearchFramework::Repository do
|
|
71
73
|
end
|
72
74
|
|
73
75
|
after do
|
74
|
-
|
76
|
+
ExampleIndexWithId.delete
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
@@ -116,4 +118,4 @@ RSpec.describe ElasticSearchFramework::Repository do
|
|
116
118
|
end
|
117
119
|
end
|
118
120
|
|
119
|
-
end
|
121
|
+
end
|