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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e9291c6ab43b7b9218c0341b2556daabe838f919
4
- data.tar.gz: 31aca2466d4cbd18fdc4a3ec9181de16a9488f70
2
+ SHA256:
3
+ metadata.gz: b825830ee0ab905c1f96c80dd54ba8c307578d165ec429c5ffd275e64720225c
4
+ data.tar.gz: b5b75f151994915de22b8a8533c92f3cdb35d9acfb7a8940b2a4baf7f688cce7
5
5
  SHA512:
6
- metadata.gz: cd1d0aab1d0c4117f87ccd9efc432977d4057538ecc4769a339ea46f964020a02b255f971ce8aa1a1c2c4af6d28814a8d740ee1cf0fabcfe76d8c6741312fe19
7
- data.tar.gz: 5c373153d1b97ca5db24c7c8cd7be7e79605a4129993f2d8b586b3e8ee1fc9c8ccdd51478886a0ca3bebde688ffc72c20e7b932293ff2e2bc861fbcaf6d9cea5
6
+ metadata.gz: d91bb3c4804ac213150e6dfdff6a73f8919ac7f1ce649545af96a8bc328e45180d3ed06cfb0fd2431452d0a8f6999150fd12ccee70ac5dbbbdd23962e11b13e2
7
+ data.tar.gz: 46d67651baf5d02202563fe4a1c2f756320626ec405cfae9a47b3f03e8b4d6b0b38b60d49889ef365a83deccb296baa6ded0666f141d707d2ea62d157c524bed
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1 (2018-03-11)
4
+
5
+ - Rescue gracefully from invalid dates with auto-format (#22)
6
+ - Remove unused ZipTricksFibers IO wrapper (#24)
7
+
3
8
  ## 2.0.0 (2017-10-31)
4
9
 
5
10
  - Replace RubyZip with ZipTricks as default compressor (#16)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Xlsxtream
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
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.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: 2017-10-31 00:00:00.000000000 Z
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.13
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