simple-ynab 0.0.2 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae61c3a17426da59d0c8496715356fee48d789da
4
- data.tar.gz: 5e52d1792bacc8ed4fc6eec0e28dc2fe186eecd6
3
+ metadata.gz: 9a881eee0ab99fe8a8d82d526a29f16793682fc8
4
+ data.tar.gz: 02b3e8d3895b1a3e27d0ae71225a2dd44e80a9ca
5
5
  SHA512:
6
- metadata.gz: df75ec306cde43a4a54e3c16d511ac6f8956ca28f14534b37d803a603ee056a56a25306eb9e242a34d5a50af54179852d8d2afec2d6968e25d944e74b3e4f871
7
- data.tar.gz: 50e28de0ba1da5835b9650eba0942507ab16b211bb9bc1a7a4a27a38eec074505154cf486316bdf68d0c70edcb85d0f2970221d5ea8a6f066005fe799d5b4820
6
+ metadata.gz: 720f9333ce2434522d154742548f0eb652eb7e1f41b2fe2786fc9161eb3562c16a2b49c6ad16ca594caf14a0a97a6626f706fbab451cc96f3ebcf5c6a809087c
7
+ data.tar.gz: 2cdc73c61b92a69068de418ba4ac53c8b4ff839241f55590706aa2a62b7c18ab5288e3602bc9e8944bea96218081f2d1f4709abdbad3134d7dade85014f4ee78
@@ -24,10 +24,10 @@ end
24
24
  csv = CSV.read(@csvfile, headers: true) #http://bit.ly/1mSlqfA
25
25
  # @headers = CSV.open('foo.csv','r', :headers => true).read.headers
26
26
 
27
- # puts "csv is #{csv}"
27
+ # Rename the Simple csv headers to match the ynab csv headers
28
28
  indicies = @simple_keywords.map{ |column| csv.headers.index(column)}
29
29
 
30
-
30
+ # Create a new csv file with the columns in the ynab order
31
31
  @newcsv = csv.map { |row| row.values_at(*indicies) }
32
32
 
33
33
 
@@ -40,9 +40,10 @@ puts "Saving new file to #{pathname}"
40
40
  CSV.open(pathname, 'w') do |the_csv|
41
41
  the_csv << @ynab_keywords
42
42
  end
43
- # Save map to file
43
+
44
+ # Append the new csv to the file
44
45
  CSV.open(pathname, 'a+') do |the_csv|
45
46
  @newcsv.each do |row|
46
47
  the_csv << row
47
48
  end
48
- end
49
+ end
metadata CHANGED
@@ -1,23 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-ynab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spencer Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-06 00:00:00.000000000 Z
11
+ date: 2014-09-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Converts simple bank csv to ynab csv
14
14
  email: owenspencer@gmail.com
15
15
  executables:
16
- - simple-ynab.rb
16
+ - simple-ynab
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - bin/simple-ynab.rb
20
+ - bin/simple-ynab
21
21
  homepage:
22
22
  licenses:
23
23
  - MIT
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
38
38
  version: '0'
39
39
  requirements: []
40
40
  rubyforge_project:
41
- rubygems_version: 2.0.3
41
+ rubygems_version: 2.2.2
42
42
  signing_key:
43
43
  specification_version: 4
44
44
  summary: Converts csv from simple format to ynab format