hippie_csv 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d09ec409677ca747265cd3542b2ca799d7d6cb78
|
4
|
+
data.tar.gz: 3f6a81c389556408e7cae8dd73f5e6da70bc5593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46c7ceaf2d3125fe02b3ba8feb8aedb4078db0eb685f109a8cb4e6f0006b008c14a4d4d74828269662023fc34a75d4e8d3a1732cac76539c848c906955a7b073
|
7
|
+
data.tar.gz: 22ac0bfd0871c7c7b6c010667da643307e7bc5d4d5a12da0d9ead4134b0ec79fb8126883023a8c4b69d6dd476ffc144ff9cd65c88c06aab4caa1482e0b7360cd
|
data/lib/hippie_csv/version.rb
CHANGED
@@ -1,20 +1,30 @@
|
|
1
1
|
|
2
2
|
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
,,,,,,
|
3
7
|
id,email,name,country,city,created_at,admin
|
4
8
|
102,patrick@intercom.io,Patrick O'Doherty,United States,San Francisco,2014-04-28 23:57:08 UTC,true
|
5
9
|
103,ben@intercom.io,Ben McRedmond,United States,San Francisco,2014-04-27 23:57:08 UTC,false
|
6
10
|
104,ciaran@intercom.io,Ciaran Lee,Ireland,Dublin,2014-04-26 23:57:08 UTC,true
|
7
11
|
105,eoghan@intercom.io,Eoghan McCabe,United States,San Francisco,2014-04-25 23:57:08 UTC,true
|
8
12
|
106,des@intercom.io,Des Traynor,Ireland,Dublin,2014-04-24 23:57:08 UTC,true
|
13
|
+
,,,,,,
|
14
|
+
,,,,,,
|
15
|
+
,,,,,,
|
9
16
|
107,darragh@intercom.io,Darragh Curran,Ireland,Dublin,2014-04-23 23:57:08 UTC,true
|
10
17
|
108,jeff@intercom.io,Jeff Gardner,Italy,Prata Camportaccio,2014-04-22 23:57:08 UTC,true
|
11
18
|
109,macey@intercom.io,Macey Baker,United States,San Francisco,2014-04-21 23:57:08 UTC,true
|
12
19
|
110,adam@intercom.io,Adam McCarthy,Dublin,Ireland,2014-04-20 23:57:08 UTC,true
|
20
|
+
,,,,,,
|
13
21
|
111,declan@intercom.io,Declan McGrath,Dublin,Ireland,2014-04-19 23:57:08 UTC,false
|
14
22
|
112,peter@intercom.io,Peter McKenna,Dublin,Ireland,2014-04-18 23:57:08 UTC,false
|
15
23
|
113,david@intercom.io,David Barett,Dublin,Ireland,2014-04-17 23:57:08 UTC,true
|
16
24
|
114,eoin@intercom.io,Eoin Hennessy,Dublin,Ireland,2014-04-16 23:57:08 UTC,false
|
25
|
+
,,,,,,
|
26
|
+
|
27
|
+
|
17
28
|
|
18
29
|
|
19
30
|
|
20
|
-
|
data/spec/hippie_csv_spec.rb
CHANGED
@@ -124,7 +124,7 @@ describe HippieCSV do
|
|
124
124
|
it "works when many invalid quote types contained" do
|
125
125
|
path = fixture_path(:bad_quoting)
|
126
126
|
|
127
|
-
expect { CSV.read(path) }.to raise_error
|
127
|
+
expect { CSV.read(path) }.to raise_error(CSV::MalformedCSVError)
|
128
128
|
expect {
|
129
129
|
import = subject.read(path)
|
130
130
|
expect(import.map(&:count).uniq).to eq([11])
|
@@ -133,11 +133,18 @@ describe HippieCSV do
|
|
133
133
|
end
|
134
134
|
|
135
135
|
it "strips leading/trailing blank lines" do
|
136
|
-
path = fixture_path(:
|
136
|
+
path = fixture_path(:trailing_leading_blank_lines)
|
137
137
|
|
138
138
|
import = subject.read(path)
|
139
139
|
expect(import.first).not_to be_empty
|
140
140
|
expect(import.last).not_to be_empty
|
141
141
|
end
|
142
|
+
|
143
|
+
it "maintains coherent column count when stripping blank lines" do
|
144
|
+
path = fixture_path(:trailing_leading_blank_lines)
|
145
|
+
|
146
|
+
import = subject.read(path)
|
147
|
+
expect(import.map(&:length).uniq.size).to eq(1)
|
148
|
+
end
|
142
149
|
end
|
143
150
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hippie_csv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen O'Brien
|
@@ -109,7 +109,7 @@ files:
|
|
109
109
|
- spec/fixtures/malformed.csv
|
110
110
|
- spec/fixtures/never_ordered.csv
|
111
111
|
- spec/fixtures/normal.csv
|
112
|
-
- spec/fixtures/
|
112
|
+
- spec/fixtures/trailing_leading_blank_lines.csv
|
113
113
|
- spec/fixtures/with_byte_order_mark.csv
|
114
114
|
- spec/hippie_csv/constants_spec.rb
|
115
115
|
- spec/hippie_csv/support_spec.rb
|
@@ -151,7 +151,7 @@ test_files:
|
|
151
151
|
- spec/fixtures/malformed.csv
|
152
152
|
- spec/fixtures/never_ordered.csv
|
153
153
|
- spec/fixtures/normal.csv
|
154
|
-
- spec/fixtures/
|
154
|
+
- spec/fixtures/trailing_leading_blank_lines.csv
|
155
155
|
- spec/fixtures/with_byte_order_mark.csv
|
156
156
|
- spec/hippie_csv/constants_spec.rb
|
157
157
|
- spec/hippie_csv/support_spec.rb
|