creek 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.rdoc +76 -0
- data/Rakefile +7 -0
- data/creek.gemspec +29 -0
- data/lib/creek.rb +8 -0
- data/lib/creek/book.rb +34 -0
- data/lib/creek/shared_strings.rb +27 -0
- data/lib/creek/sheet.rb +116 -0
- data/lib/creek/version.rb +3 -0
- data/spec/fixtures/invalid.xls +0 -0
- data/spec/fixtures/sample-as-zip.zip +0 -0
- data/spec/fixtures/sample.xlsx +0 -0
- data/spec/fixtures/temp_string_io_file_path_with_no_extension +0 -0
- data/spec/test_spec.rb +82 -0
- metadata +136 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 362e390640c6143db12fdf1cf83d45a2d70b1cf3
|
4
|
+
data.tar.gz: c11e75bfc31e009513f32f14711b3396732ffd1e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5339ab0325a1f9034f245c73767a6d615958521286170853d489e2c53d242fba5794c25212acac61001d5759260d6be6156d39cb02cd0952fcdbeb7a8b7c9d74
|
7
|
+
data.tar.gz: 27126fdd4c896abce8480174b80316025deb427f28d89275775da807f8049f5ac12a862134fc52b6fc63e4fcd54014d7cb5ab55d32d17fb2a826ffcb15117742
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 TODO: Write your name
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
= Creek -- Stream parser for large Excel(xlsx and xlsm) files.
|
2
|
+
|
3
|
+
Creek is a Ruby gem that provide a fast, simple and efficient method of parsing large Excel(xlsx and xlsm) files.
|
4
|
+
|
5
|
+
|
6
|
+
== Installation
|
7
|
+
|
8
|
+
Creek can be used from the command line or as part of a Ruby web framework. To install the gem using terminal, run the following command:
|
9
|
+
|
10
|
+
gem install creek
|
11
|
+
|
12
|
+
To use it in Rails, add this line to your Gemfile:
|
13
|
+
|
14
|
+
gem "creek"
|
15
|
+
|
16
|
+
|
17
|
+
== Basic Usage
|
18
|
+
Creek can simply parse an Excel file by looping through the rows enumerator:
|
19
|
+
|
20
|
+
require 'creek'
|
21
|
+
creek = Creek::Book.new "specs/fixtures/sample.xlsx"
|
22
|
+
sheet= creek.sheets[0]
|
23
|
+
|
24
|
+
sheet.rows.each do |row|
|
25
|
+
puts row # => {"A1"=>"Content 1", "B1"=>nil, C1"=>nil, "D1"=>"Content 3"}
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
sheet.rows_with_meta_data.each do |row|
|
30
|
+
puts row # => {"collapsed"=>"false", "customFormat"=>"false", "customHeight"=>"true", "hidden"=>"false", "ht"=>"12.1", "outlineLevel"=>"0", "r"=>"1", "cells"=>{"A1"=>"Content 1", "B1"=>nil, C1"=>nil, "D1"=>"Content 3"}}
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
sheet.state # => 'visible'
|
35
|
+
sheet.name # => 'Sheet1'
|
36
|
+
sheet.rid # => 'rId2'
|
37
|
+
|
38
|
+
== Filename considerations
|
39
|
+
By default, Creek will ensure that the file extension is either *.xlsx or *.xlsm, but this check can be circumvented as needed:
|
40
|
+
|
41
|
+
path = 'sample-as-zip.zip'
|
42
|
+
Creek::Book.new path, :check_file_extension => false
|
43
|
+
|
44
|
+
By default, the Rails {file_field_tag}[http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-file_field_tag] uploads to a temporary location and stores the original filename with the StringIO object. (See {this section}[http://guides.rubyonrails.org/form_helpers.html#uploading-files] of the Rails Guides for more information.)
|
45
|
+
|
46
|
+
Creek can parse this directly without the need for file upload gems such as Carrierwave or Paperclip by passing the original filename as an option:
|
47
|
+
|
48
|
+
# Import endpoint in Rails controller
|
49
|
+
def import
|
50
|
+
file = params[:file]
|
51
|
+
Creek::Book.new file.path, check_file_extension: false
|
52
|
+
end
|
53
|
+
|
54
|
+
== Contributing
|
55
|
+
|
56
|
+
Contributions are welcomed. You can fork a repository, add your code changes to the forked branch, ensure all existing unit tests pass, create new unit tests cover your new changes and finally create a pull request.
|
57
|
+
|
58
|
+
After forking and then cloning the repository locally, install Bundler and then use it
|
59
|
+
to install the development gem dependecies:
|
60
|
+
|
61
|
+
gem install bundler
|
62
|
+
bundle install
|
63
|
+
|
64
|
+
Once this is complete, you should be able to run the test suite:
|
65
|
+
|
66
|
+
rake
|
67
|
+
|
68
|
+
|
69
|
+
== Bug Reporting
|
70
|
+
|
71
|
+
Please use the {Issues}[https://github.com/pythonicrubyist/creek/issues] page to report bugs or suggest new enhancements.
|
72
|
+
|
73
|
+
|
74
|
+
== License
|
75
|
+
|
76
|
+
Creek has been published under {MIT License}[https://github.com/pythonicrubyist/creek/blob/master/LICENSE.txt]
|
data/Rakefile
ADDED
data/creek.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'creek/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "creek"
|
8
|
+
spec.version = Creek::VERSION
|
9
|
+
spec.authors = ["pythonicrubyist"]
|
10
|
+
spec.email = ["pythonicrubyist@gmail.com"]
|
11
|
+
spec.description = %q{A Ruby gem that streams and parses large Excel(xlsx and xlsm) files fast and efficiently.}
|
12
|
+
spec.summary = %q{A Ruby gem for parsing large Excel(xlsx and xlsm) files.}
|
13
|
+
spec.homepage = "https://github.com/pythonicrubyist/creek"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.required_ruby_version = '>= 1.9.2'
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
spec.add_development_dependency 'rspec', '~> 2.13.0'
|
26
|
+
|
27
|
+
spec.add_dependency 'nokogiri', '~> 1.6.0'
|
28
|
+
spec.add_dependency 'rubyzip', '>= 1.0.0'
|
29
|
+
end
|
data/lib/creek.rb
ADDED
data/lib/creek/book.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'zip/filesystem'
|
2
|
+
require 'nokogiri'
|
3
|
+
|
4
|
+
module Creek
|
5
|
+
|
6
|
+
class Creek::Book
|
7
|
+
|
8
|
+
attr_reader :files,
|
9
|
+
:sheets,
|
10
|
+
:shared_strings
|
11
|
+
|
12
|
+
def initialize path, options = {}
|
13
|
+
check_file_extension = options.fetch(:check_file_extension, true)
|
14
|
+
if check_file_extension
|
15
|
+
extension = File.extname(options[:original_filename] || path).downcase
|
16
|
+
raise 'Not a valid file format.' unless (['.xlsx', '.xlsm'].include? extension)
|
17
|
+
end
|
18
|
+
@files = Zip::File.open path
|
19
|
+
@shared_strings = SharedStrings.new(self)
|
20
|
+
end
|
21
|
+
|
22
|
+
def sheets
|
23
|
+
doc = @files.file.open "xl/workbook.xml"
|
24
|
+
xml = Nokogiri::XML::Document.parse doc
|
25
|
+
@sheets = xml.css('sheet').each_with_index.map do |sheet, i|
|
26
|
+
Sheet.new(self, sheet.attr("name"), sheet.attr("sheetid"), sheet.attr("state"), sheet.attr("visible"), sheet.attr("r:id"), i+1)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def close
|
31
|
+
@files.close
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'zip/filesystem'
|
2
|
+
require 'nokogiri'
|
3
|
+
|
4
|
+
module Creek
|
5
|
+
|
6
|
+
class Creek::SharedStrings
|
7
|
+
|
8
|
+
attr_reader :book, :dictionary
|
9
|
+
|
10
|
+
def initialize book
|
11
|
+
@book = book
|
12
|
+
parse_shared_shared_strings
|
13
|
+
end
|
14
|
+
|
15
|
+
def parse_shared_shared_strings
|
16
|
+
path = "xl/sharedStrings.xml"
|
17
|
+
@dictionary = Hash.new
|
18
|
+
if @book.files.file.exist?(path)
|
19
|
+
doc = @book.files.file.open path
|
20
|
+
xml = Nokogiri::XML::Document.parse doc
|
21
|
+
xml.css('t').each_with_index.map do |str, i|
|
22
|
+
@dictionary[i] = str.content
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/creek/sheet.rb
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
require 'zip/filesystem'
|
2
|
+
require 'nokogiri'
|
3
|
+
|
4
|
+
module Creek
|
5
|
+
class Creek::Sheet
|
6
|
+
|
7
|
+
attr_reader :book,
|
8
|
+
:name,
|
9
|
+
:sheetid,
|
10
|
+
:state,
|
11
|
+
:visible,
|
12
|
+
:rid,
|
13
|
+
:index
|
14
|
+
|
15
|
+
|
16
|
+
def initialize book, name, sheetid, state, visible, rid, index
|
17
|
+
@book = book
|
18
|
+
@name = name
|
19
|
+
@sheetid = sheetid
|
20
|
+
@visible = visible
|
21
|
+
@rid = rid
|
22
|
+
@state = state
|
23
|
+
@index = index
|
24
|
+
|
25
|
+
# An XLS file has only 256 columns, however, an XLSX or XLSM file can contain up to 16384 columns.
|
26
|
+
# This function creates a hash with all valid XLSX column names and associated indices.
|
27
|
+
@@excel_col_names = Hash.new
|
28
|
+
(0...16384).each do |i|
|
29
|
+
@@excel_col_names[col_name(i)] = i
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Provides an Enumerator that returns a hash representing each row.
|
35
|
+
# The key of the hash is the Cell id and the value is the value of the cell.
|
36
|
+
def rows
|
37
|
+
rows_generator
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Provides an Enumerator that returns a hash representing each row.
|
42
|
+
# The hash contains meta data of the row and a 'cells' embended hash which contains the cell contents.
|
43
|
+
def rows_with_meta_data
|
44
|
+
rows_generator true
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
##
|
49
|
+
# Returns valid Excel column name for a given column index.
|
50
|
+
# For example, returns "A" for 0, "B" for 1 and "AQ" for 42.
|
51
|
+
def col_name i
|
52
|
+
quot = i/26
|
53
|
+
(quot>0 ? col_name(quot-1) : "") + (i%26+65).chr
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Returns a hash per row that includes the cell ids and values.
|
58
|
+
# Empty cells will be also included in the hash with a nil value.
|
59
|
+
def rows_generator include_meta_data=false
|
60
|
+
path = "xl/worksheets/sheet#{@index}.xml"
|
61
|
+
if @book.files.file.exist?(path)
|
62
|
+
# SAX parsing, Each element in the stream comes through as two events:
|
63
|
+
# one to open the element and one to close it.
|
64
|
+
opener = Nokogiri::XML::Reader::TYPE_ELEMENT
|
65
|
+
closer = Nokogiri::XML::Reader::TYPE_END_ELEMENT
|
66
|
+
Enumerator.new do |y|
|
67
|
+
shared, row, cells, cell = false, nil, {}, nil
|
68
|
+
@book.files.file.open(path) do |xml|
|
69
|
+
Nokogiri::XML::Reader.from_io(xml).each do |node|
|
70
|
+
if (node.name.eql? 'row') and (node.node_type.eql? opener)
|
71
|
+
row = node.attributes
|
72
|
+
row['cells'] = Hash.new
|
73
|
+
cells = Hash.new
|
74
|
+
y << (include_meta_data ? row : cells) if node.self_closing?
|
75
|
+
elsif (node.name.eql? 'row') and (node.node_type.eql? closer)
|
76
|
+
processed_cells = fill_in_empty_cells(cells, row['r'], cell)
|
77
|
+
row['cells'] = processed_cells
|
78
|
+
y << (include_meta_data ? row : processed_cells)
|
79
|
+
elsif (node.name.eql? 'c') and (node.node_type.eql? opener)
|
80
|
+
shared = node.attribute('t').eql? 's'
|
81
|
+
cell = node.attribute('r')
|
82
|
+
elsif node.value?
|
83
|
+
if shared
|
84
|
+
cells[cell] = @book.shared_strings.dictionary[node.value.to_i] if @book.shared_strings.dictionary.has_key? node.value.to_i
|
85
|
+
else
|
86
|
+
cells[cell] = node.value
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
##
|
95
|
+
# The unzipped XML file does not contain any node for empty cells.
|
96
|
+
# Empty cells are being padded in using this function
|
97
|
+
def fill_in_empty_cells cells, row_number, last_col
|
98
|
+
new_cells = Hash.new
|
99
|
+
unless cells.empty?
|
100
|
+
keys = cells.keys.sort
|
101
|
+
last_col = last_col.gsub(row_number, '')
|
102
|
+
last_col_index = @@excel_col_names[last_col]
|
103
|
+
[*(0..last_col_index)].each do |i|
|
104
|
+
col = col_name i
|
105
|
+
id = "#{col}#{row_number}"
|
106
|
+
unless cells.has_key? id
|
107
|
+
new_cells[id] = nil
|
108
|
+
else
|
109
|
+
new_cells[id] = cells[id]
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
new_cells
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
data/spec/test_spec.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'creek'
|
2
|
+
|
3
|
+
describe 'Creek trying to parsing an invalid file.' do
|
4
|
+
it 'Fail to open a legacy xls file.' do
|
5
|
+
lambda { Creek::Book.new 'spec/fixtures/invalid.xls' }.should raise_error 'Not a valid file format.'
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'Ignore file extensions on request.' do
|
9
|
+
path = 'spec/fixtures/sample-as-zip.zip'
|
10
|
+
lambda { Creek::Book.new path, :check_file_extension => false }.should_not raise_error
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'Check file extension when requested.' do
|
14
|
+
open_book = lambda { Creek::Book.new 'spec/fixtures/invalid.xls', :check_file_extension => true }
|
15
|
+
open_book.should raise_error 'Not a valid file format.'
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'Check file extension of original_filename if passed.' do
|
19
|
+
path = 'spec/fixtures/temp_string_io_file_path_with_no_extension'
|
20
|
+
lambda { Creek::Book.new path, :original_filename => 'invalid.xls' }.should raise_error 'Not a valid file format.'
|
21
|
+
lambda { Creek::Book.new path, :original_filename => 'valid.xlsx' }.should_not raise_error
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'Creek parsing a sample XLSX file' do
|
27
|
+
before(:all) do
|
28
|
+
@creek = Creek::Book.new 'spec/fixtures/sample.xlsx'
|
29
|
+
@expected_rows = [{'A1'=>'Content 1', 'B1'=>nil, 'C1'=>'Content 2', 'D1'=>nil, 'E1'=>'Content 3'},
|
30
|
+
{'A2'=>nil, 'B2'=>'Content 4', 'C2'=>nil, 'D2'=>'Content 5', 'E2'=>nil, 'F2'=>'Content 6'},
|
31
|
+
{},
|
32
|
+
{'A4'=>'Content 7', 'B4'=>'Content 8', 'C4'=>'Content 9', 'D4'=>'Content 10', 'E4'=>'Content 11', 'F4'=>'Content 12'},
|
33
|
+
{'A5'=>nil, 'B5'=>nil, 'C5'=>nil, 'D5'=>nil, 'E5'=>nil, 'F5'=>nil, 'G5'=>nil, 'H5'=>nil, 'I5'=>nil, 'J5'=>nil, 'K5'=>nil, 'L5'=>nil, 'M5'=>nil, 'N5'=>nil, 'O5'=>nil, 'P5'=>nil, 'Q5'=>nil, 'R5'=>nil, 'S5'=>nil, 'T5'=>nil, 'U5'=>nil, 'V5'=>nil, 'W5'=>nil, 'X5'=>nil, 'Y5'=>nil, 'Z5'=>'Z Content', 'AA5'=>nil, 'AB5'=>nil, 'AC5'=>nil, 'AD5'=>nil, 'AE5'=>nil, 'AF5'=>nil, 'AG5'=>nil, 'AH5'=>nil, 'AI5'=>nil, 'AJ5'=>nil, 'AK5'=>nil, 'AL5'=>nil, 'AM5'=>nil, 'AN5'=>nil, 'AO5'=>nil, 'AP5'=>nil, 'AQ5'=>nil, 'AR5'=>nil, 'AS5'=>nil, 'AT5'=>nil, 'AU5'=>nil, 'AV5'=>nil, 'AW5'=>nil, 'AX5'=>nil, 'AY5'=>nil, 'AZ5'=>'Content 13'},
|
34
|
+
{'A6'=>'1', 'B6'=>'2', 'C6'=>'3'}, {'A7'=>'Content 15', 'B7'=>'Content 16', 'C7'=>'Content 18', 'D7'=>'Content 19'},
|
35
|
+
{'A8'=>nil, 'B8'=>'Content 20', 'C8'=>nil, 'D8'=>nil, 'E8'=>nil, 'F8'=>'Content 21'}]
|
36
|
+
end
|
37
|
+
|
38
|
+
after(:all) do
|
39
|
+
@creek.close
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'open an XLSX file successfully.' do
|
43
|
+
@creek.should_not be_nil
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'find sheets successfully.' do
|
47
|
+
@creek.sheets.count.should == 1
|
48
|
+
sheet = @creek.sheets.first
|
49
|
+
sheet.state.should eql nil
|
50
|
+
sheet.name.should eql 'Sheet1'
|
51
|
+
sheet.rid.should eql 'rId1'
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'Parse rows with empty cells successfully.' do
|
55
|
+
rows = Array.new
|
56
|
+
row_count = 0
|
57
|
+
@creek.sheets[0].rows.each do |row|
|
58
|
+
rows << row
|
59
|
+
row_count += 1
|
60
|
+
end
|
61
|
+
|
62
|
+
rows[0].should == @expected_rows[0]
|
63
|
+
rows[1].should == @expected_rows[1]
|
64
|
+
rows[2].should == @expected_rows[2]
|
65
|
+
rows[3].should == @expected_rows[3]
|
66
|
+
rows[4].should == @expected_rows[4]
|
67
|
+
rows[5].should == @expected_rows[5]
|
68
|
+
rows[6].should == @expected_rows[6]
|
69
|
+
rows[7].should == @expected_rows[7]
|
70
|
+
row_count.should == 8
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'Parse rows with empty cells and meta data successfully.' do
|
74
|
+
rows = Array.new
|
75
|
+
row_count = 0
|
76
|
+
@creek.sheets[0].rows_with_meta_data.each do |row|
|
77
|
+
rows << row
|
78
|
+
row_count += 1
|
79
|
+
end
|
80
|
+
rows.map{|r| r['cells']}.should == @expected_rows
|
81
|
+
end
|
82
|
+
end
|
metadata
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: creek
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- pythonicrubyist
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.13.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.13.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubyzip
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.0.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.0.0
|
83
|
+
description: A Ruby gem that streams and parses large Excel(xlsx and xlsm) files fast
|
84
|
+
and efficiently.
|
85
|
+
email:
|
86
|
+
- pythonicrubyist@gmail.com
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- Gemfile
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.rdoc
|
95
|
+
- Rakefile
|
96
|
+
- creek.gemspec
|
97
|
+
- lib/creek.rb
|
98
|
+
- lib/creek/book.rb
|
99
|
+
- lib/creek/shared_strings.rb
|
100
|
+
- lib/creek/sheet.rb
|
101
|
+
- lib/creek/version.rb
|
102
|
+
- spec/fixtures/invalid.xls
|
103
|
+
- spec/fixtures/sample-as-zip.zip
|
104
|
+
- spec/fixtures/sample.xlsx
|
105
|
+
- spec/fixtures/temp_string_io_file_path_with_no_extension
|
106
|
+
- spec/test_spec.rb
|
107
|
+
homepage: https://github.com/pythonicrubyist/creek
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 1.9.2
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.2.0.rc.1
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: A Ruby gem for parsing large Excel(xlsx and xlsm) files.
|
131
|
+
test_files:
|
132
|
+
- spec/fixtures/invalid.xls
|
133
|
+
- spec/fixtures/sample-as-zip.zip
|
134
|
+
- spec/fixtures/sample.xlsx
|
135
|
+
- spec/fixtures/temp_string_io_file_path_with_no_extension
|
136
|
+
- spec/test_spec.rb
|