treasurer 0.10.1 → 0.10.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
- data/VERSION +1 -1
- data/lib/treasurer/account_choices.rb +16 -6
- data/treasurer.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 249db1dc1774f493ec37945307fa75c56d47977e4e1f6ae6f420b72209bd3736
|
4
|
+
data.tar.gz: eb97e9cb0eb1b45ec0465fa25344a12c7d4c37f368e699d4527139da6031a3bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a061e81250674481ef0544e4d5a8906e6dcfd6bc40c37210366220e02fc33d1bac19792bab8c046022a354a1326b9b62299982e8d9bc02d7d9df37556dbb131
|
7
|
+
data.tar.gz: 3339deaaf6171c6fb1e71faf3ac51b162f6cea9045685b58e485acbab2d9f9e8e345ada4f6a1506d3166aaac2982b9d8fe4a17e21d05569d8da3258c772ea018
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.2
|
@@ -159,6 +159,8 @@ class CodeRunner::Budget
|
|
159
159
|
def get_new_choices
|
160
160
|
ext_account = nil
|
161
161
|
chosen = false
|
162
|
+
transactions = runner.component_run_list.values.sort_by{|r| r.date}
|
163
|
+
idx = transactions.index(self)
|
162
164
|
Dir.chdir(@runner.root_folder) do
|
163
165
|
sym = nil
|
164
166
|
while not chosen
|
@@ -169,12 +171,19 @@ class CodeRunner::Budget
|
|
169
171
|
puts Terminal.default_colour
|
170
172
|
puts
|
171
173
|
puts "-" * data_line.size
|
172
|
-
|
174
|
+
#format = Proc.new{|runs| runs.map{|r| r.signature.map{|d| d.to_s}.join(",")}.join("\n")}
|
175
|
+
format = Proc.new{|runs| runs.map{|r|
|
176
|
+
sprintf("%-40s %5.2f %5.2f %5.2f %12s", r.description, r.deposit, r.withdrawal, r.balance, r.account)
|
177
|
+
}.join("\n")}
|
178
|
+
puts format.call(transactions.slice([idx-10, 0].max, idx-1))
|
179
|
+
puts Terminal::LIGHT_GREEN + format.call([transactions[idx]]) + "<-----" + Terminal.default_colour
|
180
|
+
sz = transactions.size
|
181
|
+
puts format.call(transactions.slice([idx+1, sz].min, [idx+10,sz].min))
|
173
182
|
puts "-" * data_line.size
|
174
183
|
puts
|
175
184
|
puts "Account: " + account
|
176
185
|
puts
|
177
|
-
puts choices.
|
186
|
+
puts choices.map{|k,v| Terminal::LIGHT_GREEN + k + ":" + Terminal.default_colour + v}.join(" ")
|
178
187
|
puts
|
179
188
|
puts "Please choose from the above external accounts for this transaction."
|
180
189
|
puts "If you wish to add a new account type 0. To quit type q"
|
@@ -280,11 +289,12 @@ class CodeRunner::Budget
|
|
280
289
|
if not @external_account
|
281
290
|
@external_account = (
|
282
291
|
get_sqlite_choices[:external_account] or
|
283
|
-
get_old_choices[:external_account]
|
292
|
+
get_old_choices[:external_account] or
|
293
|
+
get_new_choices[:external_account]
|
284
294
|
)
|
285
|
-
if not @external_account
|
286
|
-
raise "No external account for #{data_line}"
|
287
|
-
end
|
295
|
+
#if not @external_account
|
296
|
+
#raise "No external account for #{data_line}"
|
297
|
+
#end
|
288
298
|
end
|
289
299
|
return @external_account
|
290
300
|
end
|
data/treasurer.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: treasurer 0.10.
|
5
|
+
# stub: treasurer 0.10.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "treasurer".freeze
|
9
|
-
s.version = "0.10.
|
9
|
+
s.version = "0.10.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Edmund Highcock".freeze]
|
14
|
-
s.date = "2020-02-
|
14
|
+
s.date = "2020-02-09"
|
15
15
|
s.description = "A simple command line tool for managing accounts and finances. Easily import internet banking spreadsheets and generate sophisticated reports and projections.".freeze
|
16
16
|
s.email = "edmundhighcock@users.sourceforge.net".freeze
|
17
17
|
s.executables = ["treasurer".freeze]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: treasurer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edmund Highcock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|