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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 939cf00fb5fe0dc21bd0d88eb7abd7680f89aba5
4
- data.tar.gz: 34fbc8d8115fa7cd2edb302bed384a6625a68b51
3
+ metadata.gz: e23ee6298391cfe3bc938401389e780c3ac547ac
4
+ data.tar.gz: c839ee9ef85c1357eb569cca339964825f1ce45d
5
5
  SHA512:
6
- metadata.gz: a4f328f06e4c3990825a5dbc29333212f7f7acd4addc28526f484042c4cd61713f3e5493fdab91caa2a712038facb509e48039bf7177ef80161484dc563f7e9f
7
- data.tar.gz: 237ba4136dacb3b0aee7377113fce3a95841d9681bfb4e810328b483a45d163f58d566fa64ecee9b1c5e766aedebdc1ff0339af8d7bc01dbc81052c087e79fe3
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
@@ -1,3 +1,3 @@
1
1
  module ElasticSearchFramework
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -12,7 +12,7 @@ class ExampleIndexWithId
12
12
 
13
13
  index name: 'example_index'
14
14
 
15
- id :id
15
+ id :number
16
16
 
17
17
  mapping name: 'default', field: :name, type: :string, analyser: :not_analyzed
18
18
 
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(ExampleIndexWithId.description[:id]).to eq :id
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
@@ -49,8 +49,10 @@ RSpec.describe ElasticSearchFramework::Repository do
49
49
 
50
50
  describe '#CRUD' do
51
51
  before do
52
- ExampleIndex.delete
53
- ExampleIndex.create
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
- ExampleIndex.delete
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_search_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage