artirix_data_models 0.7.2 → 0.7.3

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: 380fa6d37b4671df8501052851a1d42394c369f5
4
- data.tar.gz: b440399a0443708118af1764fd357c09198af1a9
3
+ metadata.gz: 5cd27c81ed51ee2b3048a27a72b014a21b211754
4
+ data.tar.gz: 59b9aeae55c509714459b856ce368d72df942cc9
5
5
  SHA512:
6
- metadata.gz: 8c57dae992fcf23e2e63452a1b35e0573074864b32419246d44dd73c79e35683f60e9c82d2a3899553474f5594cf6b051fcf33704576a11e6c2831087f601db6
7
- data.tar.gz: 3581671f094cd423ec2a2ed5b9aebc0fc241d5c367bdd57d7731c9ef0bddb4b09d858c4e1a1cce68c14cb7955071e240f9e1877ee67ebcdceec676dd2cab2f20
6
+ metadata.gz: aca6cfa44ea6e90aa2d23d334b04746b8fb17a3f19978037172c61e441dc9ef415cc1abce14a6f13eff1d6ad56ffc4a3f3fcee14ff96f69904d401720bca7840
7
+ data.tar.gz: 0ecad496fb754b54784c79e05393a847010128b763bccd1a90db9c8d48789c30320f46068d77b905ff5bd417e33249917f70efdd22e1d9bb5fc872af1701c22d
data/README.md CHANGED
@@ -250,6 +250,10 @@ end
250
250
 
251
251
  ## Changes
252
252
 
253
+ ### 0.7.3
254
+
255
+ - `ArtirixDataModels::FakeResponseFactory` when building a response, will try to use `hit[:_index]` and `hit[:_type]`, and use the params `index` and `document_type` if not found.
256
+
253
257
  ### 0.7.2
254
258
 
255
259
  - `EsCollection` now delegates `empty?` to the results.
@@ -73,11 +73,11 @@ class ArtirixDataModels::FakeResponseFactory
73
73
  max_score: total_max_score,
74
74
  hits: result_hits.map.with_index do |hit, index|
75
75
  {
76
- _index: index_name,
77
- _type: document_type,
76
+ _index: hit.fetch(:_index, index_name),
77
+ _type: hit.fetch(:_type, document_type),
78
78
  _id: hit[:id],
79
79
  _score: present_max_score - (index * 8.5),
80
- _source: hit
80
+ _source: hit.except(:_index, :_type)
81
81
  }
82
82
  end
83
83
  },
@@ -1,3 +1,3 @@
1
1
  module ArtirixDataModels
2
- VERSION = '0.7.2'
2
+ VERSION = '0.7.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artirix_data_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Turiño
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2015-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport