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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a362064dd090d6f75cd124e8ab54797e7f37a517
4
- data.tar.gz: d6935fb38b323b6f2496cf36df0d3f2e4cd76863
2
+ SHA256:
3
+ metadata.gz: dbf7deaac6c1374b387a2a4bd3ec2afe156a653d7fea428c7aaf7c03750d4467
4
+ data.tar.gz: 8f6438c71ac90906eb744cd6088aa9d068a6af50f4a4c10385ec58340c016c34
5
5
  SHA512:
6
- metadata.gz: 39b954b402f4e552344dce9bb677db339e5d1126535e23b5744b71349bd5766d4eb957685c8a27c8c6fd69062e70d269c2a64492555ef7c4014da098e80ffff3
7
- data.tar.gz: 2fd002a7fd4066450feff382eb4c8a9b5c170ae234c036b088ef3d62e9b9eea0b37548f3d188071f5d6fc5224be4195868021a1ce19706c40912009131e1cfcf
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 'axlsx', github: 'randym/axlsx'
7
- gem 'rubyXL', github: 'weshatheleopard/rubyXL'
8
- gem 'simple_xlsx_reader', github: 'woahdae/simple_xlsx_reader'
9
- gem 'creek', github: 'pythonicrubyist/creek'
10
- gem 'oxcelix', github: 'gbiczo/oxcelix'
11
- gem 'roo', github: 'roo-rb/roo'
12
- gem 'dullard', github: 'thirtyseven/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.4.1 on OS X 10.12
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 2.310000 0.040000 2.350000 ( 2.414795)
62
- dullard 1.660000 0.050000 1.710000 ( 1.753160)
63
- oxcelix 1.100000 0.060000 1.160000 ( 1.169371)
64
- roo 2.770000 0.120000 2.890000 ( 2.943509)
65
- rubyXL 3.570000 0.090000 3.660000 ( 3.716661)
66
- saxlsx 0.620000 0.040000 0.660000 ( 0.665471)
67
- simple_xlsx_reader 1.590000 0.030000 1.620000 ( 1.643398)
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 2.840000 0.200000 3.040000 ( 3.335055)
73
- dullard 2.200000 0.250000 2.450000 ( 2.613793)
74
- oxcelix ERROR
75
- roo 3.550000 0.160000 3.710000 ( 3.749528)
76
- rubyXL 3.890000 0.390000 4.280000 ( 4.340749)
77
- saxlsx 0.930000 0.240000 1.170000 ( 1.173783)
78
- simple_xlsx_reader 1.760000 0.040000 1.800000 ( 1.818311)
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Saxlsx
3
- VERSION = '1.9.0'
3
+ VERSION = '1.10.0'
4
4
  end
@@ -7,9 +7,9 @@ module Saxlsx
7
7
  attr_accessor :date1904
8
8
  attr_reader :auto_format
9
9
 
10
- def self.open(*args)
10
+ def self.open(filename, **kw_args)
11
11
  begin
12
- workbook = self.new(*args)
12
+ workbook = new(filename, **kw_args)
13
13
  yield workbook
14
14
  ensure
15
15
  workbook.close if workbook
@@ -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.1.0'
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', "~> 1.5"
27
- spec.add_development_dependency 'rake', '~> 10.1'
28
- spec.add_development_dependency 'rspec', '~> 2.14'
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
@@ -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.new('3.4028236692093801E+38'),
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.new('3.4028236692093801E+38')],
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.new('3.4028236692093801E+38')],
205
+ ["Scientific", BigDecimal('3.4028236692093801E+38')],
206
206
  ["Custom", 123.0],
207
207
  ].each.with_index do |row, i|
208
208
  name, value = row
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
+
3
+ require 'rspec/collection_matchers'
2
4
  require 'saxlsx'
3
5
 
4
6
  include Saxlsx
5
7
 
6
8
  RSpec.configure do |config|
7
- config.color_enabled = true
9
+ config.color = true
8
10
  end
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.9.0
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: 2019-07-12 00:00:00.000000000 Z
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: '10.1'
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: '10.1'
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: '2.14'
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: '2.14'
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.1.0
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
- rubyforge_project:
162
- rubygems_version: 2.6.14
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:
@@ -1,6 +0,0 @@
1
- rvm:
2
- - 2.1
3
- - 2.2
4
- - 2.3
5
- - 2.4.0
6
- - ruby-head