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 +4 -4
- data/lib/skipper/cli.rb +18 -0
- data/lib/skipper/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: cf3f95162e381654cf0495ac4a16e8cf66543e79
|
|
4
|
+
data.tar.gz: 773d1b0cab3a9947ef07b418bc7de7d19f5b7cba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/skipper/version.rb
CHANGED