tunnel 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tunnel/cli.rb +2 -0
- data/lib/tunnel/config.rb +6 -2
- data/lib/tunnel/version.rb +1 -1
- metadata +4 -4
data/lib/tunnel/cli.rb
CHANGED
@@ -4,10 +4,12 @@ module Tunnel
|
|
4
4
|
class CLI < Thor
|
5
5
|
|
6
6
|
desc "start", "Start a tunnel"
|
7
|
+
method_option :verbose, :type => :boolean, :aliases => "-v", :banner => "Enable verbose output"
|
7
8
|
def start
|
8
9
|
highline = HighLine.new
|
9
10
|
highline.choose do |menu|
|
10
11
|
menu.choices(*configs) do |choice|
|
12
|
+
choice.verbose = options.verbose?
|
11
13
|
Tunnel.start(choice)
|
12
14
|
end
|
13
15
|
end
|
data/lib/tunnel/config.rb
CHANGED
@@ -13,8 +13,12 @@ module Tunnel
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def ssh_command
|
16
|
-
"ssh
|
17
|
-
[ ssh_port, remote_port, local_port, remote_user, remote_host ]
|
16
|
+
"ssh %s -p %s -nNT -g -R *:%s:0.0.0.0:%s %s@%s" %
|
17
|
+
[ verbose_flag, ssh_port, remote_port, local_port, remote_user, remote_host ]
|
18
|
+
end
|
19
|
+
|
20
|
+
def verbose_flag
|
21
|
+
self.verbose ? '-v' : ''
|
18
22
|
end
|
19
23
|
end
|
20
24
|
end
|
data/lib/tunnel/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tunnel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ben Marini
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-22 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|