Skip to content
Execute example code in readme files
Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
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
You can’t perform that action at this time.