summaryrefslogtreecommitdiff
path: root/lib/lib_ext
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-04 23:06:10 -0700
committerelijah <elijah@riseup.net>2013-06-04 23:06:10 -0700
commit8f79b632aeeee1111087dee6ebb6302aca700bbd (patch)
tree647b24bee28b28301de6c4a82a916222cde491e8 /lib/lib_ext
parenta46321a43318a9cd3e2dd645b64fe81b71e7f8ea (diff)
add support for `leap facts`. includes some fun new helpers, like run_with_progress(), capture(), and replace_file!().
Diffstat (limited to 'lib/lib_ext')
-rw-r--r--lib/lib_ext/capistrano_connections.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/lib_ext/capistrano_connections.rb b/lib/lib_ext/capistrano_connections.rb
new file mode 100644
index 0000000..c46455f
--- /dev/null
+++ b/lib/lib_ext/capistrano_connections.rb
@@ -0,0 +1,16 @@
+module Capistrano
+ class Configuration
+ module Connections
+ def failed!(server)
+ @failure_callback.call(server) if @failure_callback
+ Thread.current[:failed_sessions] << server
+ end
+
+ def call_on_failure(&block)
+ @failure_callback = block
+ end
+ end
+ end
+end
+
+