Execute example code in readme files
Ruby
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec/docu
.gitignore
.travis.yml
EXAMPLE_README.md
EXAMPLE_README.md.docu
Gemfile
README.md
Rakefile
docu.gemspec

README.md

docu

Executes code examples you may have in your readme files!

Example README.md.docu

Hello!
======

:example:
1 + 1000
#=> 1001
:end:

This file will generate a README.md that looks like this:

Hello!
======

1 + 1000
#=> 1001

It will also fail if any assertions don't match up.

Usage

gem install docu
docu README.md.docu

Rake Task

require "docu/rake/task"

Docu::Rake::Task.new do |task|
  task.file = "README.md.docu"
end
rake docu