search_flip 3.0.0.beta3 → 3.0.0.beta4

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
  SHA256:
3
- metadata.gz: 417bf711946ace4812485ea2efdfefdeb36414e7e8e8d8ed24b10b4807050be9
4
- data.tar.gz: c8a9f7392d77f15c4714c40756c032a2bb3bc12c363a9e956a6b9e184c8e4c17
3
+ metadata.gz: ddb0dadc9a92281c24b5ce7f5ba911cf97a9a7d81caecc1da23febf6c497bf91
4
+ data.tar.gz: b0da1b7250010cdd555af7d4cc57ffd388bb2bb8d9b077d8660f2172d7ad15e8
5
5
  SHA512:
6
- metadata.gz: c62c6d3bc17ec18da5b304dfbddbafc29e35013bcc6b0b906858380b01a263b2e534986cd41f9e90d13de99820f9cbf11a173802910737bf33d8ae5653230af1
7
- data.tar.gz: 3b6ee6d16086e451f6f6e6d7c718d6a30c30115d91c6ba9e69113faa19b9abc35d04c8c179dc9ca5ac49418877c0c5828435d71c1dab7b71d4afe2e31da88762
6
+ metadata.gz: 00775bd514c07e991476927bafe5b9ba3696c6edda268188f2f54f8d08ce74456c2ecda08f66aaa510f21559428f35806d6311d7a5e16384cff68869feccd52c
7
+ data.tar.gz: b6eb35784a8c3f54c537340ca3ba7d33b81e683a59c9aa1356bddb1e2bcafe9052ccbc19b15628d19971ca0035fa34a28f1c05b75806b3347ab330d73a4ee28c
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ NewCops: enable
3
+
1
4
  Style/HashTransformValues:
2
5
  Enabled: false
3
6
 
data/.travis.yml CHANGED
@@ -5,7 +5,7 @@ env:
5
5
  - ES_IMAGE=elasticsearch:5.4
6
6
  - ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:6.7.0
7
7
  - ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.0.0
8
- - ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.4.0
8
+ - ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.6.0
9
9
  rvm:
10
10
  - ruby-2.6.2
11
11
  before_install:
@@ -58,10 +58,11 @@ module SearchFlip
58
58
  aggregation = yield(SearchFlip::Aggregation.new(target: target))
59
59
 
60
60
  if field_or_hash.is_a?(Hash)
61
- value = field_or_hash.values.first
62
- value = value.values.first if value.is_a?(Hash) && !value.empty?
61
+ aggregation_hash = field_or_hash.values.first
62
+ aggregation_hash = aggregation_hash[:top_hits] if aggregation_hash.is_a?(Hash) && aggregation_hash.key?(:top_hits)
63
+ aggregation_hash = aggregation_hash["top_hits"] if aggregation_hash.is_a?(Hash) && aggregation_hash.key?("top_hits")
63
64
 
64
- value.merge!(aggregation.to_hash)
65
+ aggregation_hash.merge!(aggregation.to_hash)
65
66
  else
66
67
  hash[field_or_hash].merge!(aggregation.to_hash)
67
68
  end
@@ -1,3 +1,3 @@
1
1
  module SearchFlip
2
- VERSION = "3.0.0.beta3"
2
+ VERSION = "3.0.0.beta4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_flip
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta3
4
+ version: 3.0.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Vetter