diff --git a/Dockerfile b/Dockerfile index ba467d86..54de973b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ARG asciidoctor_confluence_version=0.0.2 ARG asciidoctor_pdf_version=1.5.4 ARG asciidoctor_diagram_version=2.1.0 ARG asciidoctor_epub3_version=1.5.0.alpha.19 +ARG asciidoctor_fb2_version=0.5.1 ARG asciidoctor_mathematical_version=0.3.5 ARG asciidoctor_revealjs_version=4.1.0 ARG kramdown_asciidoc_version=1.0.1 @@ -15,6 +16,7 @@ ENV ASCIIDOCTOR_VERSION=${asciidoctor_version} \ ASCIIDOCTOR_PDF_VERSION=${asciidoctor_pdf_version} \ ASCIIDOCTOR_DIAGRAM_VERSION=${asciidoctor_diagram_version} \ ASCIIDOCTOR_EPUB3_VERSION=${asciidoctor_epub3_version} \ + ASCIIDOCTOR_FB2_VERSION=${asciidoctor_fb2_version} \ ASCIIDOCTOR_MATHEMATICAL_VERSION=${asciidoctor_mathematical_version} \ ASCIIDOCTOR_REVEALJS_VERSION=${asciidoctor_revealjs_version} \ KRAMDOWN_ASCIIDOC_VERSION=${kramdown_asciidoc_version} \ @@ -92,6 +94,7 @@ RUN apk add --no-cache --virtual .rubymakedepends \ "asciidoctor-confluence:${ASCIIDOCTOR_CONFLUENCE_VERSION}" \ "asciidoctor-diagram:${ASCIIDOCTOR_DIAGRAM_VERSION}" \ "asciidoctor-epub3:${ASCIIDOCTOR_EPUB3_VERSION}" \ + "asciidoctor-fb2:${ASCIIDOCTOR_FB2_VERSION}" \ "asciidoctor-mathematical:${ASCIIDOCTOR_MATHEMATICAL_VERSION}" \ asciimath \ "asciidoctor-pdf:${ASCIIDOCTOR_PDF_VERSION}" \ diff --git a/Makefile b/Makefile index 5d11acf1..6bcfdae2 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ ASCIIDOCTOR_CONFLUENCE_VERSION ?= 0.0.2 ASCIIDOCTOR_PDF_VERSION ?= 1.5.4 ASCIIDOCTOR_DIAGRAM_VERSION ?= 2.1.0 ASCIIDOCTOR_EPUB3_VERSION ?= 1.5.0.alpha.19 +ASCIIDOCTOR_FB2_VERSION ?= 0.5.1 ASCIIDOCTOR_MATHEMATICAL_VERSION ?= 0.3.5 ASCIIDOCTOR_REVEALJS_VERSION ?= 4.0.1 KRAMDOWN_ASCIIDOC_VERSION ?= 1.0.1 @@ -27,6 +28,7 @@ export DOCKER_IMAGE_NAME_TO_TEST \ ASCIIDOCTOR_PDF_VERSION \ ASCIIDOCTOR_DIAGRAM_VERSION \ ASCIIDOCTOR_EPUB3_VERSION \ + ASCIIDOCTOR_FB2_VERSION \ ASCIIDOCTOR_MATHEMATICAL_VERSION \ ASCIIDOCTOR_REVEALJS_VERSION \ KRAMDOWN_ASCIIDOC_VERSION \ diff --git a/README.adoc b/README.adoc index 9ab8e2ee..5c4f8a58 100644 --- a/README.adoc +++ b/README.adoc @@ -14,6 +14,7 @@ This Docker image provides: * https://asciidoctor.org/docs/asciidoctor-diagram/[Asciidoctor Diagram] 2.1.0 with ERD and Graphviz integration (supports plantuml and graphiz diagrams) * https://asciidoctor.org/docs/asciidoctor-pdf/[Asciidoctor PDF] 1.5.4 * https://asciidoctor.org/docs/asciidoctor-epub3/[Asciidoctor EPUB3] 1.5.0.alpha.19 +* https://github.com/asciidoctor/asciidoctor-fb2/[Asciidoctor FB2] 0.5.1 * https://github.com/asciidoctor/asciidoctor-mathematical[Asciidoctor Mathematical] 0.3.5 * https://docs.asciidoctor.org/reveal.js-converter/latest/[Asciidoctor reveal.js] 4.1.0 * https://rubygems.org/gems/asciimath[AsciiMath] diff --git a/README.md b/README.md index 4a8eedfe..34b1aee8 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ This Docker image provides: - [Asciidoctor EPUB3](https://asciidoctor.org/docs/asciidoctor-epub3/) 1.5.0.alpha.19 +- [Asciidoctor FB2](https://github.com/asciidoctor/asciidoctor-fb2/) 0.5.1 + - [Asciidoctor Mathematical](https://github.com/asciidoctor/asciidoctor-mathematical) 0.3.5 - [Asciidoctor reveal.js](https://docs.asciidoctor.org/reveal.js-converter/latest/) 4.1.0 diff --git a/tests/test_suite.bats b/tests/test_suite.bats index ddf4b602..77a0deba 100644 --- a/tests/test_suite.bats +++ b/tests/test_suite.bats @@ -51,6 +51,12 @@ teardown() { docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which asciidoctor-epub3 } +@test "asciidoctor-fb2 is installed and in version ${ASCIIDOCTOR_FB2_VERSION}" { + docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" asciidoctor-fb2 -v \ + | grep "Asciidoctor FB2" | grep "${ASCIIDOCTOR_VERSION}" \ + | grep "${ASCIIDOCTOR_FB2_VERSION}" +} + @test "curl is installed and in the path" { docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which curl } @@ -104,6 +110,17 @@ teardown() { /documents/fixtures/basic-example.adoc } +@test "We can generate an FB2 document from basic example without errors/warnings" { + + docker run -t --rm \ + -v "${BATS_TEST_DIRNAME}":/documents/ \ + "${DOCKER_IMAGE_NAME_TO_TEST}" \ + asciidoctor-fb2 -D /documents/tmp -r asciidoctor-mathematical \ + --failure-level WARN \ + /documents/fixtures/basic-example.adoc + +} + @test "We can generate an HTML document with a diagram with asciidoctor-diagram as backend" { run docker run -t --rm \ -v "${BATS_TEST_DIRNAME}":/documents/ \