decisive 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/decisive/template_handler.rb +10 -1
- data/lib/decisive/version.rb +1 -1
- 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: 23b80a2524bbbb5ca658e58f19aace65cc19a912261b32110c7745c72e2cea17
|
4
|
+
data.tar.gz: b42ea7da05da22d7658b6ce5daf38029a5704f75cea8e6d3b0872a38a1466b65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f001f7d3efdeb06a04890a7504316b0c24665b7438b2571f9f133d7cf7521612f7a807002334313f31b575be9cb9697f2ebe0ce5a11a72f15bf305c271f735
|
7
|
+
data.tar.gz: a8f98008525bf3537becd12f430c89213f4326e03e1432037486c837d3e94a4c8b499eddfefd6a1ea387b8e1ac45a81f0da2ab79cf0b0c01b3ccc2605fb76182
|
@@ -82,7 +82,7 @@ module Decisive
|
|
82
82
|
|
83
83
|
def render xls
|
84
84
|
worksheets.each do |name, enumerable|
|
85
|
-
sheet = xls.create_worksheet(name: name)
|
85
|
+
sheet = xls.create_worksheet(name: sanitize_name(name))
|
86
86
|
|
87
87
|
rows = to_array(enumerable)
|
88
88
|
|
@@ -93,6 +93,15 @@ module Decisive
|
|
93
93
|
xls
|
94
94
|
end
|
95
95
|
|
96
|
+
def sanitize_name name
|
97
|
+
name
|
98
|
+
.gsub(/[\[\]\*\?:\/\\\t\n\r]/, " ")
|
99
|
+
.gsub(/^'/, "")
|
100
|
+
.gsub(/'$/, "")
|
101
|
+
.strip
|
102
|
+
.slice(0,31)
|
103
|
+
end
|
104
|
+
|
96
105
|
def to_array records
|
97
106
|
context = RenderContext.new(records, nil, block)
|
98
107
|
context.send(:header) + context.send(:body)
|
data/lib/decisive/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decisive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|