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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b1590c2e531aee0cfa9fa69356ceb0a394ee32e
4
- data.tar.gz: 74579aa533c529aad6da88ce5e9aa0cce3f0f98c
3
+ metadata.gz: 225a14fa2b004e45d52ec9a6df5161aa253e4cbb
4
+ data.tar.gz: 718902b6750ca29d5baa3cd6a7dff6aa33f409c4
5
5
  SHA512:
6
- metadata.gz: cf767fcc3f7d2c09a898f1f139c048fc9fe6989b58fd49dbad91e71af6b7eb0a39d833d675b61914f19eb9504c63f96ebdf5be8696edc74875c9b3b5f082ff54
7
- data.tar.gz: bb03169c10c5f503c28e7605e4cd8bc270ff8f811e480f2d28b3f27f3f8e74d2d02aae82094e4bcf6843475935d6c92a7565ed8adf8bf386474a3dbf13756cea
6
+ metadata.gz: 8647ebf42c79867364153e95b16515d3c63e59fbfe69e4aff54cbfd27058a344f30e16999e1493bf534fcc7f8be5e81376e3b31a13cf35e46cc5c88b5bc724f8
7
+ data.tar.gz: 496c9c253d03759d27208f04974c743b5dc3478f4f3d2553e7e6207d825b7971654fc505ec50c20bb68cdbd3e6c5240001feabcbfb08d6c768ef527d301a7e20
data/README.md CHANGED
@@ -23,7 +23,6 @@ Edit your config file add servers.
23
23
  "user": "deploy",
24
24
  "label": "Production",
25
25
  "shortcut": "production",
26
- "folder": "Unicorn Inc."
27
26
  }
28
27
  ```
29
28
 
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", "--[no-]verbose", "Run verbosely") do |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 SshyGuy.params[:folder] && SshyGuy.params[:folder] != "__ALL"
6
- servers = SshyGuy::Server.all.select { |server| server.folder == params[:folder] }
7
- label = "Select a server from #{SshyGuy.params[:folder]}."
8
- else
9
- label = "Select a server."
10
- servers = SshyGuy::Server.all
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|
@@ -1,3 +1,3 @@
1
1
  module SshyGuy
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshyguy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody