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 +4 -4
- data/bin/{simple-ynab.rb → simple-ynab} +5 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a881eee0ab99fe8a8d82d526a29f16793682fc8
|
4
|
+
data.tar.gz: 02b3e8d3895b1a3e27d0ae71225a2dd44e80a9ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
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
|
-
|
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.
|
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-
|
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
|
16
|
+
- simple-ynab
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- bin/simple-ynab
|
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.
|
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
|