ofx_reader 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b7c0af542e0bc3eac039e0be6951296fc4bec35a5788a1b57fef2a46a44464f
4
- data.tar.gz: e6134bfd4110f53e6346df260ee2a132068c43ae4175030f79af2626932d3ebf
3
+ metadata.gz: ae2436c3f3f0305cbb57d847205d99ea6e71ff0a1394f180b35bf033c59818c1
4
+ data.tar.gz: 3fd5a2ae1f9ccbe8ca15bd160236c159b583b1e4f0c59b913992631f345c4989
5
5
  SHA512:
6
- metadata.gz: f53b13b9959a2753f60e27fdb398e46bf8cfaa683fbec3b77f0a86c697732f9bccbd14e682d0aeb47b2c2331d6058163e76e65250e4022b0172dc4adc6d680da
7
- data.tar.gz: 209ab94d1feba0269ac670f557a69b8f8c6d3cd5466ff424606c50c2b33b9689e390936f7b56b1ed16b87b2f107cf0b79df7faa3b71dd87b68cf8c0a1c0b6924
6
+ metadata.gz: e7ae801e9a571dc1c8c122e13a8e2c6e0e1241975ed566fcf469d9afff5df38f2dbbb6abc7730fdc97e4688cb41573a8e37318fcb831bce1413efe9c32c2ddad
7
+ data.tar.gz: 151e7cb00cbb1d41b570d3ac8a4b89f95434db9820a9aee215153dfdac67758a3834f239194d57c4294628a4ad7ffa4f27896ee3aa8d018f1fe8ba60f0371470
data/README.md CHANGED
@@ -63,6 +63,12 @@ ofx.transactions
63
63
  }, ... ]
64
64
  ```
65
65
 
66
+ You can also read a .OFX file in console using the `ofx_reader` executable:
67
+
68
+ ```bash
69
+ $ ofx_reader path/to/file.ofx
70
+ ```
71
+
66
72
  ## Development
67
73
 
68
74
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/exe/ofx_reader CHANGED
@@ -1,8 +1,18 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "ofx_reader"
3
+ require 'pp'
4
+ require 'ofx_reader'
5
5
 
6
- # OFXReader::
7
- puts 'asas1'
8
- puts ARGV[0]
6
+ if ARGV[0]
7
+ if File.exist?(ARGV[0])
8
+ ofx_text = File.read(ARGV[0])
9
+ ofx = OFXReader::Parser::OFX102.new(ofx_text)
10
+ pp ofx.headers
11
+ pp ofx.account
12
+ pp ofx.transactions
13
+ else
14
+ puts "File doen't exist"
15
+ end
16
+ else
17
+ puts "No file provided"
18
+ end
@@ -1,3 +1,3 @@
1
1
  module OFXReader
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofx_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco Martins