ndo 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/HISTORY.txt +20 -0
- data/Rakefile +28 -0
- data/bin/ndo +3 -1
- data/examples/uname.rb +16 -0
- metadata +16 -11
- data/Gemfile.lock +0 -41
data/Gemfile
CHANGED
data/HISTORY.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
= 0.2.4 / 3Oct2011
|
3
|
+
|
4
|
+
! fixes bug that would crash bin/ndo when a host returned a non-null error
|
5
|
+
code. Now just doesn't display hosts with errcode>0 anymore.
|
6
|
+
|
7
|
+
= 0.2.3 / 13Sep2011
|
8
|
+
|
9
|
+
* Some sort of proper error handling.
|
10
|
+
|
11
|
+
+ API change: MultiCommand -> MultiHost
|
12
|
+
|
13
|
+
= 0.2.1 / 28Dez2010
|
14
|
+
|
15
|
+
* Maintenance; fixes gemspec for Ruby 1.9.2-p136.
|
16
|
+
|
17
|
+
= 0.2.0 / 27Dez2010
|
18
|
+
|
19
|
+
* Updated dependency to procrastinate (0.3) - now doesn't mess with the
|
20
|
+
scheduler and will heed the number of cores on the target system.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "rubygems/package_task"
|
3
|
+
require "rdoc/task"
|
4
|
+
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
RSpec::Core::RakeTask.new
|
7
|
+
task :default => :spec
|
8
|
+
|
9
|
+
# This task actually builds the gem.
|
10
|
+
task :gem => :spec
|
11
|
+
spec = eval(File.read('ndo.gemspec'))
|
12
|
+
|
13
|
+
desc "Generate the gem package."
|
14
|
+
Gem::PackageTask.new(spec) do |pkg|
|
15
|
+
pkg.gem_spec = spec
|
16
|
+
end
|
17
|
+
|
18
|
+
# Generate documentation
|
19
|
+
RDoc::Task.new do |rd|
|
20
|
+
rd.main = "README"
|
21
|
+
rd.rdoc_files.include("README", "lib/**/*.rb")
|
22
|
+
rd.rdoc_dir = "rdoc"
|
23
|
+
end
|
24
|
+
|
25
|
+
desc 'Clear out RDoc and generated packages'
|
26
|
+
task :clean => [:clobber_rdoc, :clobber_package] do
|
27
|
+
rm "#{spec.name}.gemspec"
|
28
|
+
end
|
data/bin/ndo
CHANGED
@@ -31,6 +31,8 @@ String.highlighter = hl
|
|
31
31
|
|
32
32
|
results = Ndo::MultiHost.new(hosts).run(command)
|
33
33
|
results.each do |host, result|
|
34
|
+
next unless result.success?
|
35
|
+
|
34
36
|
output = result.stdout.chomp
|
35
37
|
|
36
38
|
if output.index("\n")
|
@@ -41,4 +43,4 @@ results.each do |host, result|
|
|
41
43
|
else
|
42
44
|
printf "%-20s %s\n", host.bold, output
|
43
45
|
end
|
44
|
-
end
|
46
|
+
end
|
data/examples/uname.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
# Shows how to retrieve host names from multiple hosts (that we address by
|
3
|
+
# name).
|
4
|
+
|
5
|
+
$:.unshift File.dirname(__FILE__) + "/../lib"
|
6
|
+
require 'ndo'
|
7
|
+
|
8
|
+
# mh = Ndo::MultiCommand.new('uname -n', %w(hostA hostB))
|
9
|
+
mh = Ndo::MultiCommand.new('date', %w(leda)*10)
|
10
|
+
|
11
|
+
loop do
|
12
|
+
results = mh.run
|
13
|
+
results.each do |host, result|
|
14
|
+
[host, result]
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-10-03 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: procrastinate
|
16
|
-
requirement: &
|
16
|
+
requirement: &70104032280460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70104032280460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: text-highlight
|
27
|
-
requirement: &
|
27
|
+
requirement: &70104032279620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70104032279620
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70104032278700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70104032278700
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: flexmock
|
49
|
-
requirement: &
|
49
|
+
requirement: &70104032277980 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70104032277980
|
58
58
|
description:
|
59
59
|
email: kaspar.schiess@absurd.li
|
60
60
|
executables:
|
@@ -64,14 +64,16 @@ extra_rdoc_files:
|
|
64
64
|
- README
|
65
65
|
files:
|
66
66
|
- Gemfile
|
67
|
-
-
|
67
|
+
- HISTORY.txt
|
68
68
|
- LICENSE
|
69
|
+
- Rakefile
|
69
70
|
- README
|
70
71
|
- lib/ndo/host.rb
|
71
72
|
- lib/ndo/multi_host.rb
|
72
73
|
- lib/ndo/popen.rb
|
73
74
|
- lib/ndo/result.rb
|
74
75
|
- lib/ndo.rb
|
76
|
+
- examples/uname.rb
|
75
77
|
- bin/ndo
|
76
78
|
homepage: http://blog.absurd.li
|
77
79
|
licenses: []
|
@@ -87,6 +89,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
89
|
- - ! '>='
|
88
90
|
- !ruby/object:Gem::Version
|
89
91
|
version: '0'
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
hash: -97083875776645078
|
90
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
96
|
none: false
|
92
97
|
requirements:
|
data/Gemfile.lock
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
diff-lcs (1.1.3)
|
5
|
-
flexmock (0.9.0)
|
6
|
-
growl_notify (0.0.1)
|
7
|
-
rb-appscript
|
8
|
-
guard (0.6.3)
|
9
|
-
thor (~> 0.14.6)
|
10
|
-
guard-rspec (0.4.5)
|
11
|
-
guard (>= 0.4.0)
|
12
|
-
open4 (1.1.0)
|
13
|
-
procrastinate (0.3.1)
|
14
|
-
state_machine (~> 0.9.4)
|
15
|
-
rb-appscript (0.6.1)
|
16
|
-
rb-fsevent (0.4.3.1)
|
17
|
-
rspec (2.6.0)
|
18
|
-
rspec-core (~> 2.6.0)
|
19
|
-
rspec-expectations (~> 2.6.0)
|
20
|
-
rspec-mocks (~> 2.6.0)
|
21
|
-
rspec-core (2.6.4)
|
22
|
-
rspec-expectations (2.6.0)
|
23
|
-
diff-lcs (~> 1.1.2)
|
24
|
-
rspec-mocks (2.6.0)
|
25
|
-
state_machine (0.9.4)
|
26
|
-
text-highlight (1.0.2)
|
27
|
-
thor (0.14.6)
|
28
|
-
|
29
|
-
PLATFORMS
|
30
|
-
ruby
|
31
|
-
|
32
|
-
DEPENDENCIES
|
33
|
-
flexmock
|
34
|
-
growl_notify
|
35
|
-
guard
|
36
|
-
guard-rspec
|
37
|
-
open4 (>= 0.9)
|
38
|
-
procrastinate (~> 0.3)
|
39
|
-
rb-fsevent
|
40
|
-
rspec
|
41
|
-
text-highlight (~> 1.0)
|