puppetlabs/Razor — pull request #495 by fnichol (2013-06-28 21:58:39+00:00)
Title: Add an ext_path configuration option to load external custom code.

This provides an extension point to load in customized Razor models,
kickstart templates, additional persistence backends, etc.

The `ext_path` directory defaults to a path beside the directory
containing Razor's lib/ directory. For example, if Razor is installed
into `/opt/razor`, the `ext_path` directory defaults to
`/opt/razor_ext`.

The extension mechanism will look for an `ext.rb` file in the root of
the `ext_path` directory and require it if it exists. It is up to
extension authors to add further require statements and initialization
logic in this file. Note that the `ext_path` will be added to Razor's
Ruby LOAD_PATH, so a file in the `ext_path` directory called
`acorp/model/acorp_centos_6.rb` can be required in `ext.rb` with:

require 'acorp/model/acorp_centos_6'