elastic_search_framework 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elastic_search_framework/index.rb +1 -1
- data/lib/elastic_search_framework/version.rb +1 -1
- data/spec/example_index.rb +12 -1
- data/spec/index_spec.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939cf00fb5fe0dc21bd0d88eb7abd7680f89aba5
|
4
|
+
data.tar.gz: 34fbc8d8115fa7cd2edb302bed384a6625a68b51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f328f06e4c3990825a5dbc29333212f7f7acd4addc28526f484042c4cd61713f3e5493fdab91caa2a712038facb509e48039bf7177ef80161484dc563f7e9f
|
7
|
+
data.tar.gz: 237ba4136dacb3b0aee7377113fce3a95841d9681bfb4e810328b483a45d163f58d566fa64ecee9b1c5e766aedebdc1ff0339af8d7bc01dbc81052c087e79fe3
|
@@ -138,7 +138,7 @@ module ElasticSearchFramework
|
|
138
138
|
def description
|
139
139
|
hash = self.instance_variable_get(:@elastic_search_index_def)
|
140
140
|
if instance_variable_defined?(:@elastic_search_index_id)
|
141
|
-
hash[:id] = self.instance_variable_get(
|
141
|
+
hash[:id] = self.instance_variable_get(:@elastic_search_index_id)
|
142
142
|
else
|
143
143
|
hash[:id] = :id
|
144
144
|
end
|
data/spec/example_index.rb
CHANGED
@@ -7,6 +7,17 @@ class ExampleIndex
|
|
7
7
|
|
8
8
|
end
|
9
9
|
|
10
|
+
class ExampleIndexWithId
|
11
|
+
extend ElasticSearchFramework::Index
|
12
|
+
|
13
|
+
index name: 'example_index'
|
14
|
+
|
15
|
+
id :id
|
16
|
+
|
17
|
+
mapping name: 'default', field: :name, type: :string, analyser: :not_analyzed
|
18
|
+
|
19
|
+
end
|
20
|
+
|
10
21
|
class ExampleIndexWithShard
|
11
22
|
extend ElasticSearchFramework::Index
|
12
23
|
|
@@ -18,4 +29,4 @@ end
|
|
18
29
|
|
19
30
|
class InvalidExampleIndex
|
20
31
|
extend ElasticSearchFramework::Index
|
21
|
-
end
|
32
|
+
end
|
data/spec/index_spec.rb
CHANGED
@@ -4,6 +4,7 @@ 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
8
|
expect(ExampleIndexWithShard.description[:shards]).to eq 1
|
8
9
|
end
|
9
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_search_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaughanbrittonsage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.6.13
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: A lightweight framework to for working with elastic search.
|