vfwcash 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fad288b2accf600cf5c0d9521dfcb03806b0a02b
4
- data.tar.gz: 915ad1e593e82b6bc839e76bc42297ffaa42e883
3
+ metadata.gz: c1076bb101739c044d695e87a611f149d72f181d
4
+ data.tar.gz: 0e80c9a791c5e3a12b30f8d63112a9cfadd0a5e7
5
5
  SHA512:
6
- metadata.gz: cdbf7d00ef37cd89f029e439c34be83057a6e18e892054506db7ce6722bbac730a51bcd08073fb00201705b4c72155f9e7eb2423415e262920a69ec510140397
7
- data.tar.gz: 62465959bd75c5bde857c9ebfab3dc605f8221f6b5420f2378b6b078bd49575c87fa59a79731a7c72713c99f4e11b77cdbfb3bf1be8a5ff15fa19d2fa1cbd86b
6
+ metadata.gz: d7869ec15dcdfdcf5dd3f2aa8be2d650e72e12558aeccdf95256a3a836069ce02ddbe20bf8f2a49b40d1753455c1930561e42b86823aff57bc3609a40d4e36db
7
+ data.tar.gz: 31f7f092990d62edf02be26e7c66b0570ee03d9f1cbf6342ef9d4959561f42f4446315c9bce1b4cca5bb0e61479b64f0497fd07b26f2edb06713d398d9d209de
data/lib/models/gcash.rb CHANGED
@@ -60,20 +60,25 @@ module Vfwcash
60
60
  def get_all_balances
61
61
  balances = {checking:{},savings:{}}
62
62
  accts = @checking_funds + @savings_funds
63
+ mbalance = {}
64
+ tmonths.each do |m|
65
+ bom = Date.parse(m+"01")
66
+ eom = bom.end_of_month
67
+ get_fund_balances(bom,eom)
68
+ mbalance[m] = @balances
69
+ end
63
70
  accts.each do |f|
64
71
  acct = CashAccount.find_by(name:f)
65
72
  balances[f] = {}
66
73
  tmonths.each do |m|
67
- bom = Date.parse(m+"01")
68
- eom = bom.end_of_month
69
- balances[f][m] = get_fund_balances(bom,eom)
70
- balances[:checking][m] = @checking
71
- balances[:savings][m] = @savings
74
+ balances[f][m] = mbalance[m][f]
75
+ balances[:checking][m] = mbalance[m][:checking]
76
+ balances[:savings][m] = mbalance[m][:savings]
72
77
  end
73
78
  end
74
79
  @balances = balances
75
80
  @checking = @balances[:checking]
76
- @saving = @balances[:savings]
81
+ @savings = @balances[:savings]
77
82
  end
78
83
 
79
84
  # REPORT Specific Methods
data/lib/vfwcash/api.rb CHANGED
@@ -12,7 +12,6 @@ module Vfwcash
12
12
  @cash = Gcash.new(@config)
13
13
  unless @cash.dates.include?(@date)
14
14
  puts "No transactions exist for #{@date.beginning_of_month}"
15
- exit(0)
16
15
  end
17
16
  end
18
17
 
@@ -1,3 +1,3 @@
1
1
  module Vfwcash
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vfwcash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Alex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-12 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  requirements: []
193
193
  rubyforge_project:
194
- rubygems_version: 2.2.2
194
+ rubygems_version: 2.4.5
195
195
  signing_key:
196
196
  specification_version: 4
197
197
  summary: Simple command line tool/pseudo API to generate PDF reports from GNUCash.