csv2qif 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/.gitignore +19 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +69 -0
  6. data/Rakefile +5 -26
  7. data/bin/csv2qif +3 -7
  8. data/config/amex.yml +14 -0
  9. data/config/amexblue.yml +11 -0
  10. data/config/cash.rb +9 -0
  11. data/config/comdirect.rb +8 -0
  12. data/config/lufthansa.rb +11 -0
  13. data/config/paypal.rb +8 -0
  14. data/config/schwabchecking.rb +9 -0
  15. data/config/schwabone.yml +2 -0
  16. data/csv2qif.gemspec +21 -0
  17. data/lib/csv2qif.rb +8 -5
  18. data/lib/csv2qif/cli.rb +4 -1
  19. data/lib/csv2qif/processor.rb +1 -1
  20. data/lib/csv2qif/qif.rb +1 -1
  21. data/lib/csv2qif/version.rb +3 -0
  22. data/spec/amex_spec.rb +24 -0
  23. data/spec/csv2qif_cli_spec.rb +62 -0
  24. data/spec/data/ab7.csv +481 -0
  25. data/spec/data/ab7.qif.target +2396 -0
  26. data/spec/data/ag7.csv +290 -0
  27. data/spec/data/ag7.qif.target +1441 -0
  28. data/spec/data/c1.csv +75 -0
  29. data/spec/data/c1.qif.target +374 -0
  30. data/spec/data/s1.csv +446 -0
  31. data/spec/data/s1.qif.target +349 -0
  32. data/spec/qif_spec.rb +16 -0
  33. data/spec/spec_helper.rb +4 -0
  34. data/spec/string_ext_spec.rb +22 -0
  35. metadata +86 -70
  36. data/History.txt +0 -4
  37. data/Manifest.txt +0 -27
  38. data/PostInstall.txt +0 -7
  39. data/README.rdoc +0 -48
  40. data/config/amex2008.yml +0 -13
  41. data/config/amexblue2008.yml +0 -13
  42. data/config/lufthansa.yml +0 -10
  43. data/config/website.yml +0 -2
  44. data/script/console +0 -10
  45. data/script/destroy +0 -14
  46. data/script/generate +0 -14
  47. data/script/txt2html +0 -71
  48. data/tasks/rspec.rake +0 -22
  49. data/website/index.html +0 -84
  50. data/website/index.txt +0 -81
  51. data/website/javascripts/rounded_corners_lite.inc.js +0 -285
  52. data/website/stylesheets/screen.css +0 -159
  53. data/website/template.html.erb +0 -50
@@ -0,0 +1,349 @@
1
+ !Type:Bank
2
+ D12/31/2007
3
+ T13970.00
4
+ PFUNDS RECEIVED type: *DEPOSIT
5
+ ^
6
+ D12/24/2007
7
+ T69.68
8
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: LT CAP GAIN REIN
9
+ ^
10
+ D12/24/2007
11
+ T429.44
12
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: ST CAP GAIN REINV.
13
+ ^
14
+ D12/24/2007
15
+ T-69.68
16
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: REINVEST DIVIDEND
17
+ ^
18
+ D12/24/2007
19
+ T-429.44
20
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: REINVEST DIVIDEND
21
+ ^
22
+ D12/21/2007
23
+ T7.51
24
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: CASH DIVIDEND
25
+ ^
26
+ D12/21/2007
27
+ T-7.51
28
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: REINVEST DIVIDEND
29
+ ^
30
+ D12/20/2007
31
+ T106.11
32
+ PU.S. GLOBAL INVESTORS EASTERN EUROPEAN FUND type: ST CAP GAIN REINV.
33
+ ^
34
+ D12/20/2007
35
+ T419.66
36
+ PU.S. GLOBAL INVESTORS EASTERN EUROPEAN FUND type: LT CAP GAIN REIN
37
+ ^
38
+ D12/20/2007
39
+ T-419.66
40
+ PU.S. GLOBAL INVESTORS EASTERN EUROPEAN FUND type: REINVEST DIVIDEND
41
+ ^
42
+ D12/20/2007
43
+ T-106.11
44
+ PU.S. GLOBAL INVESTORS EASTERN EUROPEAN FUND type: REINVEST DIVIDEND
45
+ ^
46
+ D12/19/2007
47
+ T17765.00
48
+ PFUNDS RECEIVED type: *DEPOSIT
49
+ ^
50
+ D12/14/2007
51
+ T13.34
52
+ PSSGA INTL STOCK SELECTION FUND type: LT CAP GAIN REIN
53
+ ^
54
+ D12/14/2007
55
+ T14.61
56
+ PSSGA INTL STOCK SELECTION FUND type: CASH DIVIDEND
57
+ ^
58
+ D12/14/2007
59
+ T-13.34
60
+ PSSGA INTL STOCK SELECTION FUND type: REINVEST DIVIDEND
61
+ ^
62
+ D12/14/2007
63
+ T-14.61
64
+ PSSGA INTL STOCK SELECTION FUND type: REINVEST DIVIDEND
65
+ ^
66
+ D12/14/2007
67
+ T-1589.63
68
+ PAMEX 51311865 type: SCHWAB CHECK
69
+ ^
70
+ D11/29/2007
71
+ T-44.27
72
+ PINTEREST 10/30THRU 11/28 type: MARGIN INTEREST
73
+ ^
74
+ D11/20/2007
75
+ T13200.00
76
+ PFUNDS RECEIVED type: *DEPOSIT
77
+ ^
78
+ D11/19/2007
79
+ T18991.26
80
+ PFUNDS RECEIVED type: *DEPOSIT
81
+ ^
82
+ D11/14/2007
83
+ T-460.01
84
+ PAMEX 51311865 type: SCHWAB CHECK
85
+ ^
86
+ D11/12/2007
87
+ T0.00
88
+ PSUN MICROSYSTEMS INC NEW type: REVERSE SPLIT
89
+ ^
90
+ D11/12/2007
91
+ T0.00
92
+ PSUN MICROSYSTEMS INC XXX1 FOR 4 REVERSE SPLIT type: REVERSE SPLIT
93
+ ^
94
+ D10/30/2007
95
+ T-9.25
96
+ PINTEREST 09/27THRU 10/29 type: MARGIN INTEREST
97
+ ^
98
+ D10/19/2007
99
+ T38.32
100
+ PSSGA INTL STOCK SELECTION FUND type: CASH DIVIDEND
101
+ ^
102
+ D10/19/2007
103
+ T3.55
104
+ PSSGA INTL STOCK SELECTION FUND type: ST CAP GAIN REINV.
105
+ ^
106
+ D10/19/2007
107
+ T41.27
108
+ PSSGA INTL STOCK SELECTION FUND type: LT CAP GAIN REIN
109
+ ^
110
+ D10/19/2007
111
+ T-38.32
112
+ PSSGA INTL STOCK SELECTION FUND type: REINVEST DIVIDEND
113
+ ^
114
+ D10/19/2007
115
+ T-41.27
116
+ PSSGA INTL STOCK SELECTION FUND type: REINVEST DIVIDEND
117
+ ^
118
+ D10/19/2007
119
+ T-3.55
120
+ PSSGA INTL STOCK SELECTION FUND type: REINVEST DIVIDEND
121
+ ^
122
+ D10/15/2007
123
+ T-3809.40
124
+ PAMEX 51311865 type: SCHWAB CHECK
125
+ ^
126
+ D10/03/2007
127
+ T16.00
128
+ PHEWLETT-PACKARD COMPANY type: QUALIFIED DIV
129
+ ^
130
+ D10/01/2007
131
+ T426.81
132
+ PFUNDS RECEIVED type: *DEPOSIT
133
+ ^
134
+ D09/27/2007
135
+ T-15000.00
136
+ PJOURNAL TO 62053433 type: TRF BTWN SCH ACCTS
137
+ ^
138
+ D09/26/2007
139
+ T-26125.00
140
+ PJOURNAL TO 81049758 type: TRF BTWN SCH ACCTS
141
+ ^
142
+ D09/20/2007
143
+ T22605.00
144
+ PFUNDS RECEIVED type: *DEPOSIT
145
+ ^
146
+ D09/19/2007
147
+ T-10000.00
148
+ PIRS 51311865 type: SCHWAB CHECK
149
+ ^
150
+ D09/12/2007
151
+ T-3522.01
152
+ PAMEX 51311865 type: SCHWAB CHECK
153
+ ^
154
+ D08/13/2007
155
+ T-2656.86
156
+ PAMEX 51311865 type: SCHWAB CHECK
157
+ ^
158
+ D08/08/2007
159
+ T17600.00
160
+ PFUNDS RECEIVED type: *DEPOSIT
161
+ ^
162
+ D07/13/2007
163
+ T-655.44
164
+ PAMEX 51311865 type: SCHWAB CHECK
165
+ ^
166
+ D07/12/2007
167
+ T-20000.00
168
+ PWIRED FUNDS DISBURSED type: WIRED FUNDS OUT
169
+ ^
170
+ D07/12/2007
171
+ T-25.00
172
+ PWIRED FUNDS FEE type: SERVICE FEE
173
+ ^
174
+ D07/05/2007
175
+ T16.00
176
+ PHEWLETT-PACKARD COMPANY type: QUALIFIED DIV
177
+ ^
178
+ D07/03/2007
179
+ T16225.00
180
+ PFUNDS RECEIVED type: *DEPOSIT
181
+ ^
182
+ D06/28/2007
183
+ T16.94
184
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: CASH DIVIDEND
185
+ ^
186
+ D06/28/2007
187
+ T-16.94
188
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND type: REINVEST DIVIDEND
189
+ ^
190
+ D06/19/2007
191
+ T-10000.00
192
+ PIRS 51311865 type: SCHWAB CHECK
193
+ ^
194
+ D06/13/2007
195
+ T-1828.01
196
+ PAMEX 51311865 type: SCHWAB CHECK
197
+ ^
198
+ D06/11/2007
199
+ T2545.00
200
+ PFUNDS RECEIVED type: DEPOSIT
201
+ ^
202
+ D06/01/2007
203
+ T22.50
204
+ PINTEL CORP type: QUALIFIED DIV
205
+ ^
206
+ D05/29/2007
207
+ T24200.00
208
+ PFUNDS RECEIVED type: *DEPOSIT
209
+ ^
210
+ D05/21/2007
211
+ T15895.00
212
+ PFUNDS RECEIVED type: *DEPOSIT
213
+ ^
214
+ D05/18/2007
215
+ T-25.00
216
+ PRETURNED CHECK FEE type: SERVICE FEE
217
+ ^
218
+ D05/18/2007
219
+ T-2.22
220
+ PMMPDIV 051107-051707 type: ADJUST DIVIDEND
221
+ ^
222
+ D05/17/2007
223
+ T-2500.00
224
+ PRETURNED CHECK NSF type: RETURNED DEPOSIT
225
+ ^
226
+ D05/17/2007
227
+ T25.00
228
+ PREV INSUFF FUNDS FEE type: SERVICE FEE ADJ
229
+ ^
230
+ D05/16/2007
231
+ T-25.00
232
+ PRETURNED CHECK FEE type: SERVICE FEE
233
+ ^
234
+ D05/15/2007
235
+ T-1.00
236
+ PRETURNED CHECK NSF type: RETURNED DEPOSIT
237
+ ^
238
+ D05/14/2007
239
+ T-2078.35
240
+ PAMEX 51311865 type: SCHWAB CHECK
241
+ ^
242
+ D05/14/2007
243
+ T21615.00
244
+ PFUNDS RECEIVED type: *DEPOSIT
245
+ ^
246
+ D05/10/2007
247
+ T2500.00
248
+ PFUNDS RECEIVED type: *DEPOSIT
249
+ ^
250
+ D05/08/2007
251
+ T1.00
252
+ PFUNDS RECEIVED type: *DEPOSIT
253
+ ^
254
+ D05/07/2007
255
+ T-2500.00
256
+ PSSGA INTL STOCK SELECTION FUND
257
+ ^
258
+ D05/07/2007
259
+ T-5000.00
260
+ PMETZLER/PAYDEN EUROPEAN EMERGING MARKETS FUND
261
+ ^
262
+ D05/07/2007
263
+ T-2500.00
264
+ PU.S. GLOBAL INVESTORS EASTERN EUROPEAN FUND
265
+ ^
266
+ D05/07/2007
267
+ T1792.02
268
+ PMOTOROLA INC
269
+ ^
270
+ D05/07/2007
271
+ T4368.98
272
+ PINTEL CORP
273
+ ^
274
+ D05/07/2007
275
+ T588.64
276
+ PYAHOO INC
277
+ ^
278
+ D04/20/2007
279
+ T-5000.00
280
+ PIRS 51311865 type: SCHWAB CHECK
281
+ ^
282
+ D04/20/2007
283
+ T-10000.00
284
+ PIRS 51311865 type: SCHWAB CHECK
285
+ ^
286
+ D04/13/2007
287
+ T5.00
288
+ PMOTOROLA INC type: QUALIFIED DIV
289
+ ^
290
+ D04/12/2007
291
+ T-782.60
292
+ PAMEX 51311865 type: SCHWAB CHECK
293
+ ^
294
+ D04/12/2007
295
+ T50.00
296
+ PFUNDS RECEIVED type: *DEPOSIT
297
+ ^
298
+ D04/12/2007
299
+ T16483.00
300
+ PFUNDS RECEIVED type: *DEPOSIT
301
+ ^
302
+ D04/12/2007
303
+ T11978.00
304
+ PFUNDS RECEIVED type: *DEPOSIT
305
+ ^
306
+ D04/04/2007
307
+ T16.00
308
+ PHEWLETT-PACKARD COMPANY type: QUALIFIED DIV
309
+ ^
310
+ D03/15/2007
311
+ T-2533.22
312
+ PAMEX 51311865 type: SCHWAB CHECK
313
+ ^
314
+ D03/01/2007
315
+ T22.50
316
+ PINTEL CORP type: QUALIFIED DIV
317
+ ^
318
+ D02/13/2007
319
+ T-3095.41
320
+ PAMEX 51311865 type: SCHWAB CHECK
321
+ ^
322
+ D02/05/2007
323
+ T14893.00
324
+ PFUNDS RECEIVED type: *DEPOSIT
325
+ ^
326
+ D01/30/2007
327
+ T-17000.00
328
+ PWIRED FUNDS DISBURSED type: WIRED FUNDS OUT
329
+ ^
330
+ D01/30/2007
331
+ T-25.00
332
+ PWIRED FUNDS FEE type: SERVICE FEE
333
+ ^
334
+ D01/16/2007
335
+ T5.00
336
+ PMOTOROLA INC type: QUALIFIED DIV
337
+ ^
338
+ D01/12/2007
339
+ T-3293.97
340
+ PAMEX 51311865 type: SCHWAB CHECK
341
+ ^
342
+ D01/10/2007
343
+ T19716.00
344
+ PFUNDS RECEIVED type: DEPOSIT
345
+ ^
346
+ D01/03/2007
347
+ T16.00
348
+ PHEWLETT-PACKARD COMPANY type: QUALIFIED DIV
349
+ ^
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe "QIF" do
4
+
5
+ # Called before each example.
6
+ before(:each) do
7
+ # Do nothing
8
+ end
9
+
10
+ # Called after each example.
11
+ after(:each) do
12
+ # Do nothing
13
+ end
14
+
15
+
16
+ end
@@ -0,0 +1,4 @@
1
+ require 'csv2qif'
2
+
3
+ #require 'mocha'
4
+
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe "String extenssion" do
4
+
5
+ # Called before each example.
6
+ before(:each) do
7
+ # Do nothing
8
+ end
9
+
10
+ # Called after each example.
11
+ after(:each) do
12
+ # Do nothing
13
+ end
14
+
15
+ it "should properly parse amount" do
16
+ "$1,000,000.00".to_f.should == Float(1000000)
17
+ "$1,00".to_f.should == Float(1)
18
+ "-$1.00".to_f.should == Float(-1)
19
+ "$-1.0".to_f.should == Float(-1)
20
+ "$1,0".to_f.should == Float(1)
21
+ end
22
+ end
metadata CHANGED
@@ -1,95 +1,111 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: csv2qif
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Heinrich Klobuczek
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2009-10-08 00:00:00 -07:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: hoe
12
+ date: 2012-09-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
17
22
  type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 2.3.3
