pec2 0.2.0 → 0.3.0

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: 9511d7463442954a44245ab355178e32088c9aed
4
- data.tar.gz: b02546a6e4a0b69a4ff537a4af44665d7cfa473b
3
+ metadata.gz: af31d5b5049e0e1b7c044ae4bb6d85ea4ff23a22
4
+ data.tar.gz: b3ba11e52366d13a58bcb2aecb9c5fa715ee16ea
5
5
  SHA512:
6
- metadata.gz: e2fb7df4e7944cdb94987602b9e5fccfee0dbbaf33c3f185debf8f3d34f1fc1a05a7de820980f9d2c4e91b295436cb84402bd62302cade6a3d76562df1a06ce6
7
- data.tar.gz: 17da78af4212b91ed740fa4bb77e0291fe2c74d71a0e410bfd367d9634b766158f1c69294e4ad4453dab4779be6eef9a57108b1a26c8aad47cdc19e99771426c
6
+ metadata.gz: 321428bb68278df26eb4c081c3f880d94c4226a67168e52c3dac7482d88f43733de3f346efbb5358c90987aac1fb0b3eaa4687d69c96f234ad21a76a59a99513
7
+ data.tar.gz: a26f5d2802c3aa76493b35cce6b319dec407650ed117196df8b7eefc47e3c652f31b190bd34ce2b66bf4e94230b112685134df98efe4f60ef4daae8cfa0f8bf6
@@ -1,3 +1,4 @@
1
1
  require 'pec2/version'
2
+ require 'pec2/constants'
2
3
  require 'pec2/core'
3
4
  require 'pec2/cli'
@@ -20,6 +20,7 @@ module Pec2
20
20
  option :tag, aliases: '-t', type: :hash, default: {}, desc: 'tag'
21
21
  option :user, aliases: '-u', type: :string, desc: 'user'
22
22
  option :log, aliases: '-o', type: :string, desc: 'log'
23
+ option :parallel, aliases: '-p', type: :numeric, desc: 'parallel'
23
24
  option :print, aliases: '-P', type: :boolean, default: false, desc: 'print stdout.'
24
25
  def search_tag
25
26
  Tempfile.create("pec2") do |f|
@@ -46,6 +47,10 @@ module Pec2
46
47
  cmd = "#{cmd} -o #{options[:log]}"
47
48
  end
48
49
 
50
+ if options[:parallel]
51
+ cmd = "#{cmd} -p #{options[:parallel]}"
52
+ end
53
+
49
54
  if options[:sudo_password]
50
55
  cmd = %Q{(echo #{options[:sudo_password]}) | #{cmd} -I '#{options[:command]}'}
51
56
  else
@@ -1,2 +1,3 @@
1
1
  module Pec2
2
+ TIME_OUT = 3
2
3
  end
@@ -8,7 +8,6 @@ require 'timeout'
8
8
 
9
9
  module Pec2
10
10
  class Core
11
- TIME_OUT = 3
12
11
 
13
12
  def initialize
14
13
  @logger = Logger.new(STDOUT)
@@ -1,4 +1,4 @@
1
1
  module Pec2
2
2
  # pec2 version
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - toyama0919
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-22 00:00:00.000000000 Z
11
+ date: 2016-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor