skipper-ssh 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 266e2853407d28a0dbab7b7adaf42b9e791bfdc1
4
- data.tar.gz: 39f8891fb19e97208c3c8d3f310e206b67efc25a
3
+ metadata.gz: cf3f95162e381654cf0495ac4a16e8cf66543e79
4
+ data.tar.gz: 773d1b0cab3a9947ef07b418bc7de7d19f5b7cba
5
5
  SHA512:
6
- metadata.gz: 7cd435cebe3ce68b6112de7bb23a07c5306f2cff4d4460f23d34093934f798fbdf06d678c28fcda49b8125ee499ce7cf0199edc5d04d6babc2490cb4511e899e
7
- data.tar.gz: 36f01e95aa5474a78de5506f5b7405cdea9a8d91742da1ecc953f5ff0a4f728c12952394782f8c29f6484049009995256df4994a40790982c3acae1dcbb2d788
6
+ metadata.gz: eeacbf438265f3553e88c3d6b4f5adbc45f99850f9a2b2b459d9d0c231f35f00d9fecaa400980d9acdbcdbf90dac3a4b5ce7a8f6ed7dd191593c8ad2ebfa4e9c
7
+ data.tar.gz: 4fe0e945949fabfa320e40eab750b80580cf844acdd296701f85b1ee4497dc5b1d7f5c1048d61f65e3fc0aa77754f8956ed8f897222061b3d5ede71a449e11f4
data/lib/skipper/cli.rb CHANGED
@@ -24,6 +24,8 @@ module Skipper
24
24
 
25
25
  method_option :file, type: :string
26
26
  def ssh
27
+ warn_options unless enough_options?
28
+
27
29
  Skipper::Banner.print
28
30
 
29
31
  if Skipper::File.stdin_has_data?
@@ -35,5 +37,21 @@ module Skipper
35
37
  end
36
38
  end
37
39
 
40
+ private
41
+
42
+ def warn_options
43
+ error "You haven't provided me any way to find servers\n\n"
44
+ help :ssh
45
+ exit 1
46
+ end
47
+
48
+ def enough_options?
49
+ options.servers? or aws_options?
50
+ end
51
+
52
+ def aws_options?
53
+ ! (options.tags.count == 0 and options.auto_scaling_groups.count == 0 and options.auto_scaling_roles.count == 0)
54
+ end
55
+
38
56
  end
39
57
  end
@@ -1,3 +1,3 @@
1
1
  module Skipper
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skipper-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Brennan