24
- version:
25
- description: FIX (describe your package)
26
- email:
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Command line tool csv2qif
31
+ email:
27
32
  - heinrich@mail.com
28
- executables:
33
+ executables:
29
34
  - csv2qif
30
35
  extensions: []
31
-
32
- extra_rdoc_files:
33
- - History.txt
34
- - Manifest.txt
35
- - PostInstall.txt
36
- - website/index.txt
37
- files:
38
- - History.txt
39
- - Manifest.txt
40
- - PostInstall.txt
41
- - README.rdoc
36
+ extra_rdoc_files: []
37
+ files:
38
+ - .gitignore
39
+ - .rspec
40
+ - Gemfile
41
+ - LICENSE.txt
42
+ - README.md
42
43
  - Rakefile
43
44
  - bin/csv2qif
44
- - config/amex2008.yml
45
- - config/amexblue2008.yml
46
- - config/lufthansa.yml
45
+ - config/amex.yml
46
+ - config/amexblue.yml
47
+ - config/cash.rb
48
+ - config/comdirect.rb
49
+ - config/lufthansa.rb
50
+ - config/paypal.rb
51
+ - config/schwabchecking.rb
47
52
  - config/schwabone.yml
48
- - config/website.yml
53
+ - csv2qif.gemspec
49
54
  - lib/csv2qif.rb
