hippie_csv 0.0.5 → 0.0.6

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.
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  describe HippieCSV do
4
4
 
5
5
  it "defines a version" do
6
- expect(HippieCSV::VERSION).to eq("0.0.5")
6
+ expect(HippieCSV::VERSION).to eq("0.0.6")
7
7
  end
8
8
 
9
9
  end
@@ -110,6 +110,17 @@ describe HippieCSV do
110
110
  expect(import[1][0]).to eq("Héloise")
111
111
  end
112
112
 
113
+ it "deals with a long, challenging file (and quickly)" do
114
+ start_time = Time.now
115
+ path = fixture_path(:never_ordered)
116
+
117
+ import = subject.read(path)
118
+
119
+ expect(import[0].count).to eq(10)
120
+ expect(import.count).to eq(32803)
121
+ expect(Time.now).to be_within(5).of(start_time)
122
+ end
123
+
113
124
  it "strips leading/trailing blank lines" do
114
125
  path = fixture_path(:trailing_leading_lines)
115
126
 
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.5
4
+ version: 0.0.6
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-07-02 00:00:00.000000000 Z
11
+ date: 2015-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -106,6 +106,7 @@ files:
106
106
  - spec/fixtures/escaped_quotes_semicolons.csv
107
107
  - spec/fixtures/excel.csv
108
108
  - spec/fixtures/malformed.csv
109
+ - spec/fixtures/never_ordered.csv
109
110
  - spec/fixtures/normal.csv
110
111
  - spec/fixtures/trailing_leading_lines.csv
111
112
  - spec/fixtures/with_byte_order_mark.csv
@@ -146,6 +147,7 @@ test_files:
146
147
  - spec/fixtures/escaped_quotes_semicolons.csv
147
148
  - spec/fixtures/excel.csv
148
149
  - spec/fixtures/malformed.csv
150
+ - spec/fixtures/never_ordered.csv
149
151
  - spec/fixtures/normal.csv
150
152
  - spec/fixtures/trailing_leading_lines.csv
151
153
  - spec/fixtures/with_byte_order_mark.csv