No commit activity in last 3 years
No release in over 3 years
Provide SSH port forwarding while deploying
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

Capistrano SSH Port Forwarding Extension

Provide SSH port forwarding while deploying so that we can call local service like Spitball server from remote hosts.

Currently it supports only remote forwarding.

Installation

Use bundler, add this line in your Gemfile:

gem 'capistrano-forwarding'

Or install it yourself as:

$ gem install capistrano-forwarding

Usage

Currently it provides only remote_forwarding configuration which is forwarding remote ports from remote hosts to local.

Here is an example in your Capfile or config/deploy.rb.

require "capistrano/fowarding"

desc "test task"
task "test" do
  remote_forwarding [
    [3000, "127.0.0.1", 3000]
  ] do
    run "curl http://127.0.0.1:3000/"
  end
end

Before trying this, run something like HTTP server on local port 3000.

$ ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port => 3000).start'