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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1e48d570b32fccdb3506529962985f80e5316cf
4
- data.tar.gz: 281786dfb442b0fa51b6500a5df295e1fe50cd4f
3
+ metadata.gz: 2b637195c40422ea73262b933a7a62d3b7c50883
4
+ data.tar.gz: 61510bfe1d8aa2eaebcd087b8d479e9f073efebd
5
5
  SHA512:
6
- metadata.gz: df1b90fb481afa22d9178115aa84b8a9861fa2869630ecb0e78b1035c2575bcf55e900a763bda76f433e49a66b6c4eb730a47bf705ba9ca7ae4cf015afd1e245
7
- data.tar.gz: 77cf849f576d390997b2341e8d2064d9b6d2c3bd0e0828e2bf63718169e4d2ea3d4fb14526c730f14c0aa6730eaf96bdb944a8ebd27de87f0530d2b2da294e01
6
+ metadata.gz: ddafa532308bdffe930e4fe1f2d94aa8b38bef32850953b266432804a9d32c8829cd6a63e6143e222d47dc08186f001343e2fb556317ec62787a77b2815322ed
7
+ data.tar.gz: 53ce917e4db7f5730726bbb1a36f6e0befa24cd7c5ae890731809e6b93cb89d5e3ffc5b1c47125e89a15d135681bcb573e7b9d1ed6bc2b85dcd30ce05f5de51b
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 1.1.2 / 29.03.2016
2
+ Author: Aleksandr Boykov <aleksandr.boykov@parelio.com>
3
+ Date: Mon Mar 28 14:07:35 2016 -0400
4
+
5
+ fixes compact! method when the excel document has dates
6
+
1
7
  ### 1.1.1 / 03.01.2016
2
8
 
3
9
  Author: ChouAndy <chouandy@ecoworkinc.com>
@@ -45,7 +45,7 @@ module Spreadsheet
45
45
 
46
46
  ##
47
47
  # The version of Spreadsheet you are using.
48
- VERSION = '1.1.1'
48
+ VERSION = '1.1.2'
49
49
 
50
50
  ##
51
51
  # Default client Encoding. Change this value if your application uses a
@@ -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 && (row(j)[i].nil? || row(j)[i].empty?)}
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 && (row(j)[i].nil? || row(j)[i].empty?)}
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]
@@ -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.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-01-03 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-ole