runnel 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/runnel +27 -23
  2. metadata +4 -4
data/bin/runnel CHANGED
@@ -6,13 +6,13 @@ HELP = <<TXT
6
6
  Runnel is a easy way to manage your ssh tunnels. It relies on autossh
7
7
 
8
8
  Basic Command Line Usage:
9
- runnel list_running
9
+ runnel
10
10
  runnel start <tunnel>
11
- runnel start_all
11
+ runnel start
12
12
  runnel kill <tunnel>
13
- runnel kill_all
13
+ runnel kill
14
14
 
15
- Configuration is read from '~/.runnel/config'
15
+ Configuration is read from '~/.runnel/tunnels.yml'
16
16
  PID's are stored in ~/.runnel/pids/
17
17
 
18
18
  TXT
@@ -144,24 +144,7 @@ class Runnel
144
144
 
145
145
  end
146
146
 
147
- case ARGV[0]
148
- when "setup"
149
- Runnel.setup
150
- when "kill"
151
- if ARGV[1]
152
- Runnel.kill(ARGV[1])
153
- else
154
- Runnel.kill_all
155
- end
156
- when "start"
157
- if ARGV[1]
158
- Runnel.start(ARGV[1])
159
- else
160
- Runnel.start_all
161
- end
162
- when "help"
163
- puts HELP
164
- else # List tunnels
147
+ unless ARGV[0]
165
148
  if File.exists?(Runnel::TUNNEL_CONFIG)
166
149
  Runnel.all.each do |r|
167
150
  puts r.pp_description
@@ -170,5 +153,26 @@ else # List tunnels
170
153
  puts "Looks like this is your first time, lets set everything up."
171
154
  Runnel.setup
172
155
  end
156
+ else
157
+ case ARGV[0]
158
+ when "setup"
159
+ Runnel.setup
160
+ when "kill", "stop"
161
+ if ARGV[1]
162
+ Runnel.kill(ARGV[1])
163
+ else
164
+ Runnel.kill_all
165
+ end
166
+ when "start"
167
+ if ARGV[1]
168
+ Runnel.start(ARGV[1])
169
+ else
170
+ Runnel.start_all
171
+ end
172
+ when "help"
173
+ puts HELP
174
+ else
175
+ puts "Unknown command \"#{ARGV[0]}\""
176
+ puts HELP
177
+ end
173
178
  end
174
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runnel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mark Percival
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-19 00:00:00 -07:00
18
+ date: 2011-03-22 00:00:00 -07:00
19
19
  default_executable: runnel
20
20
  dependencies: []
21
21