50
55
  - lib/csv2qif/cli.rb
51
56
  - lib/csv2qif/defaults.rb
52
57
  - lib/csv2qif/processor.rb
53
58
  - lib/csv2qif/qif.rb
54
59
  - lib/csv2qif/string_ext.rb
55
- - script/console
56
- - script/destroy
57
- - script/generate
58
- - script/txt2html
59
- - tasks/rspec.rake
60
- - website/index.html
61
- - website/index.txt
62
- - website/javascripts/rounded_corners_lite.inc.js
63
- - website/stylesheets/screen.css
64
- - website/template.html.erb
65
- has_rdoc: true
66
- homepage: http://github.com/#{github_username}/#{project_name}
60
+ - lib/csv2qif/version.rb
61
+ - spec/amex_spec.rb
62
+ - spec/csv2qif_cli_spec.rb
63
+ - spec/data/ab7.csv
64
+ - spec/data/ab7.qif.target
65
+ - spec/data/ag7.csv
66
+ - spec/data/ag7.qif.target
67
+ - spec/data/c1.csv
68
+ - spec/data/c1.qif.target
69
+ - spec/data/s1.csv
70
+ - spec/data/s1.qif.target
71
+ - spec/qif_spec.rb
72
+ - spec/spec_helper.rb
73
+ - spec/string_ext_spec.rb
74
+ homepage: ''
67
75
  licenses: []
