quickpep 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/quickpep.rb +23 -4
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d221c7f20a31b411a07147262470f088abb5f80805a04cbda3f03c07680b2f9
|
4
|
+
data.tar.gz: cf6608382d9ff856726a0975665cc7164c527338785a557d6534b60e5e7356d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 046bbc33232ec683591919720f587bac94c429fceaadf02a8ddc1f871489cabcc006a6577fa17d0c1f562489f6a4eac304a26dc2d15f88124f01cf5d87292558
|
7
|
+
data.tar.gz: c24f96ace7b00886716e5e1d2a928331738aef23d8f2a467dddb65d6941dbd4a5d4959aa13febae7cdc52743c59669711c8820bb9929e3493429765c892a664d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/quickpep.rb
CHANGED
@@ -23,6 +23,24 @@ class QuickPep
|
|
23
23
|
|
24
24
|
end
|
25
25
|
|
26
|
+
def annual_costs()
|
27
|
+
|
28
|
+
a = @date_events.map do |date, title|
|
29
|
+
|
30
|
+
amount = @h[title].amount
|
31
|
+
|
32
|
+
prefix = amount[0] == '+' ? '' : '-'
|
33
|
+
amountx = (prefix + amount.gsub(/\D/,'')).to_f
|
34
|
+
|
35
|
+
[date, title, amountx]
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
a.group_by {|date,title, amount| title }\
|
40
|
+
.map {|key, rows| [key, rows.map(&:last).sum]}.sort_by(&:last)
|
41
|
+
|
42
|
+
end
|
43
|
+
|
26
44
|
def warnings()
|
27
45
|
@warnings.each {|warning| puts warning.warn }
|
28
46
|
end
|
@@ -33,9 +51,9 @@ class QuickPep
|
|
33
51
|
|
34
52
|
dx = Dynarex.new(s)
|
35
53
|
|
36
|
-
h = dx.all.map {|x| [x.title, x]}.to_h
|
54
|
+
@h = dx.all.map {|x| [x.title, x]}.to_h
|
37
55
|
|
38
|
-
date_events = dx.all.flat_map do |rx|
|
56
|
+
@date_events = dx.all.flat_map do |rx|
|
39
57
|
|
40
58
|
title = [rx.title, rx.day, rx.recurring].join(' ')
|
41
59
|
puts '1. title: ' + title.inspect if @debug
|
@@ -51,8 +69,9 @@ class QuickPep
|
|
51
69
|
|
52
70
|
# opening balance
|
53
71
|
bal = @balance
|
72
|
+
@warnings = []
|
54
73
|
|
55
|
-
a = date_events.map do |date, title|
|
74
|
+
a = @date_events.map do |date, title|
|
56
75
|
|
57
76
|
if @debug then
|
58
77
|
puts '2. title: ' + title.inspect
|
@@ -60,7 +79,7 @@ class QuickPep
|
|
60
79
|
end
|
61
80
|
|
62
81
|
credit, debit = 0.0, 0.0
|
63
|
-
amount = h[title].amount
|
82
|
+
amount = @h[title].amount
|
64
83
|
|
65
84
|
if amount[0] == '+' then
|
66
85
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quickpep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
kmcJnzHNiVwSBry7rnILYU3ouLJeHEtQY1v/S4KqPXGNS1FPvas3Wb429Cui2LtB
|
36
36
|
CkYfvLZCZS1SZGB2dGilreNS
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-04-
|
38
|
+
date: 2022-04-03 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: event_nlp
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: '0.6'
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.6.
|
49
|
+
version: 0.6.6
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
version: '0.6'
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.6.
|
59
|
+
version: 0.6.6
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: dynarex
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|