I'm refining that block of code, I'll submit the final version in a ticket. In the meantime I've run into an issue with my strategy.
My strategy needs to no-op the finalize_update task. How would you go about doing the no-op from a strategy. On Mon, Aug 15, 2011 at 12:02 PM, dbray <[email protected]> wrote: > I would like to support developing strategies outside of capistrano's > source > > This can be done if you override Capistrano::Deploy::Strategy by rescuing > the LoadError; the other checks make sure you still have a valid strategy > defined that is required somewhere in your deploy.rb > > module Capistrano > module Deploy > module Strategy > def self.new(strategy, config={}) > strategy_file = "capistrano/recipes/deploy/strategy/#{strategy}" > begin > require(strategy_file) > rescue LoadError > end > strategy_const = strategy.to_s.capitalize.gsub(/_(.)/) { $1.upcase > } > if const_defined?(strategy_const) > const_get(strategy_const).new(config) > else > raise Capistrano::Error, "could not find > `#{name}::#{strategy_const}' in `#{strategy_file}'" > end > rescue LoadError > raise Capistrano::Error, "could not find any strategy named > `#{strategy}'" > end > end > end > end > > -- > * 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
