xlsxtream 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/lib/xlsxtream/row.rb +2 -2
- data/lib/xlsxtream/version.rb +1 -1
- metadata +3 -4
- data/lib/xlsxtream/io/zip_tricks_fibers.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b825830ee0ab905c1f96c80dd54ba8c307578d165ec429c5ffd275e64720225c
|
4
|
+
data.tar.gz: b5b75f151994915de22b8a8533c92f3cdb35d9acfb7a8940b2a4baf7f688cce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d91bb3c4804ac213150e6dfdff6a73f8919ac7f1ce649545af96a8bc328e45180d3ed06cfb0fd2431452d0a8f6999150fd12ccee70ac5dbbbdd23962e11b13e2
|
7
|
+
data.tar.gz: 46d67651baf5d02202563fe4a1c2f756320626ec405cfae9a47b3f03e8b4d6b0b38b60d49889ef365a83deccb296baa6ded0666f141d707d2ea62d157c524bed
|
data/CHANGELOG.md
CHANGED
data/lib/xlsxtream/row.rb
CHANGED
@@ -77,9 +77,9 @@ module Xlsxtream
|
|
77
77
|
when NUMBER_PATTERN
|
78
78
|
value.include?('.') ? value.to_f : value.to_i
|
79
79
|
when DATE_PATTERN
|
80
|
-
Date.parse(value)
|
80
|
+
Date.parse(value) rescue value
|
81
81
|
when TIME_PATTERN
|
82
|
-
DateTime.parse(value)
|
82
|
+
DateTime.parse(value) rescue value
|
83
83
|
else
|
84
84
|
value
|
85
85
|
end
|
data/lib/xlsxtream/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xlsxtream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Bünemann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zip_tricks
|
@@ -118,7 +118,6 @@ files:
|
|
118
118
|
- lib/xlsxtream/io/rubyzip.rb
|
119
119
|
- lib/xlsxtream/io/stream.rb
|
120
120
|
- lib/xlsxtream/io/zip_tricks.rb
|
121
|
-
- lib/xlsxtream/io/zip_tricks_fibers.rb
|
122
121
|
- lib/xlsxtream/row.rb
|
123
122
|
- lib/xlsxtream/shared_string_table.rb
|
124
123
|
- lib/xlsxtream/version.rb
|
@@ -146,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
145
|
version: '0'
|
147
146
|
requirements: []
|
148
147
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.6
|
148
|
+
rubygems_version: 2.7.6
|
150
149
|
signing_key:
|
151
150
|
specification_version: 4
|
152
151
|
summary: Xlsxtream is a streaming XLSX spreadsheet writer
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require "zip_tricks"
|
2
|
-
|
3
|
-
module Xlsxtream
|
4
|
-
module IO
|
5
|
-
class ZipTricksFibers
|
6
|
-
def initialize(body)
|
7
|
-
@streamer = ::ZipTricks::Streamer.new(body)
|
8
|
-
@wf = nil
|
9
|
-
end
|
10
|
-
|
11
|
-
def <<(data)
|
12
|
-
@wf.resume(data)
|
13
|
-
self
|
14
|
-
end
|
15
|
-
|
16
|
-
def add_file(path)
|
17
|
-
@wf.resume(:__close__) if @wf
|
18
|
-
|
19
|
-
@wf = Fiber.new do | bytes_or_close_sym |
|
20
|
-
@streamer.write_deflated_file(path) do |write_sink|
|
21
|
-
loop do
|
22
|
-
break if bytes_or_close_sym == :__close__
|
23
|
-
write_sink << bytes_or_close_sym
|
24
|
-
bytes_or_close_sym = Fiber.yield
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def close
|
31
|
-
@wf.resume(:__close__) if @wf
|
32
|
-
@streamer.close
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|