Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def run_task_on_single_host Capistrano::Configuration::Roles.class_eval do yield end end if ENV['server'] run_task_on_single_host do alias old_role role def role(which, *args) options = args.last.is_a?(Hash) ? args.pop : {} which = which.to_sym args.each do |host| next unless ENV['server'] == host roles[which] << ServerDefinition.new(host, options) end end end end
This paste will be private.
From the Design Piracy series on my blog: