simple_xlsx_reader 0.9.7 → 0.9.8

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: 6c495d2161ffcb0fb72029aa65b3030b01761030
4
- data.tar.gz: 3064fcfd2ea46a5ede489cc32faff627740b569d
3
+ metadata.gz: 592fa09e1f66127581441dcee23a2ec10481a08f
4
+ data.tar.gz: 2165196985a70b2f594828e43523c237600f7c08
5
5
  SHA512:
6
- metadata.gz: 9468df9742e49b5d7c8eb830f724702b6e145dd50dc0f62e2330561091c7587364085ae850938e5853bb3ab5de744e2e87049d722e64d4989da06b5e9d0de09a
7
- data.tar.gz: 029b31bff2274d01d43ff8498e76b6bdd7839621ed052af63c5348ec85fec90ce842831e5d739b39951a5807cf9ac6ff938343263709a17f826190afdc45d11d
6
+ metadata.gz: 4ef8fe7df99b9bea2742c49663aa899421e5d4b6a145c62ee15afef9a8938ba1bfe0c5bf4b9d0999e2cffc6189436fd4f3b1a59af8a796a05c1dc4d6d9f7de77
7
+ data.tar.gz: d1a2cb30e2dce280b529f6b877745cfbfa1f7cc8bbcacd506b268ca624da74d637e9e47bff8602f53d0c33ebd38055750c6eda88bbeaedd34d8eeb5e891e8b2e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.9.8
2
+
3
+ * Rubyzip 1.0 compatability
4
+
1
5
  ### 0.9.7
2
6
 
3
7
  * Fix cell parsing where cells have a type, but no content
@@ -1,9 +1,21 @@
1
1
  require "simple_xlsx_reader/version"
2
2
  require 'nokogiri'
3
- require 'zip/zip'
4
- require 'zip/zipfilesystem'
5
3
  require 'date'
6
4
 
5
+ # Rubyzip 1.0 only has different naming, everything else is the same, so let's
6
+ # be flexible so we don't force people into a dependency hell w/ other gems.
7
+ begin
8
+ # Try loading rubyzip < 1.0
9
+ require 'zip/zip'
10
+ require 'zip/zipfilesystem'
11
+ SimpleXlsxReader::Zip = Zip::ZipFile
12
+ rescue LoadError
13
+ # Try loading rubyzip >= 1.0
14
+ require 'zip'
15
+ require 'zip/filesystem'
16
+ SimpleXlsxReader::Zip = Zip::File
17
+ end
18
+
7
19
  module SimpleXlsxReader
8
20
  class CellLoadError < StandardError; end
9
21
 
@@ -61,7 +73,7 @@ module SimpleXlsxReader
61
73
 
62
74
  def self.load(file_path)
63
75
  self.new.tap do |xml|
64
- Zip::ZipFile.open(file_path) do |zip|
76
+ SimpleXlsxReader::Zip.open(file_path) do |zip|
65
77
  xml.workbook = Nokogiri::XML(zip.read('xl/workbook.xml'))
66
78
  xml.styles = Nokogiri::XML(zip.read('xl/styles.xml'))
67
79
 
@@ -1,3 +1,3 @@
1
1
  module SimpleXlsxReader
2
- VERSION = "0.9.7"
2
+ VERSION = "0.9.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_xlsx_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Woody Peterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-30 00:00:00.000000000 Z
11
+ date: 2013-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri