excel-esv 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/esv.rb +1 -1
- data/lib/esv/version.rb +1 -1
- data/spec/esv_spec.rb +21 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 296eaa62bc218863be1ed8d947df92b64fa20e3a
|
4
|
+
data.tar.gz: df593163f0e19a30bc541185369099e53dca4a67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e041a707d2f2280ed5e9281fcaa23ed0b57480fa27b6de36d31a0325c75008833e5bcde9857e6ed94a2c766f7127e5bf26c1fb2a7c2a6271e3b8b8a7548df535
|
7
|
+
data.tar.gz: e22498268e8c84dc2cd459eac4d87fcf49fb20c00201726ca2f09b21c4da33ca10f6524d55891798257913b4fa901f2079f08a151a9640c6f37440f92d9ffb0a
|
data/CHANGELOG.md
CHANGED
data/lib/esv.rb
CHANGED
data/lib/esv/version.rb
CHANGED
data/spec/esv_spec.rb
CHANGED
@@ -23,6 +23,15 @@ describe ESV, ".parse" do
|
|
23
23
|
}.to raise_error(/Expected 1 worksheet, found 2/)
|
24
24
|
end
|
25
25
|
|
26
|
+
it "ignores formatting" do
|
27
|
+
output = ESV.parse(excel_file_with_formatting([1, 2]))
|
28
|
+
expect(output).to eq [
|
29
|
+
[ 1, 2 ],
|
30
|
+
]
|
31
|
+
|
32
|
+
expect(output[0].class).to eq Array
|
33
|
+
end
|
34
|
+
|
26
35
|
private
|
27
36
|
|
28
37
|
def excel_file_with_two_worksheets
|
@@ -35,6 +44,18 @@ describe ESV, ".parse" do
|
|
35
44
|
book.write(fake_file)
|
36
45
|
data
|
37
46
|
end
|
47
|
+
|
48
|
+
def excel_file_with_formatting(data)
|
49
|
+
book = Spreadsheet::Workbook.new
|
50
|
+
sheet = book.create_worksheet
|
51
|
+
sheet.row(0).replace(data)
|
52
|
+
sheet.row(0).default_format = Spreadsheet::Format.new(color: :blue)
|
53
|
+
|
54
|
+
data = ""
|
55
|
+
fake_file = StringIO.new(data)
|
56
|
+
book.write(fake_file)
|
57
|
+
data
|
58
|
+
end
|
38
59
|
end
|
39
60
|
|
40
61
|
describe ESV, ".generate_file and .parse_file" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excel-esv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Nyh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spreadsheet
|