diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-03-12 22:07:12 +0300 |
|---|---|---|
| committer | Marat Radchenko <marat@slonopotamus.org> | 2020-03-12 22:07:12 +0300 |
| commit | 729367771ff0e7b8efec59cd6173536e8e411002 (patch) | |
| tree | c90b5c9693f9d6c125512589384529aa0d59dda3 /spec | |
| parent | d367d5f2ab40c44fcef78f4ca4b6af1949b02ac3 (diff) | |
fix files not being unzipped when 'ebook-extract' attribute is used
Unzipping was broken due to fixes for CVE-2018-1000544 in rubyzip: [1], [2].
Also, see [3].
[1]: rubyzip/rubyzip#371
[2]: rubyzip/rubyzip#376
[3]: rubyzip/rubyzip#354
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/converter_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/converter_spec.rb b/spec/converter_spec.rb index b3ad1c7..4cacebf 100644 --- a/spec/converter_spec.rb +++ b/spec/converter_spec.rb @@ -31,6 +31,12 @@ describe Asciidoctor::Epub3::Converter do end end + it 'extracts book when given ebook-extract attribute' do + _, out_file = to_epub fixture_file('minimal/book.adoc'), attributes: { 'ebook-extract' => '' } + out_dir = out_file.dirname + expect(out_dir.join('book', 'EPUB', 'package.opf')).to exist + end + it 'uses current date as fallback when date attributes cannot be parsed' do # TODO: assert that error log contains 'failed to parse revdate' error when we add test infrastructure for logs book, = to_epub fixture_file('minimal/book.adoc'), attributes: { 'revdate' => 'garbage' } |
