lib/write_xlsx/workbook.rb in write_xlsx-0.76.1 vs lib/write_xlsx/workbook.rb in write_xlsx-0.76.2
- old
+ new
@@ -7,12 +7,11 @@
require 'write_xlsx/formats'
require 'write_xlsx/format'
require 'write_xlsx/shape'
require 'write_xlsx/utility'
require 'write_xlsx/chart'
-ruby_18 { require 'write_xlsx/zip_file_utils' }
-ruby_19 { require 'zip' }
+require 'write_xlsx/zip_file_utils'
require 'tmpdir'
require 'tempfile'
require 'digest/md5'
module Writexlsx
@@ -1230,16 +1229,10 @@
# Free up the Packager object.
packager = nil
# Store the xlsx component files with the temp dir name removed.
- ruby_19 do
- # See https://github.com/randym/axlsx
- Zip::OutputStream.open(@filename) do |zip|
- write_parts(zip)
- end
- end ||
- ruby_18 { ZipFileUtils.zip("#{@tempdir}", @filename) }
+ ZipFileUtils.zip("#{@tempdir}", @filename)
IO.copy_stream(@filename, @fileobj) if @fileobj
Writexlsx::Utility.delete_files(@tempdir)
end