sshyguy 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/sshyguy/cli.rb +3 -2
- data/lib/sshyguy/screens/main_screen.rb +10 -6
- data/lib/sshyguy/version.rb +1 -1
- 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: 225a14fa2b004e45d52ec9a6df5161aa253e4cbb
|
4
|
+
data.tar.gz: 718902b6750ca29d5baa3cd6a7dff6aa33f409c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8647ebf42c79867364153e95b16515d3c63e59fbfe69e4aff54cbfd27058a344f30e16999e1493bf534fcc7f8be5e81376e3b31a13cf35e46cc5c88b5bc724f8
|
7
|
+
data.tar.gz: 496c9c253d03759d27208f04974c743b5dc3478f4f3d2553e7e6207d825b7971654fc505ec50c20bb68cdbd3e6c5240001feabcbfb08d6c768ef527d301a7e20
|
data/README.md
CHANGED
data/lib/sshyguy/cli.rb
CHANGED
@@ -11,13 +11,13 @@ module SshyGuy
|
|
11
11
|
OptionParser.new do |opts|
|
12
12
|
opts.banner = "Usage: sshy [options]"
|
13
13
|
|
14
|
-
opts.on("-v", "--
|
14
|
+
opts.on("-v", "--verbose", "Run verbosely") do |v|
|
15
15
|
options[:verbose] = v
|
16
16
|
end
|
17
17
|
opts.on("-h", "--help", "Help") do |v|
|
18
18
|
options[:help] = true
|
19
19
|
end
|
20
|
-
opts.on("-s", "--shortcut", "Shortcut") do |v|
|
20
|
+
opts.on("-s", "--shortcut SHORTCUT", "Shortcut") do |v|
|
21
21
|
options[:shortcut] = v
|
22
22
|
end
|
23
23
|
opts.on('--install') do |v|
|
@@ -26,6 +26,7 @@ module SshyGuy
|
|
26
26
|
end.parse!
|
27
27
|
new(options).run
|
28
28
|
end
|
29
|
+
|
29
30
|
attr_reader :options
|
30
31
|
def initialize(options = {})
|
31
32
|
@options = options
|
@@ -2,13 +2,17 @@ module SshyGuy
|
|
2
2
|
module Screens
|
3
3
|
class MainScreen < Screen
|
4
4
|
def show
|
5
|
-
if
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
if options[:shortcut]
|
6
|
+
server = SshyGuy::Server.all.detect { |server| server.shortcut == options[:shortcut] }
|
7
|
+
if server
|
8
|
+
server.spawn
|
9
|
+
else
|
10
|
+
puts "No shortcut server found for '#{options[:shortcut]}'"
|
11
|
+
exit
|
12
|
+
end
|
11
13
|
end
|
14
|
+
label = "Select a server."
|
15
|
+
servers = SshyGuy::Server.all
|
12
16
|
server = prompt.select(label, cycle: SshyGuy.config.cycle?, filter: SshyGuy.config.filter?) do |select|
|
13
17
|
select.enum '.'
|
14
18
|
servers.each do |item|
|
data/lib/sshyguy/version.rb
CHANGED