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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9aae3254890f35de4ab62acc17677af602abffd98fc94750f896ea583b244556
4
- data.tar.gz: 29a0a05f43fc40628fc3922256847294873e58a4085e47ea805c7e30b2d36ded
3
+ metadata.gz: e310823d44250d1025b363b4d16eb6c691c4ffa9473727055596c7bc1b508088
4
+ data.tar.gz: 402d1295d9ed0e0cc6eedfe16a9204ae0216b16d0025e3a49f5cb77ef13c468f
5
5
  SHA512:
6
- metadata.gz: 1b6a39f87cf00d4cd1a1e720a7275409c8304db83260646e3488c0b3baec394c369b321fe39a2f02f78ae98c83d732d56b9efa26010d4b56320961a887fc2382
7
- data.tar.gz: ea605a802dd27d25631d3159951cd9206d3312ced4a6d5a3c77811e0e12a6ad6fc35d532d1709fc7787cbf4dd3ef55b448a796ec1d78cd772abeb40464e2f128
6
+ metadata.gz: 63528c633b6df24ababca08e45d260527d1839a7ac7b85871c4ea3a43b9a0f9c9811b0511fe25d8af5d4b8aa21af3f6ec676e812a266913340ca1e0ae21f3689
7
+ data.tar.gz: ffb6841062a0d680de1479966e8420ab2df129f94a4fe544d777e9dcbcd4e510aee67d30cbadc21210bd69edec762293d4c781189512b68b13ede70c32279b83
@@ -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
@@ -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
- print %Q{#{server[:host]}:#{line}}.colorize(server[:color])
63
+ output = %Q{#{server[:host]}:#{line}}
64
+ puts (@color ? output.colorize(server[:color]) : output)
63
65
  end
64
66
  end
65
67
  end
@@ -1,4 +1,4 @@
1
1
  module Pec2
2
2
  # pec2 version
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - toyama0919