saxlsx 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +20 -0
- data/Gemfile +7 -7
- data/README.md +15 -17
- data/lib/saxlsx/version.rb +1 -1
- data/lib/saxlsx/workbook.rb +2 -2
- data/saxlsx.gemspec +5 -4
- data/spec/sheet_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -1
- metadata +28 -15
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dbf7deaac6c1374b387a2a4bd3ec2afe156a653d7fea428c7aaf7c03750d4467
|
4
|
+
data.tar.gz: 8f6438c71ac90906eb744cd6088aa9d068a6af50f4a4c10385ec58340c016c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f9a9d1a87543144bd80c6478dcc4b2ab48cf6a22b25bbf617564f2bf2538fff0889c9fff0db4f7821d8929213a48f42fe56fad8e209a296d0b77274bb83c75
|
7
|
+
data.tar.gz: e40bbc6c0d587f913a88ce588bdf5c90ac3e7d4b60ca134d1f1c65e5fcd21bfbef0d7707fa83d1d5e12141479484523fbf1b2ac85811dfc6dcb5feec77284f67
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0']
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: ${{ matrix.ruby-version }}
|
18
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
19
|
+
- name: Run tests
|
20
|
+
run: bundle exec rake
|
data/Gemfile
CHANGED
@@ -3,10 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in saxlsx.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem '
|
7
|
-
gem 'rubyXL'
|
8
|
-
gem 'simple_xlsx_reader'
|
9
|
-
gem 'creek'
|
10
|
-
gem 'oxcelix'
|
11
|
-
gem 'roo'
|
12
|
-
gem 'dullard'
|
6
|
+
gem 'caxlsx'
|
7
|
+
gem 'rubyXL'
|
8
|
+
gem 'simple_xlsx_reader'
|
9
|
+
gem 'creek'
|
10
|
+
gem 'oxcelix'
|
11
|
+
gem 'roo'
|
12
|
+
gem 'dullard'
|
data/README.md
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
[![Join the chat at https://gitter.im/mak-it/saxlsx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mak-it/saxlsx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4
4
|
|
5
|
-
[![Build Status](https://travis-ci.org/mak-it/saxlsx.svg?branch=master)](https://travis-ci.org/mak-it/saxlsx)
|
6
|
-
|
7
5
|
**Fast** and memory efficient XLSX reader on top of Ox SAX parser.
|
8
6
|
|
9
7
|
It reads row by row and doesn't store the whole sheet in memory, so this
|
@@ -52,30 +50,30 @@ using `auto_format: false`.
|
|
52
50
|
$ rake bench
|
53
51
|
```
|
54
52
|
|
55
|
-
ruby 2.
|
53
|
+
ruby 2.7 on OS X
|
56
54
|
|
57
55
|
```
|
58
56
|
Shared Strings
|
59
57
|
|
60
58
|
user system total real
|
61
|
-
creek
|
62
|
-
dullard 1.
|
63
|
-
oxcelix
|
64
|
-
roo
|
65
|
-
rubyXL
|
66
|
-
saxlsx 0.
|
67
|
-
simple_xlsx_reader 1.
|
59
|
+
creek 1.296539 0.029374 1.325913 ( 1.340820)
|
60
|
+
dullard 1.178981 0.025073 1.204054 ( 1.221381)
|
61
|
+
oxcelix 0.985258 0.025028 1.010286 ( 1.023730)
|
62
|
+
roo 0.971155 0.029964 1.001119 ( 1.016452)
|
63
|
+
rubyXL 2.979334 0.055708 3.035042 ( 3.079301)
|
64
|
+
saxlsx 0.473398 0.011342 0.484740 ( 0.490247)
|
65
|
+
simple_xlsx_reader 1.209074 0.024579 1.233653 ( 1.249957)
|
68
66
|
|
69
67
|
Inline Strings
|
70
68
|
|
71
69
|
user system total real
|
72
|
-
creek
|
73
|
-
dullard
|
74
|
-
oxcelix
|
75
|
-
roo
|
76
|
-
rubyXL 3.
|
77
|
-
saxlsx 0.
|
78
|
-
simple_xlsx_reader 1.
|
70
|
+
creek 1.471115 0.075182 1.546297 ( 1.567045)
|
71
|
+
dullard 1.338499 0.085116 1.423615 ( 1.443386)
|
72
|
+
oxcelix ERROR
|
73
|
+
roo 1.133878 0.052834 1.186712 ( 1.208369)
|
74
|
+
rubyXL 3.213630 0.070255 3.283885 ( 3.324428)
|
75
|
+
saxlsx 0.667601 0.024265 0.691866 ( 0.696603)
|
76
|
+
simple_xlsx_reader 1.350298 0.028411 1.378709 ( 1.396583)
|
79
77
|
```
|
80
78
|
|
81
79
|
## Contributing
|
data/lib/saxlsx/version.rb
CHANGED
data/lib/saxlsx/workbook.rb
CHANGED
@@ -7,9 +7,9 @@ module Saxlsx
|
|
7
7
|
attr_accessor :date1904
|
8
8
|
attr_reader :auto_format
|
9
9
|
|
10
|
-
def self.open(
|
10
|
+
def self.open(filename, **kw_args)
|
11
11
|
begin
|
12
|
-
workbook =
|
12
|
+
workbook = new(filename, **kw_args)
|
13
13
|
yield workbook
|
14
14
|
ensure
|
15
15
|
workbook.close if workbook
|
data/saxlsx.gemspec
CHANGED
@@ -18,13 +18,14 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^spec/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.5.0'
|
22
22
|
|
23
23
|
spec.add_dependency 'rubyzip', '~> 1.0'
|
24
24
|
spec.add_dependency 'ox', '~> 2.1'
|
25
25
|
|
26
|
-
spec.add_development_dependency 'bundler', "
|
27
|
-
spec.add_development_dependency 'rake', '~>
|
28
|
-
spec.add_development_dependency 'rspec', '~>
|
26
|
+
spec.add_development_dependency 'bundler', ">= 1.5"
|
27
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
29
|
+
spec.add_development_dependency 'rspec-collection_matchers'
|
29
30
|
spec.add_development_dependency 'simplecov', '~> 0.8'
|
30
31
|
end
|
data/spec/sheet_spec.rb
CHANGED
@@ -36,7 +36,7 @@ describe Sheet do
|
|
36
36
|
3,
|
37
37
|
DateTime.new(2013, 12, 13, 8, 0, 58),
|
38
38
|
DateTime.new(1970, 1, 1),
|
39
|
-
BigDecimal
|
39
|
+
BigDecimal('3.4028236692093801E+38'),
|
40
40
|
DateTime.new(2015, 2, 13, 12, 40, 5)
|
41
41
|
]
|
42
42
|
s.rows[1].should eq [
|
@@ -175,7 +175,7 @@ describe Sheet do
|
|
175
175
|
["Time", DateTime.new(2015, 2, 13, 12, 40, 5)],
|
176
176
|
["Percentage", 0.9999],
|
177
177
|
["Fraction", 0.5],
|
178
|
-
["Scientific", BigDecimal
|
178
|
+
["Scientific", BigDecimal('3.4028236692093801E+38')],
|
179
179
|
["Custom", 123.0],
|
180
180
|
].each.with_index do |row, i|
|
181
181
|
name, value = row
|
@@ -202,7 +202,7 @@ describe Sheet do
|
|
202
202
|
["Time", DateTime.new(2015, 2, 13, 12, 40, 5)],
|
203
203
|
["Percentage", 0.9999],
|
204
204
|
["Fraction", 0.5],
|
205
|
-
["Scientific", BigDecimal
|
205
|
+
["Scientific", BigDecimal('3.4028236692093801E+38')],
|
206
206
|
["Custom", 123.0],
|
207
207
|
].each.with_index do |row, i|
|
208
208
|
name, value = row
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saxlsx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edgars Beigarts
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.5'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -58,28 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.10'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.10'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-collection_matchers
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: simplecov
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,8 +116,8 @@ executables:
|
|
102
116
|
extensions: []
|
103
117
|
extra_rdoc_files: []
|
104
118
|
files:
|
119
|
+
- ".github/workflows/ruby.yml"
|
105
120
|
- ".gitignore"
|
106
|
-
- ".travis.yml"
|
107
121
|
- Gemfile
|
108
122
|
- LICENSE.txt
|
109
123
|
- README.md
|
@@ -143,7 +157,7 @@ homepage: https://github.com/mak-it/saxlsx
|
|
143
157
|
licenses:
|
144
158
|
- MIT
|
145
159
|
metadata: {}
|
146
|
-
post_install_message:
|
160
|
+
post_install_message:
|
147
161
|
rdoc_options: []
|
148
162
|
require_paths:
|
149
163
|
- lib
|
@@ -151,16 +165,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
165
|
requirements:
|
152
166
|
- - ">="
|
153
167
|
- !ruby/object:Gem::Version
|
154
|
-
version: 2.
|
168
|
+
version: 2.5.0
|
155
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
requirements: []
|
161
|
-
|
162
|
-
|
163
|
-
signing_key:
|
175
|
+
rubygems_version: 3.1.4
|
176
|
+
signing_key:
|
164
177
|
specification_version: 4
|
165
178
|
summary: Fast xlsx reader on top of Ox SAX parser
|
166
179
|
test_files:
|