Customizing deprec Tasks

4 views
Skip to first unread message

Eric Marden

unread,
Feb 2, 2010, 6:52:41 PM2/2/10
to deprec - deployment recipes for capistrano
What's the best way to go about customizing deprec tasks and
configuration templates to conform to conventions already in play at
my organization?

Mike Bailey

unread,
Feb 2, 2010, 10:15:04 PM2/2/10
to deprec - deployment recipes for capistrano
It's very easy to override recipes and templates in deprec.

From lib/deprec/recipes/deprec.rb:

# Deprec checks here for local versions of config templates before
it's own
set :local_template_dir, File.join('config','templates')

The default Capfile generated by the 'depify' loads any local recipes.

Dir['config/*/recipes.rb'].each { |plugin| load(plugin) }

So, if you wanted to override a recipe for apache, just put it in:

config/apache/recipes.rb

You can always add another directory (~/.deprec/recipes) to your
Capfile.
You can also just create another gem with your own recipes and load it
after you load deprec. It can override and add to the recipes.

- Mike

Eric Marden

unread,
Feb 3, 2010, 2:19:42 PM2/3/10
to deprec - deployment recipes for capistrano
On Feb 2, 9:15 pm, Mike Bailey <m...@bailey.net.au> wrote:
> You can also just create another gem with your own recipes and load it
> after you load deprec. It can override and add to the recipes.
>
> - Mike

The prevailing wisdom seems to be to package it as a gem, so that's
the road I started going down. Now that I've got my custom recipes
loading, I can start the process of pulling in the tasks I need and
over riding the rest. Thanks for helping me get going. Mike.

~e

Reply all
Reply to author
Forward
0 new messages