Cap 2.0 Plugin conventions

2 views
Skip to first unread message

Geoff

unread,
May 26, 2007, 8:28:32 AM5/26/07
to Capistrano
I've recently been in contact with Mike Bailey regarding setting out
conventions for capistrano plugin authors. He is the author of the
deprec group of recipes and I've started a rubyforge project called
palmtree which also provides recipes for capistrano 2.

We now have a slight bit of overlap in the recipes were are providing
and we've been talking about how best to overcome these problems.
Currently the best idea would be for plugin authors to put all of
their recipes under a namespace of the gem name. For example

palmtree:backgroundrb:start

as gems essentially have to be unique to exist on rubyforge. Now we
realise that not everyone is going to want to have to bash out the gem
name for all of their recipes which come from gems. Currently they
could just write they own "backgroundrb:start" task which just calls
"palmtree.backgroundrb.start" but thats more work for the user.

I was thinking it would be advantageous if a user could somehow
include or pull a namespace down into the root namespace. Some way of
getting the "palmtree:backgroundrb:*" tasks down to just
"backgroundrb:*". Something akin to an include or c++ style "using"
statement.

Another thing we talked about was how recipe specific variables should
be handled. Obviously

set :palmtree_backgroundrb_port, 3000

is not very pleasant, but how could this situation be addressed? Say
you used two gems which each did things with backgroundrb and each one
had a :backgroundrb_port variable. Admittedly both of these are likely
to be used in the same way but there could be situations where two
groups of recipes share the same variable and use them in ways which
would conflict.

Any thoughts on these?

Geoff

Reply all
Reply to author
Forward
0 new messages