diff --git a/Dockerfile b/Dockerfile index 9dfa42d..d3d0eda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ -FROM ruby +FROM frolvlad/alpine-oraclejdk8:slim + MAINTAINER think@hotmail.de # TODO: activate --ngram -RUN \ - apt-get update && \ - apt-get install -y unzip default-jre && \ - gem install gherkin_language --no-format-exec && \ - echo "Feature: Empty" > /tmp/empty.feature && \ - gherkin_language /tmp/empty.feature && \ - rm /tmp/empty.feature +RUN apk --update add ruby ruby-dev build-base ruby-rdoc ruby-irb ca-certificates openssl \ + && gem install gherkin_language json --no-format-exec \ + && echo "Feature: Empty" > /tmp/empty.feature \ + && gherkin_language /tmp/empty.feature \ + && rm /tmp/empty.feature \ + && apk del ruby-dev build-base ruby-rdoc ruby-irb ca-certificates openssl \ + && rm -rf /var/cache/apk \ + && ls -1 /tmp/LanguageTool*/org/languagetool/resource/ | grep -v en | xargs rm -rf /tmp/LanguageTool*/org/languagetool/resource/ -CMD gherkin_language +ENTRYPOINT ["gherkin_language"] +CMD ["--help"] diff --git a/README.md b/README.md index 0ed9da0..f3246ed 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ -Check Language of Gherkin Files -=============================== +# Check Language of Gherkin Files [![Build Status](https://travis-ci.org/funkwerk/gherkin_language.svg)](https://travis-ci.org/funkwerk/gherkin_language) +[![Latest Tag](https://img.shields.io/github/tag/funkwerk/gherkin_language.svg)](https://github.com/funkwerk/gherkin_language) This tool analyzes the language of gherkin files and report language errors. Currently just English is supported. -Usage ------ +## Usage run `gherkin_language` on a list of files @@ -29,9 +28,15 @@ By default it will accept unknown words. For warnings about unknown words add `- Get a readability report using `--readability`. It indicates, which files are not good readable. +### Usage with Docker -Glossary --------- +Assuming there is a `test.feature` within the current folder, then the following command will check the feature file. + +``` +docker run -t -v $(pwd):/user -w /user gherkin/language test.feature +``` + +## Glossary It happens that there are words which are unknown to the dictionary. Once this happens think about if could use another word, that is more common. If there is no such word, add it to the directory-located glossary.