lib/epubmaker/epubv2.rb in review-2.1.0 vs lib/epubmaker/epubv2.rb in review-2.2.0
- old
+ new
@@ -9,10 +9,11 @@
# For details of the GNU LGPL, see the file "COPYING".
#
require 'epubmaker/epubcommon'
require 'cgi'
+require 'epubmaker/zip_exporter'
module EPUBMaker
# EPUBv2 is EPUB version 2 producer.
class EPUBv2 < EPUBCommon
@@ -130,10 +131,11 @@
File.open("#{tmpdir}/OEBPS/#{@producer.params["bookname"]}.ncx", "w") {|f| @producer.ncx(f, @producer.params["epubmaker"]["ncxindent"]) }
File.open("#{tmpdir}/OEBPS/#{@producer.params["bookname"]}-toc.#{@producer.params["htmlext"]}", "w") {|f| @producer.mytoc(f) } unless @producer.params["mytoc"].nil?
@producer.call_hook(@producer.params["epubmaker"]["hook_prepack"], tmpdir)
- export_zip(tmpdir, epubfile)
+ expoter = EPUBMaker::ZipExporter.new(tmpdir, @producer.params)
+ expoter.export_zip(epubfile)
end
end
end