rubyexcel 0.2.5 → 0.2.6

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: 5603562a5f43343a623d2c45ab15a63d46c394d2
4
- data.tar.gz: 7377b08f9de8fb10bb6d7b1229da48d0d1e190cf
3
+ metadata.gz: 9d585fcf0d49b8a9ee0f6ee8dda5d7268a3beeac
4
+ data.tar.gz: cf27c488f44968175076a30cd898c3f4542a98e5
5
5
  SHA512:
6
- metadata.gz: 0f6dc977906085129213e2c0d99ece7807423460401d1c829d3ad8470f28afe307b8d8fe2e75473c331d485fa694a488fef042e04b8462ae718be5c4da121b99
7
- data.tar.gz: f42b8e3185eefb3e4345533a9547b0fa93a51823af59a93254d184ed8a1ebeef24180e80a94ea4bd20f743f34e88190366670e0f54a28c22b153a854b4a45ba2
6
+ metadata.gz: 5661cdcb0571b8615e9ec9ca92cf405ebb2a02388e89044a973ac22c43f926b1f9ea4d9dc3cb341903689ff57e16bd00c3cad769456cf21ae7ccd5a178950813
7
+ data.tar.gz: c801d0381a1345aa659698d657692eecbda5d14e8e450a4480757b83f6d183acbdbfd27d5103ae0fcf35901cf9bef4da1db458da873d2ba4b192a2d105057acd
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013 Joel Pearson.
3
+ Copyright (c) 2013 Joel Pearson and Contributors.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
data/README.md CHANGED
@@ -190,6 +190,9 @@ File.write( 'Output.htm', wb.sheets(2).to_html )
190
190
  #Open a sheet in an Excel Workbook
191
191
  wb.sheets( 'Type3' ).to_excel
192
192
 
193
+ #If you feel the need to delete everything between a set of rows:
194
+ s.rows(2, 4).reverse_each &:delete
195
+
193
196
  ```
194
197
 
195
198
  Workbook
@@ -714,6 +717,6 @@ Todo List
714
717
 
715
718
  -----------
716
719
 
717
- Copyright (c) 2013, Joel Pearson. All Rights Reserved.
720
+ Copyright (c) 2013, Joel Pearson and Contributors. All Rights Reserved.
718
721
 
719
722
  This project is licenced under the [MIT License](LICENSE.md).
@@ -45,7 +45,12 @@ require_relative 'address.rb'
45
45
 
46
46
  def <<( other )
47
47
  case other
48
- when Array ; multi_array?( other ) ? @data += other : @data << other
48
+ when Array
49
+ if multi_array?( other )
50
+ all.all?(&:empty?) ? @data = other : @data += other
51
+ else
52
+ all.all?(&:empty?) ? @data = [ other ] : @data << other
53
+ end
49
54
  when Hash ; @data += _convert_hash( other )
50
55
  when Sheet ; empty? ? @data = other.data.all.dup : @data += other.data.dup.no_headers
51
56
  when Row ; @data << other.to_a.dup
@@ -346,7 +346,7 @@ module RubyExcel
346
346
  #
347
347
 
348
348
  def match( header, &block )
349
- row_id( column_by_header( header ).find( &block ) )
349
+ row_id( column_by_header( header ).find( &block ) ) rescue nil
350
350
  end
351
351
 
352
352
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyexcel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Pearson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-31 00:00:00.000000000 Z
11
+ date: 2013-06-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A tabular data structure in Ruby, with header-based helper methods for
14
14
  analysis and editing, and some of Excel's API style. Can output as 2D Array, Excel,
@@ -16,7 +16,8 @@ description: A tabular data structure in Ruby, with header-based helper methods
16
16
  email: VirtuosoJoel@gmail.com
17
17
  executables: []
18
18
  extensions: []
19
- extra_rdoc_files: []
19
+ extra_rdoc_files:
20
+ - LICENSE.md
20
21
  files:
21
22
  - lib/rubyexcel/address.rb
22
23
  - lib/rubyexcel/data.rb