ofx 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/ofx/parser.rb CHANGED
@@ -7,11 +7,16 @@ module OFX
7
7
  attr_reader :parser
8
8
 
9
9
  def initialize(resource)
10
- resource = open_resource(resource)
11
- resource.rewind
10
+ resource = open_resource(resource)
11
+ resource.rewind
12
+ @content = resource.read
13
+
14
+ begin
15
+ @headers, @body = prepare(content)
16
+ rescue Exception
17
+ raise OFX::UnsupportedFileError
18
+ end
12
19
 
13
- @content = resource.read
14
- @headers, @body = prepare(content)
15
20
 
16
21
  case @headers["VERSION"]
17
22
  when "102" then
data/lib/ofx/version.rb CHANGED
@@ -2,7 +2,7 @@ module OFX
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 4
5
+ PATCH = 5
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
data/ofx.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ofx}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nando Vieira"]
12
- s.date = %q{2010-03-10}
12
+ s.date = %q{2010-03-12}
13
13
  s.description = %q{A simple OFX (Open Financial Exchange) parser built on top of Nokogiri. Currently supports OFX 1.0.2.
14
14
 
15
15
  Usage:
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 4
9
- version: 0.2.4
8
+ - 5
9
+ version: 0.2.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nando Vieira
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-10 00:00:00 -03:00
17
+ date: 2010-03-12 00:00:00 -03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency