spreadsheet 1.2.8 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spreadsheet/version.rb +1 -1
- data/lib/spreadsheet/worksheet.rb +4 -1
- data/test/worksheet.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef4b84832d5a9a7616d0948a54c34342df9205b691ef561d24725c33fcb65b27
|
4
|
+
data.tar.gz: 29dff00bcafb3b46674a1cbd2f57ee433e27d058e69f4da9a6964cac1961f323
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c924c33e13250366696b1ea4d969559d320e270554d0b691d02874980f01442eaaccbe55fdfb2d00bfc37201e7d0be691091a1de2f72a04ad3cb83f47db0134b
|
7
|
+
data.tar.gz: b3526dc452d2f8fc983d0af1a1b531737898d22f03ddf6c9e717fd5eb715444df46f36d9942019751bebaf3c9a1ec825eba7e3bdb7b5ad4dfb83605722de03fa
|
data/lib/spreadsheet/version.rb
CHANGED
@@ -49,7 +49,7 @@ module Spreadsheet
|
|
49
49
|
:right => 0.75,
|
50
50
|
:bottom => 1
|
51
51
|
}
|
52
|
-
@name = opts[:name] || 'Worksheet'
|
52
|
+
@name = sanitize_invalid_characters(opts[:name] || 'Worksheet')
|
53
53
|
@workbook = opts[:workbook]
|
54
54
|
@rows = []
|
55
55
|
@columns = []
|
@@ -366,6 +366,9 @@ module Spreadsheet
|
|
366
366
|
end
|
367
367
|
|
368
368
|
private
|
369
|
+
def sanitize_invalid_characters(name) # :nodoc:
|
370
|
+
name.gsub(Regexp.new('[\\\/\*\?\:\[\]]'.encode(Spreadsheet.client_encoding)), '_')
|
371
|
+
end
|
369
372
|
def index_of_first ary # :nodoc:
|
370
373
|
return unless ary
|
371
374
|
ary.index(ary.find do |elm| elm end)
|
data/test/worksheet.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreadsheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hannes F. Wyss, Masaomi Hatakeyama, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-ole
|