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 +4 -4
- data/README.md +4 -0
- data/lib/artirix_data_models/fake_response_factory.rb +3 -3
- data/lib/artirix_data_models/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5cd27c81ed51ee2b3048a27a72b014a21b211754
|
|
4
|
+
data.tar.gz: 59b9aeae55c509714459b856ce368d72df942cc9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
},
|
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.
|
|
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
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|