Hi Aaron - 

You may want to use a different approach rather than patching the existing 
implementation.  You could create your own strategy that inherits from the Copy 
strategy and then implement your own command method.  For example:

module Capistrano
 module Deploy
   module Strategy
     class AaronsCopyStrategy < Copy
     
        def command
          ...
        end
     
     end
   end
  end
end

And in your deploy file you can set the strategy to user your custom strategy:

set :deploy_via, :aarons_copy_strategy

Check out this custom strategy that we developed for ideas:

http://github.com/vigetlabs/capistrano_rsync_with_remote_cache

I don't think (hope) the multiple nested directory structure is necessary if 
you're just doing a one-off implementation for your project.

p.

On Sep 2, 2010, at 2:06 PM, Aaron Starr wrote:

> Hey, all,
> 
> I need to use the copy strategy for deployment, but I need to change how we
> get the latest copy of the code. I'm trying to
> override Capistrano::Deploy::Strategy::Copy.command by putting this in the
> deploy.rb file:
> 
> module Capistrano
>  module Deploy
>    module Strategy
>      class Copy < Base
>        private
>        def command
>          @command ||= [...]
>        end
> [...]
> 
> Clearly, that's not very clever. The error I'm getting is this:
> 
> ./config/deploy.rb:115:in `load': uninitialized constant
> #<Class:0x101757b80>::Capistrano::Deploy::Strategy::Base (NameError)
> 
> So, is there some way to override that method? Or, some other way that I
> can't see to write my own repository-retrieval, but otherwise keep all the
> functionality of the copy strategy?
> 
> Thanks,
> 
> Aaron
> 
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en

--
Patrick Reagan <[email protected]>





-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to