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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad27b2e732484f3dd87dab43f5970556944130d3
4
- data.tar.gz: e544ff195387046123ace421f109e26afac7276b
3
+ metadata.gz: 939cf00fb5fe0dc21bd0d88eb7abd7680f89aba5
4
+ data.tar.gz: 34fbc8d8115fa7cd2edb302bed384a6625a68b51
5
5
  SHA512:
6
- metadata.gz: bed96a3e35f0b61bfbabfae074fbb1aed3dd2ce0cc236230b97af0f89f26e521f84e349ad2622ac17bcb9ceb8b29567576c5ae1f8bf085938a2cd63cb98dc28c
7
- data.tar.gz: 19c48dd859d007e6170602df0525389bfbe698fdd8a0b089a039cdd24e1483b721f92658e1348622228383a3ac2b6fb08f7e99dbefbff7eaf2900778ceec5e13
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(@elastic_search_index_id)
141
+ hash[:id] = self.instance_variable_get(:@elastic_search_index_id)
142
142
  else
143
143
  hash[:id] = :id
144
144
  end
@@ -1,3 +1,3 @@
1
1
  module ElasticSearchFramework
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -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.0
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: 2017-10-23 00:00:00.000000000 Z
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.5.1
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.