Could also simply load it into the :some_app namespace -- that is, make it
'some_app:deploy'. Is it naive of me to assume no one would depend on
something like:

namespace :my_app do
  load 'deploy'
end

task :not_in_my_app do
  deploy.symlink
end

after :not_in_my_app, 'deploy:web:enable'


I would expect the more common case, which should still work, is something
like:

namespace :my_app do
  load 'deploy'

  task :in_my_app do
    deploy.symlink
  end
  after :in_my_app, 'deploy:web:enable'
end


(These are contrived examples, by the way.)

On Thu, Apr 10, 2008 at 11:30 AM, Jamis Buck <[EMAIL PROTECTED]> wrote:

> I wonder if it wouldn't be better to make something like the following
> work as you would expect:
>
>  namespace :some_app do
>    load 'deploy'
>  end
>
> I suppose there is a risk of that breaking existing scripts that depend on
> the current behavior, though. Could possibly introduce another keyword:
>
>  namespace :some_app do
>    load_into_namespace 'deploy'
>  end
>
> I don't like 'load_into_namespace', but that's just a matter of finding a
> better name. If someone were to whip up a patch, I'd consider it.
>
> - Jamis
>
>
> On Apr 10, 2008, at 10:14 AM, Adam Keys wrote:
>
> >
> > On Apr 8, 2008, at 11:24 AM, Erik Hollensbe wrote:
> >
> > >
> > >
> > > Why not require them in the main capfile? (Use Dir[] to iterate over
> > > them if you have to), they could inject their namespaces themselves.
> > >
> > > should create a global cap -T listing as well.
> > >
> >
> >
> > Yeah, that's the first thing I tried. However, the standard Capistrano
> > recipe for Rails defines everything in the deploy namespace. I could
> > fork the deploy recipe from Capistrano, but that makes me sad.
> >
> > Jamis, would you accept a patch that optionally defines the standard
> > deploy recipes in a namespace? For instance:
> >
> >  set :deploy_namespace, 'some_app'
> > >
> > > load 'deploy'
> > >
> >
> > $ cap some_app:update some_app:deploy:restart
> >
> > --
> > ~akk
> > http://therealadam.com
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to