remote_run 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
2
  .bundle
3
+ .vimlog
3
4
  Gemfile.lock
4
5
  pkg/*
data/Readme.md CHANGED
@@ -49,7 +49,7 @@ machines until all tasks are complete.
49
49
  Optional:
50
50
  local_path - the local path to be rsync'd (default: working directory)
51
51
  temp_path - the location where the working directory is cached on the local machine when starting a run (default: /tmp/remote)
52
- remote_path - the location to rsync files to on the remote host. (default: /tmp/remote)
52
+ remote_path - the location to rsync files to on the remote host. (default: /tmp/remote/<local_hostname>)
53
53
  exclude - directories to exclude when rsyncing to remote host (default: [])
54
54
  login_as - the user used to log into ssh (default: current user)
55
55
 
@@ -9,9 +9,13 @@ module RemoteRun
9
9
  @task_manager = TaskManager.new
10
10
  @host_manager = HostManager.new
11
11
 
12
+ # used in the runner
13
+ @identifier = `echo $RANDOM`.strip
14
+ @local_hostname = `hostname`.strip
15
+
12
16
  @local_path = Dir.getwd
13
17
  @login_as = ENV["USER"]
14
- @remote_path = "/tmp/remote"
18
+ @remote_path = "/tmp/remote/#{local_hostname}"
15
19
  @exclude = []
16
20
  @temp_path = "/tmp/remote"
17
21
  @quiet = false
@@ -20,10 +24,6 @@ module RemoteRun
20
24
  @ssh_options = "-o NoHostAuthenticationForLocalhost=yes -o UserKnownHostsFile=#{known_hosts} -o NumberOfPasswordPrompts=0 -o StrictHostKeyChecking=no -o ConnectTimeout=3 -4 "
21
25
  @rsync_options = "--delete --rsh='ssh #{ssh_options}' --timeout=60 -a"
22
26
 
23
- # used in the runner
24
- @identifier = `echo $RANDOM`.strip
25
- @local_hostname = `hostname`.strip
26
-
27
27
  @before_run = Proc.new{}
28
28
  @after_run = Proc.new{}
29
29
  @around_run = Proc.new {|&block| block.call }
@@ -131,6 +131,9 @@ module RemoteRun
131
131
  child_pid = task.pid
132
132
  if task_is_finished?(child_pid)
133
133
  @results << $?.exitstatus
134
+ if @result.last.to_s != "0"
135
+ log("Below tasks failed on #{task.host}\n#{task.command}", :red)
136
+ end
134
137
  @children.delete(task)
135
138
  end
136
139
  end
@@ -1,3 +1,3 @@
1
1
  module RemoteRun
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -66,7 +66,7 @@ describe RemoteRun::Host do
66
66
 
67
67
  context "when running a task" do
68
68
  before do
69
- ssh_command "localhost", "rm -rf /tmp/testing-remote-run"
69
+ ssh_command "localhost", "rm -rf /tmp/testing-remote-run; mkdir -p #{$runner.remote_path}"
70
70
  host.lock
71
71
  end
72
72
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_run
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
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: 2012-01-04 00:00:00.000000000Z
12
+ date: 2012-02-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
16
- requirement: &2153233200 !ruby/object:Gem::Requirement
16
+ requirement: &70213735352920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153233200
24
+ version_requirements: *70213735352920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &2153232700 !ruby/object:Gem::Requirement
27
+ requirement: &70213735351900 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2153232700
35
+ version_requirements: *70213735351900
36
36
  description: Can be used as a parallel unit test runner
37
37
  email:
38
38
  - casecommons-dev@googlegroups.com
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  segments:
76
76
  - 0
77
- hash: -667704604154805090
77
+ hash: 3367250044678258908
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  none: false
80
80
  requirements:
@@ -83,10 +83,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  segments:
85
85
  - 0
86
- hash: -667704604154805090
86
+ hash: 3367250044678258908
87
87
  requirements: []
88
88
  rubyforge_project: remote_run
89
- rubygems_version: 1.8.13
89
+ rubygems_version: 1.8.10
90
90
  signing_key:
91
91
  specification_version: 3
92
92
  summary: Run N shell scripts on a pool of remote hosts