mobilize-ssh 1.1.06 → 1.1.07
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/README.md +5 -5
- data/lib/mobilize-ssh/handlers/ssh.rb +5 -4
- data/lib/mobilize-ssh/version.rb +1 -1
- data/mobilize-ssh.gemspec +2 -2
- data/test/mobilize-ssh_test.rb +2 -2
- metadata +5 -5
data/README.md
CHANGED
@@ -211,15 +211,15 @@ execute the second, which is a "tail /var/log/syslog" command, and write the res
|
|
211
211
|
Meta
|
212
212
|
----
|
213
213
|
|
214
|
-
* Code: `git clone git://github.com/
|
215
|
-
* Home: <https://github.com/
|
216
|
-
* Bugs: <https://github.com/
|
214
|
+
* Code: `git clone git://github.com/dena/mobilize-ssh.git`
|
215
|
+
* Home: <https://github.com/dena/mobilize-ssh>
|
216
|
+
* Bugs: <https://github.com/dena/mobilize-ssh/issues>
|
217
217
|
* Gems: <http://rubygems.org/gems/mobilize-ssh>
|
218
218
|
|
219
219
|
<a name='section_Author'></a>
|
220
220
|
Author
|
221
221
|
------
|
222
222
|
|
223
|
-
Cassio Paes-Leme :: cpaesleme@
|
223
|
+
Cassio Paes-Leme :: cpaesleme@dena.com :: @cpaesleme
|
224
224
|
|
225
|
-
[mobilize-base]: https://github.com/
|
225
|
+
[mobilize-base]: https://github.com/dena/mobilize-base
|
@@ -35,7 +35,7 @@ module Mobilize
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def Ssh.pop_comm_dir(comm_dir,file_hash)
|
38
|
-
|
38
|
+
FileUtils.rm_r comm_dir, :force=>true
|
39
39
|
file_hash.each do |fname,fdata|
|
40
40
|
fpath = "#{comm_dir}/#{fname}"
|
41
41
|
#for now, only gz is binary
|
@@ -89,7 +89,7 @@ module Mobilize
|
|
89
89
|
Ssh.fire!(node,"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
|
93
93
|
else
|
94
94
|
#create folder
|
95
95
|
mkdir_command = "mkdir #{rem_dir}"
|
@@ -137,7 +137,7 @@ module Mobilize
|
|
137
137
|
def Ssh.write(node,fdata,to_path,binary=false)
|
138
138
|
from_path = Ssh.tmp_file(fdata,binary)
|
139
139
|
Ssh.scp(node,from_path,to_path)
|
140
|
-
|
140
|
+
FileUtils.rm from_path
|
141
141
|
return true
|
142
142
|
end
|
143
143
|
|
@@ -146,7 +146,8 @@ module Mobilize
|
|
146
146
|
tmp_file_path = fpath || "#{Ssh.tmp_file_dir}#{(fdata + Time.now.utc.to_f.to_s).to_md5}"
|
147
147
|
write_mode = binary ? "wb" : "w"
|
148
148
|
#make sure folder is created
|
149
|
-
|
149
|
+
tmp_file_dir = tmp_file_path.split("/")[0..-2].join("/")
|
150
|
+
FileUtils.mkdir_p(tmp_file_dir)
|
150
151
|
#write data to path
|
151
152
|
File.open(tmp_file_path,write_mode) {|f| f.print(fdata)}
|
152
153
|
return tmp_file_path
|
data/lib/mobilize-ssh/version.rb
CHANGED
data/mobilize-ssh.gemspec
CHANGED
@@ -10,13 +10,13 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["cpaesleme@ngmoco.com"]
|
11
11
|
gem.description = %q{mobilize-ssh allows you to automate ssh commands and files across hosts}
|
12
12
|
gem.summary = %q{extend mobilize-base with the ability to run files across hosts}
|
13
|
-
gem.homepage = "http://github.com/
|
13
|
+
gem.homepage = "http://github.com/dena/mobilize-ssh"
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
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.
|
19
|
+
gem.add_runtime_dependency "mobilize-base","1.1.07"
|
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"
|
data/test/mobilize-ssh_test.rb
CHANGED
@@ -43,9 +43,9 @@ describe "Mobilize" do
|
|
43
43
|
ssh_job_rows.map{|j| r.jobs(j['name'])}.each{|j| j.delete if j}
|
44
44
|
jobs_sheet.add_or_update_rows(ssh_job_rows)
|
45
45
|
|
46
|
-
puts "job row added, force enqueue runner, wait
|
46
|
+
puts "job row added, force enqueue runner, wait 300s"
|
47
47
|
r.enqueue!
|
48
|
-
sleep
|
48
|
+
sleep 300
|
49
49
|
|
50
50
|
puts "update job status and activity"
|
51
51
|
r.update_gsheet(gdrive_slot)
|
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.
|
4
|
+
version: 1.1.07
|
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-
|
12
|
+
date: 2013-02-22 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.
|
21
|
+
version: 1.1.07
|
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.
|
29
|
+
version: 1.1.07
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: net-ssh
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +103,7 @@ files:
|
|
103
103
|
- test/redis-test.conf
|
104
104
|
- test/ssh_job_rows.yml
|
105
105
|
- test/test_helper.rb
|
106
|
-
homepage: http://github.com/
|
106
|
+
homepage: http://github.com/dena/mobilize-ssh
|
107
107
|
licenses: []
|
108
108
|
post_install_message:
|
109
109
|
rdoc_options: []
|