Ruby gem to convert gherkin feature files into html and pdf flavour.
More flavours coming soon!
gem install flavored_gherkin
- RDoc documentation available on RubyDoc.info
- Source code available on GitHub
Option | Type | Default | Values |
---|---|---|---|
title | [String] | 'Flavored Gherkin' | Flavored Gherkin Title |
feature_path / input_path | [String] | Present Working Directory | Feature Files Path |
output_path | [String] | Present Working Directory | Flavored Gherkin Output Path |
flavour | [String] | 'Html' | 'Html' or 'Pdf' |
require 'flavored_gherkin'
# Example 1:
FlavoredGherkin.configure do |config|
config.title = 'My Features'
config.feature_path = 'myFolder/features'
config.output_path = 'myFolder/my_features'
end
FlavoredGherkin.build
# Example 2:
options = {
title: 'My Features',
feature_path: 'myFolder/features',
output_path: 'myFolder/my_features'
}
FlavoredGherkin.build options
# Example 3:
FlavoredGherkin.set 'title', 'My Features'
FlavoredGherkin.set 'feature_path', 'myFolder/features'
FlavoredGherkin.set 'output_path', 'myFolder/my_features'
FlavoredGherkin.build
# Example 4:
FlavoredGherkin.title = 'My Features'
FlavoredGherkin.feature_path = 'myFolder/features'
FlavoredGherkin.output_path = 'myFolder/my_features'
FlavoredGherkin.flavour = 'pdf'
FlavoredGherkin.build
Option | Values | Explanation |
---|---|---|
-t, --source | TITLE | Flavored Gherkin Title |
-f, --features / -i, --in | FEATURE_PATH | Feature Files Path |
-o, --out | OUTPUT_PATH | Flavored Gherkin Output Path |
-F, --flavour | FLAVOUR | 'Html' or 'Pdf' |
flavored_gherkin
flavored_gherkin -f 'myFolder/features'
flavored_gherkin -t 'My Features' -f 'myFolder/features' -o 'myFolder/my_features'
We're open to any contribution. It has to be tested properly though.
Copyright (c) 2017 MIT LICENSE