mobilize-ssh 1.1.09 → 1.1.10

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.
@@ -86,7 +86,7 @@ module Mobilize
86
86
  #make sure user starts in rem_dir
87
87
  rem_dir = "#{comm_md5}/"
88
88
  #make sure the rem_dir is gone
89
- Ssh.fire!(node,"rm -rf #{rem_dir}")
89
+ Ssh.fire!(node,"sudo rm -rf #{rem_dir}")
90
90
  if File.exists?(comm_dir)
91
91
  Ssh.scp(node,comm_dir,rem_dir)
92
92
  FileUtils.rm_r comm_dir, :force=>true
@@ -161,11 +161,19 @@ module Mobilize
161
161
  node, command = [params['node'],params['cmd']]
162
162
  node ||= Ssh.default_node
163
163
  gdrive_slot = Gdrive.slot_worker_by_path(s.path)
164
+ return false unless gdrive_slot
164
165
  file_hash = {}
165
166
  s.source_dsts(gdrive_slot).each do |sdst|
166
- file_name = sdst.path.split("/").last
167
- file_hash[file_name] = sdst.read(u.name)
168
- end
167
+ split_path = sdst.path.split("/")
168
+ #if path is to stage output, name with stage name
169
+ file_name = if split_path.last == "out" and
170
+ (1..5).to_a.map{|n| "stage#{n.to_s}"}.include?(split_path[-2].to_s)
171
+ "#{split_path[-2]}.out"
172
+ else
173
+ split_path.last
174
+ end
175
+ file_hash[file_name] = sdst.read(u.name)
176
+ end
169
177
  Gdrive.unslot_worker_by_path(s.path)
170
178
  user = s.params['user']
171
179
  if user and !Ssh.sudoers(node).include?(u.name)
@@ -1,5 +1,5 @@
1
1
  module Mobilize
2
2
  module Ssh
3
- VERSION = "1.1.09"
3
+ VERSION = "1.1.10"
4
4
  end
5
5
  end
data/mobilize-ssh.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
- gem.add_runtime_dependency "mobilize-base","1.1.08"
19
+ gem.add_runtime_dependency "mobilize-base","1.1.10"
20
20
  gem.add_runtime_dependency "net-ssh"
21
21
  gem.add_runtime_dependency "net-scp"
22
22
  gem.add_runtime_dependency "net-ssh-gateway"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobilize-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.09
4
+ version: 1.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-28 00:00:00.000000000 Z
12
+ date: 2013-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mobilize-base
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.1.08
21
+ version: 1.1.10
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.1.08
29
+ version: 1.1.10
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: net-ssh
32
32
  requirement: !ruby/object:Gem::Requirement