excel-esv 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/lib/esv/version.rb +1 -1
- data/lib/esv.rb +4 -0
- data/spec/esv_spec.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b544865a37c01eed489d2e594669590524b26671
|
4
|
+
data.tar.gz: 45ec1bb9782dc87afa960fb5315d58db63cebaaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 850ee1d9dae6adb72d3613512b06326260979e6386a5fdde37e634f8c4f7d2764d76f4b7de2622855b1a9a4c21845155f11b4e4b4b1cfb3ff120d090e24a1682
|
7
|
+
data.tar.gz: b4db484b860bb6245d26023d32a4ce34438d8252adf578ba6fc18f830894607ba2c782ba02003e900ab88e0721daeb7fe6312d99d9854bd9dcb3702a22170743
|
data/README.md
CHANGED
@@ -39,7 +39,19 @@ end
|
|
39
39
|
require "esv"
|
40
40
|
|
41
41
|
data = File.read("/tmp/test.xls")
|
42
|
-
output = ESV.parse(data)
|
42
|
+
output = ESV.parse(data)
|
43
|
+
# => [ [ "Name", "Dogs", … ], … ]
|
44
|
+
```
|
45
|
+
|
46
|
+
This assumes a file with a single worksheet and will raise otherwise.
|
47
|
+
|
48
|
+
### Parse file
|
49
|
+
|
50
|
+
``` ruby
|
51
|
+
require "esv"
|
52
|
+
|
53
|
+
output = ESV.parse_file("/tmp/test.xls")
|
54
|
+
# => [ [ "Name", "Dogs", … ], … ]
|
43
55
|
```
|
44
56
|
|
45
57
|
This assumes a file with a single worksheet and will raise otherwise.
|
data/lib/esv/version.rb
CHANGED
data/lib/esv.rb
CHANGED
data/spec/esv_spec.rb
CHANGED
@@ -37,7 +37,7 @@ describe ESV, ".parse" do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
describe ESV, ".generate_file" do
|
40
|
+
describe ESV, ".generate_file and .parse_file" do
|
41
41
|
before do
|
42
42
|
@file = Tempfile.new("esv")
|
43
43
|
end
|
@@ -50,8 +50,7 @@ describe ESV, ".generate_file" do
|
|
50
50
|
esv << [ 1, 2 ]
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
output = ESV.parse(data)
|
53
|
+
output = ESV.parse_file(path)
|
55
54
|
|
56
55
|
expect(output).to eq [
|
57
56
|
[ "Dogs", "Cats" ],
|