coop_to_ofx 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/README.rdoc +38 -0
  2. data/Rakefile +141 -0
  3. data/bin/coop_to_ofx +60 -0
  4. data/lib/coop_scraper/base.rb +8 -0
  5. data/lib/coop_scraper/credit_card.rb +94 -0
  6. data/lib/coop_scraper/current_account.rb +92 -0
  7. data/lib/coop_scraper/version.rb +12 -0
  8. data/lib/coop_scraper.rb +2 -0
  9. data/lib/ofx/statement/base.rb +53 -0
  10. data/lib/ofx/statement/credit_card.rb +15 -0
  11. data/lib/ofx/statement/current_account.rb +14 -0
  12. data/lib/ofx/statement/output/base.rb +131 -0
  13. data/lib/ofx/statement/output/builder.rb +76 -0
  14. data/lib/ofx/statement/output/credit_card.rb +31 -0
  15. data/lib/ofx/statement/output/current_account.rb +29 -0
  16. data/lib/ofx/statement/transaction.rb +52 -0
  17. data/lib/ofx/statement.rb +3 -0
  18. data/lib/ofx.rb +1 -0
  19. data/spec/coop_scraper/base_spec.rb +15 -0
  20. data/spec/coop_scraper/credit_card_spec.rb +229 -0
  21. data/spec/coop_scraper/current_account_spec.rb +154 -0
  22. data/spec/fixtures/credit_card/cc_statement_fixture.html +927 -0
  23. data/spec/fixtures/credit_card/foreign_transaction_fixture.html +447 -0
  24. data/spec/fixtures/credit_card/interest_transaction_fixture.html +438 -0
  25. data/spec/fixtures/credit_card/maybe.txt +43 -0
  26. data/spec/fixtures/credit_card/merchandise_interest_fixture.html +0 -0
  27. data/spec/fixtures/credit_card/normal_transaction_fixture.html +439 -0
  28. data/spec/fixtures/credit_card/overlimit_charge_fixture.html +446 -0
  29. data/spec/fixtures/credit_card/payment_in_transaction_fixture.html +439 -0
  30. data/spec/fixtures/credit_card/simple_cc_statement.ofx +43 -0
  31. data/spec/fixtures/credit_card/statement_with_interest_line_fixture.html +452 -0
  32. data/spec/fixtures/current_account/cash_point_transaction_fixture.html +372 -0
  33. data/spec/fixtures/current_account/current_account_fixture.html +420 -0
  34. data/spec/fixtures/current_account/current_account_fixture.ofx +83 -0
  35. data/spec/fixtures/current_account/debit_interest_transaction_fixture.html +372 -0
  36. data/spec/fixtures/current_account/no_transactions_fixture.html +364 -0
  37. data/spec/fixtures/current_account/normal_transaction_fixture.html +372 -0
  38. data/spec/fixtures/current_account/payment_in_transaction_fixture.html +372 -0
  39. data/spec/fixtures/current_account/service_charge_transaction_fixture.html +372 -0
  40. data/spec/fixtures/current_account/transfer_transaction_fixture.html +372 -0
  41. data/spec/ofx/statement/base_spec.rb +116 -0
  42. data/spec/ofx/statement/credit_card_spec.rb +20 -0
  43. data/spec/ofx/statement/current_account_spec.rb +20 -0
  44. data/spec/ofx/statement/output/base_spec.rb +249 -0
  45. data/spec/ofx/statement/output/builder_spec.rb +38 -0
  46. data/spec/ofx/statement/output/credit_card_spec.rb +84 -0
  47. data/spec/ofx/statement/output/current_account_spec.rb +81 -0
  48. data/spec/ofx/statement/transaction_spec.rb +76 -0
  49. data/spec/spec.opts +2 -0
  50. data/spec/spec_helper.rb +36 -0
  51. metadata +172 -0
