qif 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.3 Allow two digit years [caleb]
2
+
1
3
  v0.2 Added documentation
2
4
 
3
5
  v0.1 First version
data/Manifest CHANGED
@@ -7,7 +7,10 @@ lib/qif/date_format.rb
7
7
  lib/qif/reader.rb
8
8
  lib/qif/transaction.rb
9
9
  lib/qif/writer.rb
10
+ qif.gemspec
11
+ spec/fixtures/3_records_ddmmyy.qif
10
12
  spec/fixtures/3_records_ddmmyyyy.qif
13
+ spec/fixtures/3_records_mmddyy.qif
11
14
  spec/fixtures/3_records_mmddyyyy.qif
12
15
  spec/lib/date_format_spec.rb
13
16
  spec/lib/reader_spec.rb
data/Rakefile CHANGED
@@ -2,5 +2,5 @@ require 'echoe'
2
2
  Echoe.new('qif') do |gem|
3
3
  gem.author = "Jeremy Wells"
4
4
  gem.summary = "A library for reading and writing quicken QIF files."
5
- gem.email = "jeremy@boost.co.nz"
6
- end
5
+ gem.email = "jemmyw@gmail.com"
6
+ end
@@ -32,6 +32,7 @@ module Qif
32
32
  format.gsub!('dd', '%d')
33
33
  format.gsub!('mm', '%m')
34
34
  format.gsub!('yyyy', '%Y')
35
+ format.gsub!('yy', '%y')
35
36
  format
36
37
  end
37
38
 
@@ -40,6 +41,7 @@ module Qif
40
41
  format.gsub!('dd', '([0-3][0-9])')
41
42
  format.gsub!('mm', '([0-1][0-9])')
42
43
  format.gsub!('yyyy', '([1-2][0-9]{3})')
44
+ format.gsub!('yy', '([0-9]{2})')
43
45
 
44
46
  /#{format}/mi
45
47
  end
@@ -2,27 +2,27 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{qif}
5
- s.version = "0.2"
5
+ s.version = "0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jeremy Wells"]
9
- s.date = %q{2010-01-22}
9
+ s.date = %q{2010-11-09}
10
10
  s.description = %q{A library for reading and writing quicken QIF files.}
11
- s.email = %q{jeremy@boost.co.nz}
11
+ s.email = %q{jemmyw@gmail.com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "lib/qif.rb", "lib/qif/date_format.rb", "lib/qif/reader.rb", "lib/qif/transaction.rb", "lib/qif/writer.rb"]
13
- s.files = ["CHANGELOG", "LICENSE", "Manifest", "Rakefile", "lib/qif.rb", "lib/qif/date_format.rb", "lib/qif/reader.rb", "lib/qif/transaction.rb", "lib/qif/writer.rb", "spec/fixtures/3_records_ddmmyyyy.qif", "spec/fixtures/3_records_mmddyyyy.qif", "spec/lib/date_format_spec.rb", "spec/lib/reader_spec.rb", "spec/lib/transaction_spec.rb", "spec/lib/writer_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "qif.gemspec"]
13
+ s.files = ["CHANGELOG", "LICENSE", "Manifest", "Rakefile", "lib/qif.rb", "lib/qif/date_format.rb", "lib/qif/reader.rb", "lib/qif/transaction.rb", "lib/qif/writer.rb", "qif.gemspec", "spec/fixtures/3_records_ddmmyy.qif", "spec/fixtures/3_records_ddmmyyyy.qif", "spec/fixtures/3_records_mmddyy.qif", "spec/fixtures/3_records_mmddyyyy.qif", "spec/lib/date_format_spec.rb", "spec/lib/reader_spec.rb", "spec/lib/transaction_spec.rb", "spec/lib/writer_spec.rb", "spec/spec.opts", "spec/spec_helper.rb"]
14
14
  s.homepage = %q{}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Qif"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{qif}
18
- s.rubygems_version = %q{1.3.5}
18
+ s.rubygems_version = %q{1.3.7}
19
19
  s.summary = %q{A library for reading and writing quicken QIF files.}
20
20
 
21
21
  if s.respond_to? :specification_version then
22
22
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
23
  s.specification_version = 3
24
24
 
25
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
26
  else
27
27
  end
28
28
  else
@@ -0,0 +1,20 @@
1
+ !Type:Bank
2
+ ^
3
+ D01/01/10
4
+ T-10.00
5
+ LDebit
6
+ PDescription
7
+ MReference
8
+ ^
9
+ D01/06/10
10
+ T-20.00
11
+ LDebit
12
+ PDescription
13
+ MReference
14
+ ^
15
+ D29/12/10
16
+ T30.00
17
+ LCredit
18
+ PDescription
19
+ MReference
20
+ ^
@@ -0,0 +1,20 @@
1
+ !Type:Bank
2
+ ^
3
+ D01/01/10
4
+ T-10.00
5
+ LDebit
6
+ PDescription
7
+ MReference
8
+ ^
9
+ D06/01/10
10
+ T-20.00
11
+ LDebit
12
+ PDescription
13
+ MReference
14
+ ^
15
+ D12/29/10
16
+ T30.00
17
+ LCredit
18
+ PDescription
19
+ MReference
20
+ ^
@@ -0,0 +1,15 @@
1
+ require 'spec/spec_helper'
2
+
3
+ describe Qif::DateFormat do
4
+ it 'should work with 2 digit years in mm/dd/yy format' do
5
+ reader = Qif::DateFormat.new('mm/dd/yy')
6
+ time = reader.parse('09/28/10')
7
+ time.should == Time.mktime(2010, 9, 28)
8
+ end
9
+
10
+ it 'should work with 2 digit years in dd/mm/yy format' do
11
+ reader = Qif::DateFormat.new('dd/mm/yy')
12
+ time = reader.parse('28/09/10')
13
+ time.should == Time.mktime(2010, 9, 28)
14
+ end
15
+ end
@@ -1,7 +1,7 @@
1
1
  require 'spec/spec_helper'
2
2
 
3
3
  describe Qif::Reader do
4
- %w(dd/mm/yyyy mm/dd/yyyy).each do |format|
4
+ %w(dd/mm/yyyy mm/dd/yyyy dd/mm/yy mm/dd/yy).each do |format|
5
5
  before do
6
6
  @file = 'spec/fixtures/3_records_%s.qif' % format.gsub('/', '')
7
7
  @instance = Qif::Reader.new(open(@file), format)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qif
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ hash: 13
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 3
9
+ version: "0.3"
5
10
  platform: ruby
6
11
  authors:
7
12
  - Jeremy Wells
@@ -9,12 +14,12 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-22 00:00:00 +13:00
17
+ date: 2010-11-09 00:00:00 +13:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
16
21
  description: A library for reading and writing quicken QIF files.
17
- email: jeremy@boost.co.nz
22
+ email: jemmyw@gmail.com
18
23
  executables: []
19
24
 
20
25
  extensions: []
@@ -37,7 +42,10 @@ files:
37
42
  - lib/qif/reader.rb
38
43
  - lib/qif/transaction.rb
39
44
  - lib/qif/writer.rb
45
+ - qif.gemspec
46
+ - spec/fixtures/3_records_ddmmyy.qif
40
47
  - spec/fixtures/3_records_ddmmyyyy.qif
48
+ - spec/fixtures/3_records_mmddyy.qif
41
49
  - spec/fixtures/3_records_mmddyyyy.qif
42
50
  - spec/lib/date_format_spec.rb
43
51
  - spec/lib/reader_spec.rb
@@ -45,7 +53,6 @@ files:
45
53
  - spec/lib/writer_spec.rb
46
54
  - spec/spec.opts
47
55
  - spec/spec_helper.rb
48
- - qif.gemspec
49
56
  has_rdoc: true
50
57
  homepage: ""
51
58
  licenses: []
@@ -59,21 +66,28 @@ rdoc_options:
59
66
  require_paths:
60
67
  - lib
61
68
  required_ruby_version: !ruby/object:Gem::Requirement
69
+ none: false
62
70
  requirements:
63
71
  - - ">="
64
72
  - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
65
76
  version: "0"
66
- version:
67
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
+ none: false
68
79
  requirements:
69
80
  - - ">="
70
81
  - !ruby/object:Gem::Version
82
+ hash: 11
83
+ segments:
84
+ - 1
85
+ - 2
71
86
  version: "1.2"
72
- version:
73
87
  requirements: []
74
88
 
75
89
  rubyforge_project: qif
76
- rubygems_version: 1.3.5
90
+ rubygems_version: 1.3.7
77
91
  signing_key:
78
92
  specification_version: 3
79
93
  summary: A library for reading and writing quicken QIF files.