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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/con_ssh.gemspec +1 -1
  3. data/lib/con_ssh.rb +12 -7
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a8d3dbea8d72411361355d648fdea759e15a0ca
4
- data.tar.gz: 388ecb8811e06462d713a503ce813695c2ae8a31
3
+ metadata.gz: 68d2e7c920a19ca153f5483c4fbbe489ee73b140
4
+ data.tar.gz: 8ddb623400d4d68c9989628f24c6efb02c9174c8
5
5
  SHA512:
6
- metadata.gz: 4c254ee4e73294cc8714e0505161dbd7ddde6c231b59c8d66ac22fa56cb6d9d7180e1397f1fb0b6621a00ec1ae8e4675643939c692fe7bc165a4c863b6533f63
7
- data.tar.gz: d9b01837d371452fba9f514659619c3474cbde3b430718c3f820a7ece89bfd9d593003bcc8adec2d02536079340064d026d82524030e5ff8806efd1dface2104
6
+ metadata.gz: dda364ee37b9a45246b5960a514341dd519be3145e8c4f197b517df15cbe80b1e66817c231747297b7a5f9d2fce0190b1adf683d5efa1f441c568d14d84890f5
7
+ data.tar.gz: 7e747d3cb1852b7ad43d430b98c4f3c666799c3853553a9f0deed006c9ab72c7f7b526af77c994dc82b7c7c8669b60a2b4c90dba36635fa9c1eeaa4770af9f62
data/con_ssh.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "con_ssh"
3
- s.version = "0.0.4"
3
+ s.version = "0.0.5"
4
4
  s.authors = ["Tom Lobato"]
5
5
  s.email = "lobato@bettercall.io"
6
6
  # s.homepage = "http://sys-watchdog.bettercall.io/"
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 conn_confs
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."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: con_ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato