spreadsheet 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +6 -0
- data/lib/spreadsheet.rb +1 -1
- data/lib/spreadsheet/worksheet.rb +2 -2
- data/test/integration.rb +7 -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: 2b637195c40422ea73262b933a7a62d3b7c50883
|
4
|
+
data.tar.gz: 61510bfe1d8aa2eaebcd087b8d479e9f073efebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddafa532308bdffe930e4fe1f2d94aa8b38bef32850953b266432804a9d32c8829cd6a63e6143e222d47dc08186f001343e2fb556317ec62787a77b2815322ed
|
7
|
+
data.tar.gz: 53ce917e4db7f5730726bbb1a36f6e0befa24cd7c5ae890731809e6b93cb89d5e3ffc5b1c47125e89a15d135681bcb573e7b9d1ed6bc2b85dcd30ce05f5de51b
|
data/History.md
CHANGED
data/lib/spreadsheet.rb
CHANGED
@@ -343,7 +343,7 @@ module Spreadsheet
|
|
343
343
|
# detect first non-empty non-nil column if first column is empty or nil
|
344
344
|
if (@dimensions[0]..@dimensions[1]).inject(true){|t, j| t && row(j)[@dimensions[2]].nil?}
|
345
345
|
(@dimensions[2]..@dimensions[3]).each do |i|
|
346
|
-
break unless (@dimensions[0]..@dimensions[1]).inject(true){|t, j| t &&
|
346
|
+
break unless (@dimensions[0]..@dimensions[1]).inject(true){|t, j| t && row(j)[i].to_s.empty?}
|
347
347
|
@dimensions[2] = i
|
348
348
|
end
|
349
349
|
end
|
@@ -351,7 +351,7 @@ module Spreadsheet
|
|
351
351
|
# detect last non-empty non-nil column if last column is empty or nil
|
352
352
|
if (@dimensions[0]..@dimensions[1]).inject(true){|t, j| t && row(j)[@dimensions[3]].nil?}
|
353
353
|
(@dimensions[2]..@dimensions[3]).reverse_each do |i|
|
354
|
-
break unless (@dimensions[0]..@dimensions[1]).inject(true){|t, j| t &&
|
354
|
+
break unless (@dimensions[0]..@dimensions[1]).inject(true){|t, j| t && row(j)[i].to_s.empty?}
|
355
355
|
@dimensions[3] = i
|
356
356
|
end
|
357
357
|
@dimensions[3] = @dimensions[3]
|
data/test/integration.rb
CHANGED
@@ -1437,6 +1437,13 @@ module Spreadsheet
|
|
1437
1437
|
assert_equal sheet.dimensions, [0, 4, 0, 4]
|
1438
1438
|
sheet.compact!
|
1439
1439
|
assert_equal sheet.dimensions, [0, 2, 0, 2]
|
1440
|
+
path = File.join @data, 'test_compact_format_date.xls'
|
1441
|
+
book = Spreadsheet.open path
|
1442
|
+
sheet = book.worksheet 0
|
1443
|
+
assert_instance_of Excel::Worksheet, sheet
|
1444
|
+
assert_nothing_raised do
|
1445
|
+
sheet.compact!
|
1446
|
+
end
|
1440
1447
|
end
|
1441
1448
|
|
1442
1449
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreadsheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-ole
|