Home

Awesome

Dokaz

Dokaz (До́каз) means "proof" in Ukrainian.

Dokaz gem allows you to check all code inside your documentation, and see what it outputs.

It just finds all pieces of <pre>```ruby</pre>-marked code in your .md files, tries to run it and shows you the consequences.

Install

Just as usual -- by adding gem 'dokaz' to your Gemfile then running bundle install.

Or [sudo] gem install dokaz

Usage

dokaz --help

Usage: dokaz [patterns] [options]

Patterns:
  File.md             one file
  File.md:15          only block around line 15
  folder/*.md         all files in folder

Options:
  -r, --require      Additional files to require, comma-separated
  -f, --format       Output format ("spec" or "show[case]")
      --help         Shows this message

Dokaz respects .dokaz file in local folder, which should be just its options, each on newline.

Output formats

<img src="https://raw.github.com/zverok/dokaz/master/screenshots/spec.png" alt="--format spec"/> <img src="https://raw.github.com/zverok/dokaz/master/screenshots/showcase.png" alt="--format showcase"/>

You can just insert it back into your docs.

Using it for your project's README

README.md
--require ./spec/dokaz_helpers.rb

Using it for your project's GitHub wiki

Known issues

License

MIT