68
-
69
76
  post_install_message:
70
- rdoc_options:
71
- - --main
72
- - README.rdoc
73
- require_paths:
77
+ rdoc_options: []
78
+ require_paths:
74
79
  - lib
75
- required_ruby_version: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: "0"
80
- version:
81
- required_rubygems_version: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- version: "0"
86
- version:
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
87
92
  requirements: []
88
-
89
- rubyforge_project: csv2qif
90
- rubygems_version: 1.3.5
93
+ rubyforge_project:
94
+ rubygems_version: 1.8.24
91
95
  signing_key:
92
96
  specification_version: 3
93
- summary: FIX (describe your package)
94
- test_files: []
95
-
97
+ summary: Converts csv files to qif according to provided configuration
98
+ test_files:
99
+ - spec/amex_spec.rb
100
+ - spec/csv2qif_cli_spec.rb
101
+ - spec/data/ab7.csv
102
+ - spec/data/ab7.qif.target
103
+ - spec/data/ag7.csv
104
+ - spec/data/ag7.qif.target
105
+ - spec/data/c1.csv
106
+ - spec/data/c1.qif.target
107
+ - spec/data/s1.csv
108
+ - spec/data/s1.qif.target
109
+ - spec/qif_spec.rb
110
+ - spec/spec_helper.rb
111
+ - spec/string_ext_spec.rb