con_ssh 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/con_ssh.gemspec +1 -1
- data/lib/con_ssh.rb +12 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d2e7c920a19ca153f5483c4fbbe489ee73b140
|
4
|
+
data.tar.gz: 8ddb623400d4d68c9989628f24c6efb02c9174c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda364ee37b9a45246b5960a514341dd519be3145e8c4f197b517df15cbe80b1e66817c231747297b7a5f9d2fce0190b1adf683d5efa1f441c568d14d84890f5
|
7
|
+
data.tar.gz: 7e747d3cb1852b7ad43d430b98c4f3c666799c3853553a9f0deed006c9ab72c7f7b526af77c994dc82b7c7c8669b60a2b4c90dba36635fa9c1eeaa4770af9f62
|
data/con_ssh.gemspec
CHANGED
data/lib/con_ssh.rb
CHANGED
@@ -22,7 +22,7 @@ class SSHCon
|
|
22
22
|
ign_arg_warn args, 2
|
23
23
|
parse_conf
|
24
24
|
conn_conf = @conn_confs[args[0]]
|
25
|
-
unless
|
25
|
+
unless conn_conf
|
26
26
|
warn "Shorcut #{args[0]} not found. See #{CONF_PATH}."
|
27
27
|
exit 1
|
28
28
|
end
|
@@ -33,17 +33,22 @@ class SSHCon
|
|
33
33
|
end
|
34
34
|
knock conn_conf.host, ports
|
35
35
|
|
36
|
-
# connect
|
37
|
-
elsif conn_conf = @conn_confs[args[0]]
|
38
|
-
ign_arg_warn args, 1
|
39
|
-
parse_conf
|
40
|
-
ssh conn_conf
|
41
|
-
|
42
36
|
# help
|
43
37
|
elsif ['-h'].include? args[0]
|
44
38
|
ign_arg_warn args, 1
|
45
39
|
print_help
|
46
40
|
|
41
|
+
# connect
|
42
|
+
elsif args[0]
|
43
|
+
ign_arg_warn args, 1
|
44
|
+
parse_conf
|
45
|
+
conn_conf = @conn_confs[args[0]]
|
46
|
+
unless conn_conf
|
47
|
+
warn "Shorcut #{args[0]} not found. See #{CONF_PATH}."
|
48
|
+
exit 1
|
49
|
+
end
|
50
|
+
ssh conn_conf
|
51
|
+
|
47
52
|
# fail
|
48
53
|
else
|
49
54
|
warn "Invalid arguments."
|