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: 62c186ffdd14894a3ed5ce9d6a635030821ab1bdc86aa5ad7f35c7d1a3592dca
4
- data.tar.gz: b53791e40cd28e1f6435e9cbc2888c57e26ca6f5d05b3cb3518f7285a6311618
3
+ metadata.gz: 33223cb7e4d6699f037753eb436ebaefc1c50be4d3e3cb046b98c159606f964d
4
+ data.tar.gz: fdfc5a0394c7844e12e5e9d20b9fd7ba492a750c9f36c528d46b1afe62df5bc4
5
5
  SHA512:
6
- metadata.gz: 869d88f962e7a688b203d0f5e89132ce5f343975d6ce1a0c926691454027c5935073086766c5d0febb28be0108ca8a183f106cfb32b8314f50046dbffd6d68c7
7
- data.tar.gz: 3ebe01d21f32cc00c3e9c84b9937b71d9e1aa46590f5b0384c18d28e0a1d6706a161cab34c58bdb2a0b59c2a8883dcf1371bcd928f645b8c6fadcdd6057143c4
6
+ metadata.gz: 5eed402cd2037e081c51e883e7c753ecb4ce62f65e213890c82cc1b774dd10dd5bd4c8eb0a1079955bbdd8a164330bc718e605fad6befd3229470fac81233f3e
7
+ data.tar.gz: 2735fc3a2d11d735e0ef94e59adcc45f29916d9ddf12a832ecb5fdd31be909aef286e01b939185ef79bfc34a79b0f750bc7f5b1d28efb7a1931e65c08ecc6c95
@@ -4,6 +4,7 @@ module EitilSupport::Stack::Audit
4
4
 
5
5
  private
6
6
 
7
+ after_create :add_stacktrace_to_audit
7
8
  after_update :add_stacktrace_to_audit
8
9
 
9
10
  def add_stacktrace_to_audit
@@ -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 # returns all uniq elements in a new, single array
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", -> { _class.pluck(column).flatten!.uniq! }
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
@@ -1,5 +1,5 @@
1
1
  module Eitil
2
2
 
3
- VERSION = '1.3.8'
3
+ VERSION = '1.3.12'
4
4
 
5
5
  end
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.8
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-05 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails