It's not wrong if it works; but it certainly has a smell to it. 

I would initialize the variable to nothing then use before or after hooks and 
populate the variable as appropriate. 

On Nov 2, 2010, at 9:07 AM, bs <[email protected]> wrote:

> I have a multiple artifact system consisting of a few war files and a
> website.  Some artifacts are not deployed on all machines in our
> stack.  I want to use Capistrano to deploy any artifact individually
> to the appropriate servers or all artifacts together.
> 
> I accomplished this by calling reset! on all of the items stored in
> the @variables Hash that Capistrano uses to store its state.
> 
> The end result right now is that everything is working as desired but
> I wanted to see what the group thought about my method and whether or
> not it is an appropriate use or if it will burn me in future versions
> of Capistrano.
> 
> Capfile is here: http://gist.github.com/659823
> 
> Note the reset_variables method and its use from the :shrine task.
> 
> Other relevant info:
> ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
> Capistrano v2.5.19
> 
> Thanks for your help and advice.
> 
> -- 
> * 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

-- 
* 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