26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/tunnel/cli.rb', line 26
def add
highline = HighLine.new
puts "Adding a new tunnel config"
conf = Config.new
conf.name = highline.ask("Name: ")
conf.ssh_port = highline.ask("SSH port: ") { |q| q.default = "22" }
conf.local_port = highline.ask("Local port: ") { |q| q.default = "3000" }
conf.remote_user = highline.ask("Remote user: ") { |q| q.default = ENV['USER'] }
conf.remote_host = highline.ask("Remote host: ")
conf.remote_port = highline.ask("Remote port: ")
Configfile.add(conf)
end
|