ndo 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -2
- data/Gemfile.lock +3 -3
- data/lib/ndo/multi_command.rb +4 -5
- metadata +10 -8
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,7 +4,7 @@ GEM
|
|
4
4
|
diff-lcs (1.1.2)
|
5
5
|
flexmock (0.8.11)
|
6
6
|
open4 (1.0.1)
|
7
|
-
procrastinate (0.
|
7
|
+
procrastinate (0.3.0)
|
8
8
|
state_machine (~> 0.9.4)
|
9
9
|
rspec (2.3.0)
|
10
10
|
rspec-core (~> 2.3.0)
|
@@ -23,6 +23,6 @@ PLATFORMS
|
|
23
23
|
DEPENDENCIES
|
24
24
|
flexmock
|
25
25
|
open4 (~> 1.0.1)
|
26
|
-
procrastinate (~> 0.
|
26
|
+
procrastinate (~> 0.3.0)
|
27
27
|
rspec
|
28
|
-
text-highlight
|
28
|
+
text-highlight (~> 1.0.0)
|
data/lib/ndo/multi_command.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
|
2
|
+
require 'procrastinate'
|
3
|
+
require 'procrastinate/implicit'
|
4
|
+
|
2
5
|
require 'ndo/results'
|
3
6
|
require 'ndo/host'
|
4
|
-
require 'procrastinate'
|
5
7
|
|
6
8
|
# A class to execute a command on a list of hosts in parallel; allows access
|
7
9
|
# to results and is thus a) multi threaded and b) Ruby 1.9.2 only.
|
@@ -20,15 +22,12 @@ class Ndo::MultiCommand
|
|
20
22
|
# Runs the command on all hosts. Returns a result collection.
|
21
23
|
#
|
22
24
|
def run
|
23
|
-
|
24
|
-
proxy = scheduler.create_proxy(self)
|
25
|
+
proxy = Procrastinate.proxy(self)
|
25
26
|
|
26
27
|
Ndo::Results.new.tap { |results|
|
27
28
|
hosts.each { |host|
|
28
29
|
results.store host, proxy.run_for_host(host)
|
29
30
|
}}
|
30
|
-
ensure
|
31
|
-
scheduler.shutdown
|
32
31
|
end
|
33
32
|
|
34
33
|
def run_for_host(host)
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kaspar Schiess
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-27 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -42,9 +42,9 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
segments:
|
44
44
|
- 0
|
45
|
-
-
|
45
|
+
- 3
|
46
46
|
- 0
|
47
|
-
version: 0.
|
47
|
+
version: 0.3.0
|
48
48
|
type: :runtime
|
49
49
|
version_requirements: *id002
|
50
50
|
- !ruby/object:Gem::Dependency
|
@@ -53,11 +53,13 @@ dependencies:
|
|
53
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
54
|
none: false
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ~>
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
segments:
|
59
|
+
- 1
|
59
60
|
- 0
|
60
|
-
|
61
|
+
- 2
|
62
|
+
version: 1.0.2
|
61
63
|
type: :runtime
|
62
64
|
version_requirements: *id003
|
63
65
|
- !ruby/object:Gem::Dependency
|