eitil 1.3.8 → 1.3.12
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: 33223cb7e4d6699f037753eb436ebaefc1c50be4d3e3cb046b98c159606f964d
|
4
|
+
data.tar.gz: fdfc5a0394c7844e12e5e9d20b9fd7ba492a750c9f36c528d46b1afe62df5bc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eed402cd2037e081c51e883e7c753ecb4ce62f65e213890c82cc1b774dd10dd5bd4c8eb0a1079955bbdd8a164330bc718e605fad6befd3229470fac81233f3e
|
7
|
+
data.tar.gz: 2735fc3a2d11d735e0ef94e59adcc45f29916d9ddf12a832ecb5fdd31be909aef286e01b939185ef79bfc34a79b0f750bc7f5b1d28efb7a1931e65c08ecc6c95
|
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.12
|
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-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|