sshkit-chunky-runner 0.2.1 → 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: ccd5ece88def2edf11cf3615ae9af5bb8aa1f2b1
4
- data.tar.gz: b1bcd70094eaf69d0972cea569b6fdb2b951bde9
3
+ metadata.gz: 6bca8fe5eb38bf41c596e7687345dbba525e2db5
4
+ data.tar.gz: ed390960def02bd0179e4217ef8bee5ed81f3297
5
5
  SHA512:
6
- metadata.gz: aafeadc25b81fcc9d448041a582166a13faccc0f63d7c51fb270368a35c6580f4c0b1ee0ffcf52675abeca687c9bf472d83a779a0552c8c8dcc26ccc2e1c5150
7
- data.tar.gz: 7c71ea631ad441c50c0b008ece0f027900df036668fc53ccbe6ca39999543d1a93b62c0d4f8edf942a9cf123c6caad00fe7e28cad7adb4acee49d37d01994d43
6
+ metadata.gz: 56a4dd94d086f685f048a65ae1fae8d8eea6c98f9fffc94bf0e1821014ce61025e446f0358c575267a3da09dc0f021e32d620e4cb6fb4698d50fbdccde76bf20
7
+ data.tar.gz: 92baafd229e25b8a7510901aea045b2f13903aca3e33a5709893e26d84f4fc4361b9ca2af20bef4ce8e629d443efc360a25e15b37da9a839fc4ab22c63f3ef0b
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1.1
3
+ - 2.1.10
4
+ - 2.2.6
5
+ - 2.3.3
5
6
  script: "bundle exec rspec"
@@ -12,7 +12,7 @@ module SSHKit
12
12
  when :groups then Runner::Group
13
13
  when :chunks then SSHKit::Chunky::Runner::Chunks # <- added
14
14
  else
15
- raise RuntimeError, "Don't know how to handle run style #{options[:in].inspect}"
15
+ options[:in]
16
16
  end.new(hosts, options, &block).execute
17
17
  else
18
18
  Runner::Null.new(hosts, options, &block).execute
@@ -1,7 +1,7 @@
1
1
  module SSHKit
2
2
  module Chunky
3
3
  module Runner
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.0'
5
5
  end
6
6
  end
7
7
  end
@@ -6,19 +6,18 @@ describe SSHKit::Coordinator do
6
6
  let(:block_to_run) { ->(host) { execute "echo #{Time.now.to_i}" } }
7
7
 
8
8
  subject(:results) do
9
- output.lines.map { |value| value.split(' ').last.to_i }
9
+ output.lines.map { |value| value.split(' echo ').last.to_i }
10
10
  end
11
11
 
12
12
  before do
13
13
  SSHKit.config.backend = SSHKit::Backend::Printer
14
+ SSHKit.config.output = SSHKit::Formatter::SimpleText.new(output)
14
15
  end
15
16
 
16
17
  context 'with default options' do
17
18
  before do
18
- SSHKit.capture_output output do
19
- SSHKit::Coordinator.new(%w{1.example.com 2.example.com})
20
- .each(&block_to_run)
21
- end
19
+ SSHKit::Coordinator.new(%w{1.example.com 2.example.com})
20
+ .each(&block_to_run)
22
21
  end
23
22
 
24
23
  it 'returns parallel results' do
@@ -29,10 +28,8 @@ describe SSHKit::Coordinator do
29
28
 
30
29
  context 'with chunks options' do
31
30
  before do
32
- SSHKit.capture_output output do
33
- SSHKit::Coordinator.new(%w{1.example.com 2.example.com})
34
- .each(in: :chunks, count: 2, &block_to_run)
35
- end
31
+ SSHKit::Coordinator.new(%w{1.example.com 2.example.com})
32
+ .each(in: :chunks, count: 2, &block_to_run)
36
33
  end
37
34
 
38
35
  it 'returns sequential results' do
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'rake', '~> 10.0'
25
25
  spec.add_development_dependency 'rspec', '~> 3.1'
26
26
 
27
- spec.add_runtime_dependency 'sshkit', '~> 1.0'
27
+ spec.add_runtime_dependency 'sshkit', '~> 1.0', '>= 1.9.0'
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshkit-chunky-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Brazys
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-11 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -59,6 +59,9 @@ dependencies:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.9.0
62
65
  type: :runtime
63
66
  prerelease: false
64
67
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,6 +69,9 @@ dependencies:
66
69
  - - "~>"
67
70
  - !ruby/object:Gem::Version
68
71
  version: '1.0'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.9.0
69
75
  description: |-
70
76
  Runs ssh commands in few chunks. It divides hosts into \
71
77
  static number of chunks, you just need to specify how \
@@ -111,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
117
  version: '0'
112
118
  requirements: []
113
119
  rubyforge_project:
114
- rubygems_version: 2.4.6
120
+ rubygems_version: 2.5.2
115
121
  signing_key:
116
122
  specification_version: 4
117
123
  summary: Run ssh commands in chunks