You can add your task under any directory structure and load it like so:
Dir.glob('capistrano/tasks/*.cap').each { |r| load r }
As long as all the tasks hook into the current capistrano flow such as
after deploy:started, my_namespace:my_task
Capistrano will hook it into it's flow.
On Sunday, December 8, 2013 10:27:53 AM UTC-5, Mathieu Allaire wrote:
>
> Hi there, I'm using Capistrano 3, and I would like to wrap my tasks
> (recipes) and templates in a gem, so I wouldn't have to duplicate that in
> every rails project.
>
> A quick GitHub search returned a lot of different ways (not sure the best
> one), and mostly using Capistrano 2 (probably changed in Cap 3).
>
> Anybody can point me to the right direction to wrap my stuff in a gem
> using Cap 3 ?
>
> Thank you!
>
--
You received this message because you are subscribed to the Google Groups
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/capistrano/7b7b865c-44b2-44e5-a259-37cf9903b658%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.