hippie_csv 0.0.4 → 0.0.5
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/lib/hippie_csv/support.rb +1 -1
- data/lib/hippie_csv/version.rb +1 -1
- data/spec/fixtures/trailing_leading_lines.csv +20 -0
- data/spec/hippie_csv/version_spec.rb +1 -1
- data/spec/hippie_csv_spec.rb +9 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25ff6543c2223eed975723e6b5718081b2f03e33
|
4
|
+
data.tar.gz: 5f62a6c390164ade3e7880ed59171f56f6d608fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43c0883650a3091512b8c60e55c882a22ea60fe0f946a9e74280739e0765306296fc53b8807189f9aecf71b76f41c7d23758056e025281d73e83639a301a4147
|
7
|
+
data.tar.gz: 8318a4e154ddce8ef9d5d835faf30b5ae08a94a252350380d59538a34e01a7de7c07ee968e521c1efd34d53a15720f21372beda179d0ca3513c2a02a644abc35
|
data/lib/hippie_csv/support.rb
CHANGED
data/lib/hippie_csv/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
id,email,name,country,city,created_at,admin
|
4
|
+
102,patrick@intercom.io,Patrick O'Doherty,United States,San Francisco,2014-04-28 23:57:08 UTC,true
|
5
|
+
103,ben@intercom.io,Ben McRedmond,United States,San Francisco,2014-04-27 23:57:08 UTC,false
|
6
|
+
104,ciaran@intercom.io,Ciaran Lee,Ireland,Dublin,2014-04-26 23:57:08 UTC,true
|
7
|
+
105,eoghan@intercom.io,Eoghan McCabe,United States,San Francisco,2014-04-25 23:57:08 UTC,true
|
8
|
+
106,des@intercom.io,Des Traynor,Ireland,Dublin,2014-04-24 23:57:08 UTC,true
|
9
|
+
107,darragh@intercom.io,Darragh Curran,Ireland,Dublin,2014-04-23 23:57:08 UTC,true
|
10
|
+
108,jeff@intercom.io,Jeff Gardner,Italy,Prata Camportaccio,2014-04-22 23:57:08 UTC,true
|
11
|
+
109,macey@intercom.io,Macey Baker,United States,San Francisco,2014-04-21 23:57:08 UTC,true
|
12
|
+
110,adam@intercom.io,Adam McCarthy,Dublin,Ireland,2014-04-20 23:57:08 UTC,true
|
13
|
+
111,declan@intercom.io,Declan McGrath,Dublin,Ireland,2014-04-19 23:57:08 UTC,false
|
14
|
+
112,peter@intercom.io,Peter McKenna,Dublin,Ireland,2014-04-18 23:57:08 UTC,false
|
15
|
+
113,david@intercom.io,David Barett,Dublin,Ireland,2014-04-17 23:57:08 UTC,true
|
16
|
+
114,eoin@intercom.io,Eoin Hennessy,Dublin,Ireland,2014-04-16 23:57:08 UTC,false
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
data/spec/hippie_csv_spec.rb
CHANGED
@@ -101,7 +101,7 @@ describe HippieCSV do
|
|
101
101
|
import = subject.read(path)
|
102
102
|
expect(import[0].count).to eq(9)
|
103
103
|
end
|
104
|
-
|
104
|
+
|
105
105
|
it "works for a hard case" do
|
106
106
|
path = fixture_path(:accents_semicolon_windows_1252)
|
107
107
|
|
@@ -109,5 +109,13 @@ describe HippieCSV do
|
|
109
109
|
expect(import[0][1]).to eq("Jérome")
|
110
110
|
expect(import[1][0]).to eq("Héloise")
|
111
111
|
end
|
112
|
+
|
113
|
+
it "strips leading/trailing blank lines" do
|
114
|
+
path = fixture_path(:trailing_leading_lines)
|
115
|
+
|
116
|
+
import = subject.read(path)
|
117
|
+
expect(import.first).not_to be_empty
|
118
|
+
expect(import.last).not_to be_empty
|
119
|
+
end
|
112
120
|
end
|
113
121
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen O'Brien
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- spec/fixtures/excel.csv
|
108
108
|
- spec/fixtures/malformed.csv
|
109
109
|
- spec/fixtures/normal.csv
|
110
|
+
- spec/fixtures/trailing_leading_lines.csv
|
110
111
|
- spec/fixtures/with_byte_order_mark.csv
|
111
112
|
- spec/hippie_csv/constants_spec.rb
|
112
113
|
- spec/hippie_csv/support_spec.rb
|
@@ -146,6 +147,7 @@ test_files:
|
|
146
147
|
- spec/fixtures/excel.csv
|
147
148
|
- spec/fixtures/malformed.csv
|
148
149
|
- spec/fixtures/normal.csv
|
150
|
+
- spec/fixtures/trailing_leading_lines.csv
|
149
151
|
- spec/fixtures/with_byte_order_mark.csv
|
150
152
|
- spec/hippie_csv/constants_spec.rb
|
151
153
|
- spec/hippie_csv/support_spec.rb
|