Class: Capistrano::Configuration
- Inherits:
-
Object
- Object
- Capistrano::Configuration
- Defined in:
- lib/capistrano/forwarding/remote.rb
Instance Method Summary collapse
-
#remote_forwarding(fowardings, options = {}) ⇒ Object
Capistrano configuration example.
Instance Method Details
#remote_forwarding(fowardings, options = {}) ⇒ Object
Capistrano configuration example. Forwarding remote port 3000 to local 3000 and ask remote hosts to HTTP GET from local HTTP server running on port 3000.
remote_forwarding [
[3000, "127.0.0.1", 3000]
] do
run "curl 'http://127.0.0.1:3000/'"
end
135 136 137 138 139 140 141 142 143 |
# File 'lib/capistrano/forwarding/remote.rb', line 135 def remote_forwarding(fowardings, = {}) = () execute_on_servers() do |servers| targets = servers.map{|s| sessions[s]} Forwarding::Remote.forward(fowardings, targets) do yield end end end |