arelastic 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arelastic/aggregations/sum.rb +9 -0
- data/lib/arelastic/aggregations.rb +1 -0
- data/test/arelastic/aggregations/sum_test.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 825228d447713a690e532c0865608f0e6c7800039bd04bdb12f03f3a3ef95d46
|
4
|
+
data.tar.gz: ec3aca5096dfec14ff7a40b4f4ef7240f05490934248021185909617ba9289ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 206daea5938e2afa572aeb59c9894edd5a6b27b776242b55db93d6fd760677195d2c065717b2f36212e83a40440767e03736521ed44c5fc8d68c2dbbe82c1a8f
|
7
|
+
data.tar.gz: d8684847e83b09a05255ba4223f0e3bf1fcea2fc02af33d466220fe45150267e3d9e78d1ac27dab35ec046f018e2bf8b97175503110f84ae134d5ef9255cc5aa
|
@@ -14,5 +14,6 @@ require 'arelastic/aggregations/nested'
|
|
14
14
|
require 'arelastic/aggregations/range'
|
15
15
|
require 'arelastic/aggregations/reverse_nested'
|
16
16
|
require 'arelastic/aggregations/sampler'
|
17
|
+
require 'arelastic/aggregations/sum'
|
17
18
|
require 'arelastic/aggregations/terms'
|
18
19
|
require 'arelastic/aggregations/value_count'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class Arelastic::Aggregations::SumTest < Minitest::Test
|
4
|
+
def test_as_elastic
|
5
|
+
aggregation = Arelastic::Aggregations::Sum.new('foo', 'field' => 'bar_count')
|
6
|
+
|
7
|
+
expected = {
|
8
|
+
"foo" => {
|
9
|
+
"sum" => {
|
10
|
+
"field" => "bar_count"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
assert_equal expected, aggregation.as_elastic
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arelastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Higgins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Build Elastic Search queries with objects
|
14
14
|
email: developer@matthewhiggins.com
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- lib/arelastic/aggregations/range.rb
|
36
36
|
- lib/arelastic/aggregations/reverse_nested.rb
|
37
37
|
- lib/arelastic/aggregations/sampler.rb
|
38
|
+
- lib/arelastic/aggregations/sum.rb
|
38
39
|
- lib/arelastic/aggregations/terms.rb
|
39
40
|
- lib/arelastic/aggregations/value_count.rb
|
40
41
|
- lib/arelastic/arities.rb
|
@@ -116,6 +117,7 @@ files:
|
|
116
117
|
- test/arelastic/aggregations/range_test.rb
|
117
118
|
- test/arelastic/aggregations/reverse_nested_test.rb
|
118
119
|
- test/arelastic/aggregations/sampler_test.rb
|
120
|
+
- test/arelastic/aggregations/sum_test.rb
|
119
121
|
- test/arelastic/aggregations/terms_test.rb
|
120
122
|
- test/arelastic/arities/binary_test.rb
|
121
123
|
- test/arelastic/arities/polyadic_test.rb
|