Module: Capistrano::DSL
- Defined in:
- lib/capistrano/locally.rb
Instance Method Summary collapse
Instance Method Details
#on(hosts, options = {}, &block) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/capistrano/locally.rb', line 14 def on(hosts, ={}, &block) return unless hosts localhosts, remotehosts = Array(hosts).partition { |h| h.hostname.to_s == 'localhost' } localhost = Configuration.env.filter(localhosts).first unless localhost.nil? if dry_run? SSHKit::Backend::Printer else SSHKit::Backend::Local end.new(localhost, &block).run end original_on(remotehosts, , &block) end |
#original_on ⇒ Object
12 |
# File 'lib/capistrano/locally.rb', line 12 alias original_on on |