Created
February 2, 2009 23:11
-
-
Save btakita/57165 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Capistrano::Configuration::Connections | |
alias_method :execute_on_servers_without_ignoring_no_matching_server_error, :execute_on_servers | |
def execute_on_servers_with_ignoring_no_matching_server_error(*args, &block) | |
execute_on_servers_without_ignoring_no_matching_server_error(*args, &block) | |
rescue Capistrano::NoMatchingServersError => e | |
logger.info "skipping `#{current_task.fully_qualified_name}' because no servers matched" | |
end | |
alias_method :execute_on_servers, :execute_on_servers_with_ignoring_no_matching_server_error | |
end | |
module Capistrano::Configuration::Servers | |
protected | |
def role_list_from(roles) | |
roles = roles.split(/,/) if String === roles | |
roles = build_list(roles) | |
roles.map do |role| | |
role = String === role ? role.strip.to_sym : role | |
self.roles.key?(role) ? role : nil | |
end.flatten | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment