reckon 0.2.2 → 0.2.3

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.
data/.gitignore CHANGED
@@ -20,4 +20,4 @@ pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
22
  .idea
23
- bin/reckon_local
23
+ reckon_local
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/lib/reckon/app.rb CHANGED
@@ -302,7 +302,8 @@ module Reckon
302
302
  end
303
303
 
304
304
  def parse
305
- self.csv_data = FasterCSV.parse(options[:string] || File.read(options[:file]))
305
+ data = options[:string] || File.read(options[:file])
306
+ self.csv_data = FasterCSV.parse(data.strip)
306
307
  end
307
308
 
308
309
  def self.parse_opts(args = ARGV)
data/reckon.gemspec CHANGED
@@ -5,14 +5,15 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{reckon}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Cantino"]
12
12
  s.date = %q{2010-11-10}
13
+ s.default_executable = %q{reckon}
13
14
  s.description = %q{Reckon automagically converts CSV files for use with the command-line accounting tool Ledger. It also helps you to select the correct accounts associated with the CSV data using Bayesian machine learning.}
14
15
  s.email = %q{andrew@iterationlabs.com}
15
- s.executables = ["reckon", "reckon_local"]
16
+ s.executables = ["reckon"]
16
17
  s.extra_rdoc_files = [
17
18
  "LICENSE",
18
19
  "README.rdoc"
@@ -17,6 +17,12 @@ describe Reckon::App do
17
17
  @simple_csv.columns.should == [["entry1", "entry4"], ["entry2", "entry5"], ["entry3", "entry6"]]
18
18
  @chase.columns.length.should == 4
19
19
  end
20
+
21
+ it "should be ok with empty lines" do
22
+ lambda {
23
+ Reckon::App.new(:string => "one,two\nthree,four\n\n\n\n\n").columns.should == [['one', 'three'], ['two', 'four']]
24
+ }.should_not raise_error
25
+ end
20
26
  end
21
27
 
22
28
  describe "detect_columns" do
@@ -105,7 +111,6 @@ describe Reckon::App do
105
111
  end
106
112
 
107
113
 
108
-
109
114
  # Data
110
115
 
111
116
  SIMPLE_CSV = "entry1,entry2,entry3\nentry4,entry5,entry6"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reckon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Cantino
@@ -16,7 +16,7 @@ bindir: bin
16
16
  cert_chain: []
17
17
 
18
18
  date: 2010-11-10 00:00:00 -08:00
19
- default_executable:
19
+ default_executable: reckon
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rspec
@@ -86,7 +86,6 @@ description: Reckon automagically converts CSV files for use with the command-li
86
86
  email: andrew@iterationlabs.com
87
87
  executables:
88
88
  - reckon
89
- - reckon_local
90
89
  extensions: []
91
90
 
92
91
  extra_rdoc_files:
@@ -108,7 +107,6 @@ files:
108
107
  - spec/reckon/ledger_parser_spec.rb
109
108
  - spec/spec.opts
110
109
  - spec/spec_helper.rb
111
- - bin/reckon_local
112
110
  has_rdoc: true
113
111
  homepage: http://github.com/iterationlabs/reckon
114
112
  licenses: []