logstash-filter-alkivi_prices 1.0.0 → 1.0.1

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: 9ca68756a27ad08268cd1f4aeab58719c9138c4b1baae0a064d9cb62c42a2103
4
- data.tar.gz: 3c2baed431de0cb52cc4c24c6c537f843beb4e0a8174a6e2cfd0401277981246
3
+ metadata.gz: 46e54cddaf6440cdffcfc560a86d780a22ee4510abba91aeee000307ae01544d
4
+ data.tar.gz: 61ddb6424001624bd32b4799010fc85f0582bc5c09b3cfd8a1d0018c0c337fcd
5
5
  SHA512:
6
- metadata.gz: '092963c69937664debf40e67b80e6dcae861ca218c3696c1503f469c5e2a33e495273b1ba5101d0d3f7f45bfe35803e4737dbab6b7b99196a5cc49ed5e3ebf49'
7
- data.tar.gz: 1bfb5ddcfe84f6dc100d529810c5213f5312751aa7c7877c6bfac107d186df7e558d5d9d9665906d4b5569c9b0ab7c640423e6f14221794872ea1ac0c2b3fac2
6
+ metadata.gz: 649771e98b61b2ed991acc1cfd017ff9640fb18bbad4b758297387b2b04ed19862a202f9b6dcfdfe1af00c48e239e022fab0a2572f3aa37016fab2874fbe3353
7
+ data.tar.gz: 7f04d117bc16af6555d4d685021726a718654ab1a339e037622254b1a71904180f9ed9c5f64ae35766829c11698577410345b778488da7af1f18c1bb08776534
@@ -84,14 +84,14 @@ class LogStash::Filters::AlkiviPrices < LogStash::Filters::Base
84
84
 
85
85
  if billsec
86
86
  if costs_line
87
- cost0 = billsec.to_f / 60 * costs_line["prix0"].to_f
88
- cost1 = billsec.to_f / 60 * costs_line["prix1"].to_f
89
- cost2 = billsec.to_f / 60 * costs_line["prix2"].to_f
87
+ cost0 = (billsec.to_f / 60 * costs_line["prix0"].to_f).round(6)
88
+ cost1 = (billsec.to_f / 60 * costs_line["prix1"].to_f).round(6)
89
+ cost2 = (billsec.to_f / 60 * costs_line["prix2"].to_f).round(6)
90
90
  end
91
91
  if prices_line
92
- price0 = billsec.to_f / 60 * prices_line["prix0"].to_f
93
- price1 = billsec.to_f / 60 * prices_line["prix1"].to_f
94
- price2 = billsec.to_f / 60 * prices_line["prix2"].to_f
92
+ price0 = (billsec.to_f / 60 * prices_line["prix0"].to_f).round(6)
93
+ price1 = (billsec.to_f / 60 * prices_line["prix1"].to_f).round(6)
94
+ price2 = (billsec.to_f / 60 * prices_line["prix2"].to_f).round(6)
95
95
  end
96
96
  end
97
97
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-alkivi_prices'
3
- s.version = '1.0.0'
3
+ s.version = '1.0.1'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Parse CRD to add cost and prices.'
6
6
  s.homepage = 'https://github.com/alkivi-sas/logstash-filter-alkivi_prices'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-alkivi_prices
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alkivi