metadata ADDED
@@ -0,0 +1,172 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: coop_to_ofx
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Matt Patterson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-10 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hpricot
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 0.6.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: builder
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 2.1.0
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rspec
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ description: |-
46
+ Convert statement HTML from the Co-operative bank's online banking system to OFX for import into financial apps.
47
+
48
+ = Usage
49
+
50
+ For a Current Account:
51
+
52
+ 1. Save the HTML source of the statement page.
53
+
54
+ coop_to_ofx --current /path/to/statement.html
55
+
56
+ Will produce /path/to/statement.ofx
57
+
58
+ For a Credit Card:
59
+
60
+ 1. Save the HTML source of the statement page
61
+
62
+ coop_to_ofx /path/to/statement.html
63
+
64
+ Or
65
+
66
+ coop_to_ofx --credit /path/to/statement.html
67
+
68
+ Will produce /path/to/statement.ofx
69
+
70
+
71
+ To produce OFX 1 SGML (rather than OFX 2 XML):
72
+
73
+ coop_to_ofx --ofx1 /path/to/statement.html
74
+ coop_to_ofx --ofx1 --current /path/to/statement.html
75
+
76
+ To show all the options:
77
+
78
+ coop_to_ofx --help
79
+
80
+
81
+ == To do
82
+
83
+ XML / SGML validation of output against the specs
84
+ email: matt@reprocessed.org
85
+ executables:
86
+ - coop_to_ofx
87
+ extensions: []
88
+
89
+ extra_rdoc_files:
90
+ - README.rdoc
91
+ files:
92
+ - Rakefile
93
+ - README.rdoc
94
+ - bin/coop_to_ofx
95
+ - spec/coop_scraper/base_spec.rb
96
+ - spec/coop_scraper/credit_card_spec.rb
97
+ - spec/coop_scraper/current_account_spec.rb
98
+ - spec/fixtures/credit_card/cc_statement_fixture.html
99
+ - spec/fixtures/credit_card/foreign_transaction_fixture.html
100
+ - spec/fixtures/credit_card/interest_transaction_fixture.html
101
+ - spec/fixtures/credit_card/maybe.txt
102
+ - spec/fixtures/credit_card/merchandise_interest_fixture.html
103
+ - spec/fixtures/credit_card/normal_transaction_fixture.html
104
+ - spec/fixtures/credit_card/overlimit_charge_fixture.html
105
+ - spec/fixtures/credit_card/payment_in_transaction_fixture.html
106
+ - spec/fixtures/credit_card/simple_cc_statement.ofx
107
+ - spec/fixtures/credit_card/statement_with_interest_line_fixture.html
108
+ - spec/fixtures/current_account/cash_point_transaction_fixture.html
109
+ - spec/fixtures/current_account/current_account_fixture.html
110
+ - spec/fixtures/current_account/current_account_fixture.ofx
111
+ - spec/fixtures/current_account/debit_interest_transaction_fixture.html
112
+ - spec/fixtures/current_account/no_transactions_fixture.html
113
+ - spec/fixtures/current_account/normal_transaction_fixture.html
114
+ - spec/fixtures/current_account/payment_in_transaction_fixture.html
115
+ - spec/fixtures/current_account/service_charge_transaction_fixture.html
116
+ - spec/fixtures/current_account/transfer_transaction_fixture.html
117
+ - spec/ofx/statement/base_spec.rb
118
+ - spec/ofx/statement/credit_card_spec.rb
119
+ - spec/ofx/statement/current_account_spec.rb
120
+ - spec/ofx/statement/output/base_spec.rb
121
+ - spec/ofx/statement/output/builder_spec.rb
122
+ - spec/ofx/statement/output/credit_card_spec.rb
123
+ - spec/ofx/statement/output/current_account_spec.rb
124
+ - spec/ofx/statement/transaction_spec.rb
125
+ - spec/spec.opts
126
+ - spec/spec_helper.rb
127
+ - lib/coop_scraper/base.rb
128
+ - lib/coop_scraper/credit_card.rb
129
+ - lib/coop_scraper/current_account.rb
130
+ - lib/coop_scraper/version.rb
131
+ - lib/coop_scraper.rb
132
+ - lib/ofx/statement/base.rb
133
+ - lib/ofx/statement/credit_card.rb
134
+ - lib/ofx/statement/current_account.rb
135
+ - lib/ofx/statement/output/base.rb
136
+ - lib/ofx/statement/output/builder.rb
137
+ - lib/ofx/statement/output/credit_card.rb
138
+ - lib/ofx/statement/output/current_account.rb
139
+ - lib/ofx/statement/transaction.rb
140
+ - lib/ofx/statement.rb
141
+ - lib/ofx.rb
142
+ has_rdoc: true
143
+ homepage: http://reprocessed.org/
144
+ licenses: []
145
+
146
+ post_install_message:
147
+ rdoc_options:
148
+ - --main
149
+ - README.rdoc
150
+ require_paths:
151
+ - lib
152
+ required_ruby_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: "0"
157
+ version:
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: "0"
163
+ version:
164
+ requirements: []
165
+
166
+ rubyforge_project: coop_to_ofx
167
+ rubygems_version: 1.3.4
168
+ signing_key:
169
+ specification_version: 3
170
+ summary: Convert Co-operative bank HTML statements into OFX
171
+ test_files: []
172
+