Randy Please open an issue at GH issues for this, and someone will take care of it, eventually!
- Lee On 8 November 2012 22:34, RandyInLA <[email protected]> wrote: > I just got bitten by this again today as I updated Capistrano this > morning. I had to hack the perforce.rb file again to make it work. > > Can anyone please help me override the private authentication method and > add a new variable via my code and not by hacking Capistrano? > > Thank you, > -=Randy > > > On Wednesday, April 4, 2012 7:09:08 PM UTC-7, RandyInLA wrote: >> >> Greetings! >> >> My Perforce admin recently decided to force us to add the unicode >> variable, "-C utf8", for all perforce transactions. The unicode var >> can't be part of :p4sync_flags, nor can it be added as any extra >> options. Per the Perforce syntax, it has to live within the existing >> Capistrano authentication method. I can hack the actual perforce.rb >> file, adding the new variable & update the authentication Private >> method to include it, but can't figure out how to overload/override >> the authentication method in my recipes! I'd rather either override >> the methods in my recipe or submit a change to update Capistrano. I >> copied the perforce.rb file, made my changes and pulled out everything >> else that shouldn't change: >> >> ------------------------------**------------------------------** >> ------------------------------**----------------- >> module Capistrano >> module Deploy >> module SCM >> >> class Perforce < Base >> private >> >> # override >> def authentication >> [ p4port && "-p #{ p4port }", >> p4user && "-u #{ p4user }", >> p4passwd && "-P #{ p4passwd }", >> p4client && "-c #{ p4client }", >> p4unicode && "-C #{ p4unicode }" ].compact.join(" ") >> end >> >> # new >> def p4unicode >> variable(:p4unicode) >> end >> >> end >> end >> end >> end >> ------------------------------**------------------------------** >> ------------------------------**----------------- >> >> I've tried putting this in environment.rb, a separate file under / >> initializers & deploy.rb, all without success. I currently have it >> working by hacking the original perforce.rb file in the rubygem and >> that just feels dirty. If anyone can help me override this via my >> deploy.rb file or walk me through how to submit a change to >> Capistrano, I'd be very grateful! >> >> Thanks! >> -=Randy > > -- > * 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
