eitil 1.3.8 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 800a7394bf32ae0a35ac26f8af1f854f90161acc373a3cc346422bb71ff58652
|
4
|
+
data.tar.gz: '04928eaebb9da031a756d431a2b76893c7d69f9084c48da9066631337014510b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07b716769dec7ee55df77d28a4d4fda783868f931f50f8ff44caaa28b28a614c08496ddb1b3c1f6035a4ca6a7ffe98e96547bad2d75872ae5ce3fb20d96b5fa9
|
7
|
+
data.tar.gz: 6795a24f73771f86e40a774cb0ab409288eba5b1e82b5b1e97983fd273ee186d6dda22dac75ee99701e3e321c83b855950fc0e156a877f1f1c62aaaa9b664b37
|
data/eitil_wrapper/README.md
CHANGED
@@ -254,7 +254,10 @@ Calculators are generated through the columns of your model's database table. Wh
|
|
254
254
|
# require "eitil_wrapper/scopes/default_scopes"
|
255
255
|
|
256
256
|
# columns of datatype: array (serialized)
|
257
|
-
.{column_name}_sum
|
257
|
+
.{column_name}_sum # returns all uniq elements in a new, single array
|
258
|
+
.{column_name}_sum_i # sum and map to integer
|
259
|
+
.{column_name}_sum_f # sum and map to float
|
260
|
+
.{column_name}_sum_d # sum and map to decimal
|
258
261
|
|
259
262
|
# columns of datatype: integer
|
260
263
|
.{column_name}_max
|
@@ -18,7 +18,10 @@ module EitilWrapper
|
|
18
18
|
}
|
19
19
|
|
20
20
|
SharableIterableCalculators = -> (_class, column) {
|
21
|
-
_class.eitil_calculator :"#{column}_sum",
|
21
|
+
_class.eitil_calculator :"#{column}_sum", -> { _class.pluck(column).flatten!.uniq! }
|
22
|
+
_class.eitil_calculator :"#{column}_sum_i", -> { _class.pluck(column).flatten!.uniq!.map(&:to_i) }
|
23
|
+
_class.eitil_calculator :"#{column}_sum_f", -> { _class.pluck(column).flatten!.uniq!.map(&:to_f) }
|
24
|
+
_class.eitil_calculator :"#{column}_sum_d", -> { _class.pluck(column).flatten!.uniq!.map(&:to_d) }
|
22
25
|
}
|
23
26
|
|
24
27
|
def inherited(subclass)
|
data/lib/eitil/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eitil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurriaan Schrofer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|