sshkit-custom-dsl 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4169122b55f14b75766da7f8c272970350df7b5f
|
4
|
+
data.tar.gz: 7cac65991001f7ee3a96e9840ac9a4a3b92f0fbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18f11afcc1ad1deb774afe002b79aaa3b7bd0099562227cb8c1e703e0540ab0ff56e6639ca7ce3fded26281041f339503944cb226b8bb65165c1f8878407ff08
|
7
|
+
data.tar.gz: c6d37e3843b43514c8695cd8df04dabfb9e9f08aebb00b504437ea9a15f137f3e1054010564068c87ac17f1f2a8492a1a36b1287fab75601b86a01905982f693
|
@@ -77,7 +77,7 @@ module SSHKit
|
|
77
77
|
|
78
78
|
rescue Exception => e
|
79
79
|
e2 = ExecuteError.new e
|
80
|
-
raise e2, "Exception while executing on host #{backend}: #{e.message}"
|
80
|
+
raise e2, "Exception while executing on host #{backend.host}: #{e.message}"
|
81
81
|
ensure
|
82
82
|
self.active_backend = nil
|
83
83
|
end
|
@@ -3,20 +3,29 @@ module SSHKit
|
|
3
3
|
module Config
|
4
4
|
module Runner
|
5
5
|
|
6
|
+
require 'rake'
|
7
|
+
|
6
8
|
class Parallel < Abstract
|
7
9
|
|
8
|
-
def apply_block_to_bcks(&block)
|
9
|
-
threads = []
|
10
10
|
|
11
|
-
backends.each do |next_backend|
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
def thread_pool
|
13
|
+
@thread_pool ||= Rake::ThreadPool.new(thread_count)
|
14
|
+
end
|
16
15
|
|
16
|
+
def apply_block_to_bcks(&block)
|
17
|
+
|
18
|
+
futures = backends.map do |b|
|
19
|
+
thread_pool.future(b) do |fb|
|
20
|
+
apply_to_bck fb, &block
|
21
|
+
end
|
17
22
|
end
|
18
23
|
|
19
|
-
|
24
|
+
futures.each { |f| f.value }
|
25
|
+
end
|
26
|
+
|
27
|
+
def thread_count
|
28
|
+
@thread_count ||= options[:thread_count] || Rake.suggested_thread_count-1
|
20
29
|
end
|
21
30
|
|
22
31
|
end
|
data/sshkit-custom-dsl.gemspec
CHANGED
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'sshkit', '~> 1.5.1'
|
22
22
|
spec.add_dependency 'scoped_storage'
|
23
|
+
spec.add_dependency 'rake'
|
23
24
|
|
24
25
|
spec.add_development_dependency "bundler"
|
25
|
-
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency "rspec"
|
27
27
|
|
28
28
|
spec.add_development_dependency 'rspec', '2.99.0.rc1'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sshkit-custom-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dieter Späth
|
@@ -39,13 +39,13 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '>='
|