pec2 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pec2/cli.rb +1 -0
- data/lib/pec2/pssh.rb +3 -1
- data/lib/pec2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e310823d44250d1025b363b4d16eb6c691c4ffa9473727055596c7bc1b508088
|
4
|
+
data.tar.gz: 402d1295d9ed0e0cc6eedfe16a9204ae0216b16d0025e3a49f5cb77ef13c468f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63528c633b6df24ababca08e45d260527d1839a7ac7b85871c4ea3a43b9a0f9c9811b0511fe25d8af5d4b8aa21af3f6ec676e812a266913340ca1e0ae21f3689
|
7
|
+
data.tar.gz: ffb6841062a0d680de1479966e8420ab2df129f94a4fe544d777e9dcbcd4e510aee67d30cbadc21210bd69edec762293d4c781189512b68b13ede70c32279b83
|
data/lib/pec2/cli.rb
CHANGED
@@ -23,6 +23,7 @@ module Pec2
|
|
23
23
|
option :tag, aliases: '-t', type: :hash, default: {}, desc: 'tag'
|
24
24
|
option :user, aliases: '-u', type: :string, desc: 'user'
|
25
25
|
option :parallel, aliases: '-p', type: :numeric, desc: 'parallel'
|
26
|
+
option :color, type: :boolean, default: false, desc: 'colorize.'
|
26
27
|
option :print, aliases: '-P', type: :boolean, default: false, desc: 'print stdout.'
|
27
28
|
option :resolve, aliases: '--resolve', type: :string, default: 'private_ip_address', enum: ['private_ip_address', 'public_ip_address', 'name_tag'], desc: 'resolve'
|
28
29
|
def run_command
|
data/lib/pec2/pssh.rb
CHANGED
@@ -22,6 +22,7 @@ module Pec2
|
|
22
22
|
end
|
23
23
|
result
|
24
24
|
}
|
25
|
+
@color = options[:color]
|
25
26
|
@user = options[:user]
|
26
27
|
@print = options[:print]
|
27
28
|
@sudo_password = options[:sudo_password]
|
@@ -59,7 +60,8 @@ module Pec2
|
|
59
60
|
else
|
60
61
|
data.to_s.lines.each do |line|
|
61
62
|
if @print
|
62
|
-
|
63
|
+
output = %Q{#{server[:host]}:#{line}}
|
64
|
+
puts (@color ? output.colorize(server[:color]) : output)
|
63
65
|
end
|
64
66
|
end
|
65
67
|
end
|
data/lib/pec2/version.rb
CHANGED