reckon 0.5.4 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +50 -0
- data/.gitignore +3 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +73 -4
- data/Gemfile.lock +1 -45
- data/README.md +84 -33
- data/Rakefile +17 -1
- data/bin/build-new-version.sh +26 -0
- data/bin/reckon +6 -1
- data/lib/reckon.rb +2 -2
- data/lib/reckon/app.rb +140 -194
- data/lib/reckon/csv_parser.rb +2 -7
- data/lib/reckon/date_column.rb +10 -0
- data/lib/reckon/money.rb +48 -48
- data/lib/reckon/options.rb +149 -0
- data/lib/reckon/version.rb +1 -1
- data/reckon.gemspec +1 -3
- data/spec/integration/another_bank_example/input.csv +9 -0
- data/spec/integration/another_bank_example/output.ledger +36 -0
- data/spec/integration/another_bank_example/test_args +1 -0
- data/spec/integration/austrian_example/input.csv +13 -0
- data/spec/integration/austrian_example/output.ledger +52 -0
- data/spec/integration/austrian_example/test_args +2 -0
- data/spec/integration/bom_utf8_file/input.csv +3 -0
- data/spec/integration/bom_utf8_file/output.ledger +4 -0
- data/spec/integration/bom_utf8_file/test_args +3 -0
- data/spec/integration/broker_canada_example/input.csv +12 -0
- data/spec/integration/broker_canada_example/output.ledger +48 -0
- data/spec/integration/broker_canada_example/test_args +1 -0
- data/spec/integration/chase/account_tokens_and_regex/output.ledger +36 -0
- data/spec/integration/chase/account_tokens_and_regex/test_args +2 -0
- data/spec/integration/chase/account_tokens_and_regex/tokens.yml +16 -0
- data/spec/integration/chase/default_account_names/output.ledger +36 -0
- data/spec/integration/chase/default_account_names/test_args +3 -0
- data/spec/integration/chase/input.csv +9 -0
- data/spec/integration/chase/learn_from_existing/learn.ledger +7 -0
- data/spec/integration/chase/learn_from_existing/output.ledger +36 -0
- data/spec/integration/chase/learn_from_existing/test_args +1 -0
- data/spec/integration/chase/simple/output.ledger +36 -0
- data/spec/integration/chase/simple/test_args +1 -0
- data/spec/integration/danish_kroner_nordea_example/input.csv +6 -0
- data/spec/integration/danish_kroner_nordea_example/output.ledger +24 -0
- data/spec/integration/danish_kroner_nordea_example/test_args +1 -0
- data/spec/integration/english_date_example/input.csv +3 -0
- data/spec/integration/english_date_example/output.ledger +12 -0
- data/spec/integration/english_date_example/test_args +1 -0
- data/spec/integration/extratofake/input.csv +24 -0
- data/spec/integration/extratofake/output.ledger +92 -0
- data/spec/integration/extratofake/test_args +1 -0
- data/spec/integration/french_example/input.csv +9 -0
- data/spec/integration/french_example/output.ledger +36 -0
- data/spec/integration/french_example/test_args +2 -0
- data/spec/integration/german_date_example/input.csv +3 -0
- data/spec/integration/german_date_example/output.ledger +12 -0
- data/spec/integration/german_date_example/test_args +1 -0
- data/spec/integration/harder_date_example/input.csv +5 -0
- data/spec/integration/harder_date_example/output.ledger +20 -0
- data/spec/integration/harder_date_example/test_args +1 -0
- data/spec/integration/ing/input.csv +3 -0
- data/spec/integration/ing/output.ledger +12 -0
- data/spec/integration/ing/test_args +1 -0
- data/spec/integration/intuit_mint_example/input.csv +7 -0
- data/spec/integration/intuit_mint_example/output.ledger +28 -0
- data/spec/integration/intuit_mint_example/test_args +1 -0
- data/spec/integration/invalid_header_example/input.csv +6 -0
- data/spec/integration/invalid_header_example/output.ledger +8 -0
- data/spec/integration/invalid_header_example/test_args +1 -0
- data/spec/integration/inversed_credit_card/input.csv +16 -0
- data/spec/integration/inversed_credit_card/output.ledger +64 -0
- data/spec/integration/inversed_credit_card/test_args +1 -0
- data/spec/integration/nationwide/input.csv +4 -0
- data/spec/integration/nationwide/output.ledger +16 -0
- data/spec/integration/nationwide/test_args +1 -0
- data/spec/integration/regression/issue_51_account_tokens/input.csv +8 -0
- data/spec/integration/regression/issue_51_account_tokens/output.ledger +32 -0
- data/spec/integration/regression/issue_51_account_tokens/test_args +4 -0
- data/spec/integration/regression/issue_51_account_tokens/tokens.yml +9 -0
- data/spec/integration/regression/issue_64_date_column/input.csv +3 -0
- data/spec/integration/regression/issue_64_date_column/output.ledger +8 -0
- data/spec/integration/regression/issue_64_date_column/test_args +1 -0
- data/spec/integration/regression/issue_73_account_token_matching/input.csv +2 -0
- data/spec/integration/regression/issue_73_account_token_matching/output.ledger +4 -0
- data/spec/integration/regression/issue_73_account_token_matching/test_args +6 -0
- data/spec/integration/regression/issue_73_account_token_matching/tokens.yml +8 -0
- data/spec/integration/regression/issue_85_date_example/input.csv +2 -0
- data/spec/integration/regression/issue_85_date_example/output.ledger +8 -0
- data/spec/integration/regression/issue_85_date_example/test_args +1 -0
- data/spec/integration/spanish_date_example/input.csv +3 -0
- data/spec/integration/spanish_date_example/output.ledger +12 -0
- data/spec/integration/spanish_date_example/test_args +1 -0
- data/spec/integration/suntrust/input.csv +7 -0
- data/spec/integration/suntrust/output.ledger +28 -0
- data/spec/integration/suntrust/test_args +1 -0
- data/spec/integration/test.sh +83 -0
- data/spec/integration/test_money_column/input.csv +3 -0
- data/spec/integration/test_money_column/output.ledger +8 -0
- data/spec/integration/test_money_column/test_args +1 -0
- data/spec/integration/two_money_columns/input.csv +5 -0
- data/spec/integration/two_money_columns/output.ledger +20 -0
- data/spec/integration/two_money_columns/test_args +1 -0
- data/spec/integration/yyyymmdd_date_example/input.csv +1 -0
- data/spec/integration/yyyymmdd_date_example/output.ledger +4 -0
- data/spec/integration/yyyymmdd_date_example/test_args +1 -0
- data/spec/reckon/app_spec.rb +25 -7
- data/spec/reckon/ledger_parser_spec.rb +2 -2
- data/spec/reckon/money_column_spec.rb +24 -24
- data/spec/reckon/money_spec.rb +13 -32
- data/spec/reckon/options_spec.rb +17 -0
- data/spec/spec_helper.rb +6 -1
- metadata +97 -35
- data/.travis.yml +0 -13
data/spec/spec_helper.rb
CHANGED
@@ -16,13 +16,18 @@ public
|
|
16
16
|
def silence_output
|
17
17
|
# Store the original stderr and stdout in order to restore them later
|
18
18
|
@original_stdout = $stdout
|
19
|
+
@original_stderr = $stderr
|
19
20
|
|
20
21
|
# Redirect stderr and stdout
|
21
|
-
$
|
22
|
+
$stderr = File.new(File.join(File.dirname(__FILE__), 'test_log.txt'), 'w')
|
23
|
+
$stdout = $stderr
|
24
|
+
Reckon::LOGGER.reopen $stderr
|
22
25
|
end
|
23
26
|
|
24
27
|
# Replace stderr and stdout so anything else is output correctly
|
25
28
|
def enable_output
|
26
29
|
$stdout = @original_stdout
|
27
30
|
@original_stdout = nil
|
31
|
+
$stderr = @original_stderr
|
32
|
+
@original_stderr = nil
|
28
33
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reckon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Cantino
|
8
8
|
- BlackEdder
|
9
9
|
- Ben Prew
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-02-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -54,20 +54,6 @@ dependencies:
|
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 1.2.0
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: github_changelog_generator
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
64
|
-
type: :development
|
65
|
-
prerelease: false
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
57
|
- !ruby/object:Gem::Dependency
|
72
58
|
name: chronic
|
73
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,20 +82,6 @@ dependencies:
|
|
96
82
|
- - ">="
|
97
83
|
- !ruby/object:Gem::Version
|
98
84
|
version: 1.5.2
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
name: terminal-table
|
101
|
-
requirement: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: 1.4.2
|
106
|
-
type: :runtime
|
107
|
-
prerelease: false
|
108
|
-
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 1.4.2
|
113
85
|
- !ruby/object:Gem::Dependency
|
114
86
|
name: rchardet
|
115
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,21 +101,23 @@ description: Reckon automagically converts CSV files for use with the command-li
|
|
129
101
|
with the CSV data using Bayesian machine learning.
|
130
102
|
email: andrew@iterationlabs.com
|
131
103
|
executables:
|
104
|
+
- build-new-version.sh
|
132
105
|
- reckon
|
133
106
|
extensions: []
|
134
107
|
extra_rdoc_files: []
|
135
108
|
files:
|
136
109
|
- ".document"
|
110
|
+
- ".github/workflows/ruby.yml"
|
137
111
|
- ".gitignore"
|
138
112
|
- ".ruby-gemset"
|
139
113
|
- ".ruby-version"
|
140
|
-
- ".travis.yml"
|
141
114
|
- CHANGELOG.md
|
142
115
|
- Gemfile
|
143
116
|
- Gemfile.lock
|
144
117
|
- LICENSE
|
145
118
|
- README.md
|
146
119
|
- Rakefile
|
120
|
+
- bin/build-new-version.sh
|
147
121
|
- bin/reckon
|
148
122
|
- lib/reckon.rb
|
149
123
|
- lib/reckon/app.rb
|
@@ -153,6 +127,7 @@ files:
|
|
153
127
|
- lib/reckon/ledger_parser.rb
|
154
128
|
- lib/reckon/logger.rb
|
155
129
|
- lib/reckon/money.rb
|
130
|
+
- lib/reckon/options.rb
|
156
131
|
- lib/reckon/version.rb
|
157
132
|
- reckon.gemspec
|
158
133
|
- spec/data_fixtures/51-sample.csv
|
@@ -184,19 +159,106 @@ files:
|
|
184
159
|
- spec/data_fixtures/tokens.yaml
|
185
160
|
- spec/data_fixtures/two_money_columns.csv
|
186
161
|
- spec/data_fixtures/yyyymmdd_date_example.csv
|
162
|
+
- spec/integration/another_bank_example/input.csv
|
163
|
+
- spec/integration/another_bank_example/output.ledger
|
164
|
+
- spec/integration/another_bank_example/test_args
|
165
|
+
- spec/integration/austrian_example/input.csv
|
166
|
+
- spec/integration/austrian_example/output.ledger
|
167
|
+
- spec/integration/austrian_example/test_args
|
168
|
+
- spec/integration/bom_utf8_file/input.csv
|
169
|
+
- spec/integration/bom_utf8_file/output.ledger
|
170
|
+
- spec/integration/bom_utf8_file/test_args
|
171
|
+
- spec/integration/broker_canada_example/input.csv
|
172
|
+
- spec/integration/broker_canada_example/output.ledger
|
173
|
+
- spec/integration/broker_canada_example/test_args
|
174
|
+
- spec/integration/chase/account_tokens_and_regex/output.ledger
|
175
|
+
- spec/integration/chase/account_tokens_and_regex/test_args
|
176
|
+
- spec/integration/chase/account_tokens_and_regex/tokens.yml
|
177
|
+
- spec/integration/chase/default_account_names/output.ledger
|
178
|
+
- spec/integration/chase/default_account_names/test_args
|
179
|
+
- spec/integration/chase/input.csv
|
180
|
+
- spec/integration/chase/learn_from_existing/learn.ledger
|
181
|
+
- spec/integration/chase/learn_from_existing/output.ledger
|
182
|
+
- spec/integration/chase/learn_from_existing/test_args
|
183
|
+
- spec/integration/chase/simple/output.ledger
|
184
|
+
- spec/integration/chase/simple/test_args
|
185
|
+
- spec/integration/danish_kroner_nordea_example/input.csv
|
186
|
+
- spec/integration/danish_kroner_nordea_example/output.ledger
|
187
|
+
- spec/integration/danish_kroner_nordea_example/test_args
|
188
|
+
- spec/integration/english_date_example/input.csv
|
189
|
+
- spec/integration/english_date_example/output.ledger
|
190
|
+
- spec/integration/english_date_example/test_args
|
191
|
+
- spec/integration/extratofake/input.csv
|
192
|
+
- spec/integration/extratofake/output.ledger
|
193
|
+
- spec/integration/extratofake/test_args
|
194
|
+
- spec/integration/french_example/input.csv
|
195
|
+
- spec/integration/french_example/output.ledger
|
196
|
+
- spec/integration/french_example/test_args
|
197
|
+
- spec/integration/german_date_example/input.csv
|
198
|
+
- spec/integration/german_date_example/output.ledger
|
199
|
+
- spec/integration/german_date_example/test_args
|
200
|
+
- spec/integration/harder_date_example/input.csv
|
201
|
+
- spec/integration/harder_date_example/output.ledger
|
202
|
+
- spec/integration/harder_date_example/test_args
|
203
|
+
- spec/integration/ing/input.csv
|
204
|
+
- spec/integration/ing/output.ledger
|
205
|
+
- spec/integration/ing/test_args
|
206
|
+
- spec/integration/intuit_mint_example/input.csv
|
207
|
+
- spec/integration/intuit_mint_example/output.ledger
|
208
|
+
- spec/integration/intuit_mint_example/test_args
|
209
|
+
- spec/integration/invalid_header_example/input.csv
|
210
|
+
- spec/integration/invalid_header_example/output.ledger
|
211
|
+
- spec/integration/invalid_header_example/test_args
|
212
|
+
- spec/integration/inversed_credit_card/input.csv
|
213
|
+
- spec/integration/inversed_credit_card/output.ledger
|
214
|
+
- spec/integration/inversed_credit_card/test_args
|
215
|
+
- spec/integration/nationwide/input.csv
|
216
|
+
- spec/integration/nationwide/output.ledger
|
217
|
+
- spec/integration/nationwide/test_args
|
218
|
+
- spec/integration/regression/issue_51_account_tokens/input.csv
|
219
|
+
- spec/integration/regression/issue_51_account_tokens/output.ledger
|
220
|
+
- spec/integration/regression/issue_51_account_tokens/test_args
|
221
|
+
- spec/integration/regression/issue_51_account_tokens/tokens.yml
|
222
|
+
- spec/integration/regression/issue_64_date_column/input.csv
|
223
|
+
- spec/integration/regression/issue_64_date_column/output.ledger
|
224
|
+
- spec/integration/regression/issue_64_date_column/test_args
|
225
|
+
- spec/integration/regression/issue_73_account_token_matching/input.csv
|
226
|
+
- spec/integration/regression/issue_73_account_token_matching/output.ledger
|
227
|
+
- spec/integration/regression/issue_73_account_token_matching/test_args
|
228
|
+
- spec/integration/regression/issue_73_account_token_matching/tokens.yml
|
229
|
+
- spec/integration/regression/issue_85_date_example/input.csv
|
230
|
+
- spec/integration/regression/issue_85_date_example/output.ledger
|
231
|
+
- spec/integration/regression/issue_85_date_example/test_args
|
232
|
+
- spec/integration/spanish_date_example/input.csv
|
233
|
+
- spec/integration/spanish_date_example/output.ledger
|
234
|
+
- spec/integration/spanish_date_example/test_args
|
235
|
+
- spec/integration/suntrust/input.csv
|
236
|
+
- spec/integration/suntrust/output.ledger
|
237
|
+
- spec/integration/suntrust/test_args
|
238
|
+
- spec/integration/test.sh
|
239
|
+
- spec/integration/test_money_column/input.csv
|
240
|
+
- spec/integration/test_money_column/output.ledger
|
241
|
+
- spec/integration/test_money_column/test_args
|
242
|
+
- spec/integration/two_money_columns/input.csv
|
243
|
+
- spec/integration/two_money_columns/output.ledger
|
244
|
+
- spec/integration/two_money_columns/test_args
|
245
|
+
- spec/integration/yyyymmdd_date_example/input.csv
|
246
|
+
- spec/integration/yyyymmdd_date_example/output.ledger
|
247
|
+
- spec/integration/yyyymmdd_date_example/test_args
|
187
248
|
- spec/reckon/app_spec.rb
|
188
249
|
- spec/reckon/csv_parser_spec.rb
|
189
250
|
- spec/reckon/date_column_spec.rb
|
190
251
|
- spec/reckon/ledger_parser_spec.rb
|
191
252
|
- spec/reckon/money_column_spec.rb
|
192
253
|
- spec/reckon/money_spec.rb
|
254
|
+
- spec/reckon/options_spec.rb
|
193
255
|
- spec/spec.opts
|
194
256
|
- spec/spec_helper.rb
|
195
257
|
homepage: https://github.com/cantino/reckon
|
196
258
|
licenses:
|
197
259
|
- MIT
|
198
260
|
metadata: {}
|
199
|
-
post_install_message:
|
261
|
+
post_install_message:
|
200
262
|
rdoc_options: []
|
201
263
|
require_paths:
|
202
264
|
- lib
|
@@ -211,8 +273,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
273
|
- !ruby/object:Gem::Version
|
212
274
|
version: '0'
|
213
275
|
requirements: []
|
214
|
-
rubygems_version: 3.
|
215
|
-
signing_key:
|
276
|
+
rubygems_version: 3.2.3
|
277
|
+
signing_key:
|
216
278
|
specification_version: 4
|
217
279
|
summary: Utility for interactively converting and labeling CSV files for the Ledger
|
218
280
|
accounting tool.
|