pec2 0.5.0 → 0.5.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
  SHA1:
3
- metadata.gz: 221b02cfeb12fc1307eba9f1d8d4e267af138a10
4
- data.tar.gz: 684b5a45a8bd2e3ebb4121230bf7a380622487ac
3
+ metadata.gz: cb66795b5285c636e91c6f868d3a8232ace8e6b0
4
+ data.tar.gz: e6adbd3a3fb3ecf2c79f9328b748b8a12fd0a6d1
5
5
  SHA512:
6
- metadata.gz: ef6ddb6106717e08eff3e48e2675159e922cc60ad4851d286816247d5cc62f6fa08007bc699aaaf817ef413a9aabf880ea6d035af3fa4492cd8b6d8cb4242758
7
- data.tar.gz: cb6b3ae20f18033ea181a1c0130b957681cb8a9072a56981617d90ce4f13eac716edc35a7a71f9e06d69ccea7cda3699e820fd8dc66aec88090135732c0b1c93
6
+ metadata.gz: 3eccd5049cebf61354803fdfe964051778b1ed79a13cf4589a482a28a91c1d477fed4c285497536f1b7fa1cdb88f5472dd9c633b7700f22a0ffbfb7e8f0e961a
7
+ data.tar.gz: c20e2e77b347f67499b19d9fc855ed5eb2488beb54c0237ff5ca8cc6007062b5d980932ad1e4e976d81625aded3f7ee043e49607813a94b72b20f64840bdba71
data/lib/pec2/cli.rb CHANGED
@@ -40,6 +40,7 @@ module Pec2
40
40
  exit
41
41
  end
42
42
 
43
+ @logger.info(%Q{connection size #{addresses.size}.})
43
44
  @logger.info(%Q{listing connection to #{addresses.join(', ')}.})
44
45
 
45
46
  tf = Tempfile.open("pec2") { |fp|
@@ -47,7 +48,7 @@ module Pec2
47
48
  fp
48
49
  }
49
50
 
50
- pssh = Pssh.new(options, tf.path)
51
+ pssh = Pssh.new(options, tf.path, addresses.size)
51
52
 
52
53
  interactive = options[:command] ? false : true
53
54
 
data/lib/pec2/pssh.rb CHANGED
@@ -5,7 +5,7 @@ module Pec2
5
5
 
6
6
  PSSH_PATH = File.expand_path('../../../exe/bin/pssh', __FILE__)
7
7
 
8
- def initialize(options, hosts_file)
8
+ def initialize(options, hosts_file, parallel = 1)
9
9
  @pssh_command = "#{PSSH_PATH} -t 0 -x '-tt' -h #{hosts_file} -O StrictHostKeyChecking=no"
10
10
  if options[:print]
11
11
  @pssh_command = "#{@pssh_command} -P"
@@ -19,9 +19,7 @@ module Pec2
19
19
  @pssh_command = "#{@pssh_command} -o #{options[:log]}"
20
20
  end
21
21
 
22
- if options[:parallel]
23
- @pssh_command = "#{@pssh_command} -p #{options[:parallel]}"
24
- end
22
+ @pssh_command = "#{@pssh_command} -p #{options[:parallel] || parallel}"
25
23
  @sudo_password = options[:sudo_password]
26
24
  end
27
25
 
data/lib/pec2/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Pec2
2
2
  # pec2 version
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - toyama0919
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-17 00:00:00.000000000 Z
11
+ date: 2017-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor