Skip to content

Commit

Permalink
Add asciidoctor-fb2
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Apr 1, 2021
1 parent 4c97718 commit 5143c42
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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} \
Expand Down Expand Up @@ -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}" \
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions tests/test_suite.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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/ \
Expand Down

0 comments on commit 5143c42

Please sign in to comment.