Pajk/rails-restapi — pull request #19 by iNecas (2012-05-23 14:15:43+00:00)
Title: production mode

It allows to pre-generate cache (both html and json files) that can be severed
instead for generating the documentation on runtime. This means that on
production machines you can avoid all the doc-rendering dependencies but still
use the same API both for html and json format.

To use the cache you need to set:

use_cache = true

It also allows you to se the cache dir (public/restapi-cache by default)

cache_dir = File.join(Rails.root, "tmp", "restapi-cache")

To generate the cache, run (it won't work without it):

rake restapi:cache

Last but not least, if you use the cache with validations turned off, the
runtime won't be affected by the documentation at all. This is good in
case you're not sure if it could have some impact on you production
environment: in this mode it won't have any. But you can still documentation
generating at runtime for development environment or validations for running
tests.

It also should fix the failing tests from the exampels.yml pull request.