diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..01a9a54 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM ruby:3.4 + +WORKDIR /usr/src/app + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt install -y default-jre \ No newline at end of file diff --git a/README.md b/README.md index cf2b436..b7e7ce2 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,19 @@ See tests for examples. 1. The library, for ZUGFeRD 2.x, currently only supports the EN16931 variant. This is probably what you want as well. PRs welcome. 3. This does not contain any code to attach the XML to a PDF file, mainly because I have yet to find a ruby library to do that. For software that does this, take a look at [this python library](https://github.com/akretion/factur-x) or [this Java library which also does extended validation](https://mustangproject.org) +## Gem development & test +### With docker compose installed +```shell +docker compose up +``` +### Without docker compose installed +* install ruby +* install jre +* bundle install +```shell +bundle exec rake +``` + ## Contributors See [CONTRIBUTORS.md](CONTRIBUTORS.md). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9183e99 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +volumes: + bundle: + +services: + app: + build: + context: . + command: bash -c 'bundle && bundle exec rake' + volumes: + - .:/usr/src/app + - "bundle:/bundle" + environment: + BUNDLE_PATH: /bundle \ No newline at end of file