mobilize-ssh 1.0.65 → 1.0.71

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/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- require 'mobilize-base/rakes'
4
- require 'mobilize-ssh/rakes'
3
+ require 'mobilize-base/tasks'
4
+ require 'mobilize-ssh/tasks'
5
5
 
6
6
  #
7
7
  # Tests
@@ -126,18 +126,18 @@ module Mobilize
126
126
  return tmp_file_path
127
127
  end
128
128
 
129
- def Ssh.file_hash_by_task_path(task_path)
129
+ def Ssh.file_hash_by_stage_path(stage_path)
130
130
  #this is not meant to be called directly
131
- #from the Runner -- it's used by run_by_task_path
132
- t = Task.where(:path=>task_path).first
133
- params = t.params
131
+ #from the Runner -- it's used by run_by_stage_path
132
+ s = Stage.where(:path=>stage_path).first
133
+ params = s.params
134
134
  gsheet_paths = if params['sources']
135
135
  params['sources']
136
136
  elsif params['source']
137
137
  [params['source']]
138
138
  end
139
139
  if gsheet_paths and gsheet_paths.length>0
140
- gdrive_slot = Gdrive.slot_worker_by_path(task_path)
140
+ gdrive_slot = Gdrive.slot_worker_by_path(stage_path)
141
141
  file_hash = {}
142
142
  gsheet_paths.map do |gpath|
143
143
  string = Gsheet.find_by_path(gpath,gdrive_slot).to_tsv
@@ -146,17 +146,17 @@ module Mobilize
146
146
  end.each do |f|
147
147
  file_hash = f.merge(file_hash)
148
148
  end
149
- Gdrive.unslot_worker_by_path(task_path)
149
+ Gdrive.unslot_worker_by_path(stage_path)
150
150
  return file_hash
151
151
  end
152
152
  end
153
153
 
154
- def Ssh.run_by_task_path(task_path)
155
- t = Task.where(:path=>task_path).first
156
- params = t.params
154
+ def Ssh.run_by_stage_path(stage_path)
155
+ s = Stage.where(:path=>stage_path).first
156
+ params = s.params
157
157
  node, command = [params['node'],params['cmd']]
158
- file_hash = Ssh.file_hash_by_task_path(task_path)
159
- su_user = t.params['su_user']
158
+ file_hash = Ssh.file_hash_by_stage_path(stage_path)
159
+ su_user = s.params['su_user']
160
160
  Ssh.run(node,command,file_hash,su_user)
161
161
  end
162
162
  end
File without changes
@@ -1,5 +1,5 @@
1
1
  module Mobilize
2
2
  module Ssh
3
- VERSION = "1.0.65"
3
+ VERSION = "1.0.71"
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.0.75"
19
+ gem.add_runtime_dependency "mobilize-base","1.0.81"
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"
@@ -2,17 +2,17 @@
2
2
  active: true
3
3
  trigger: once
4
4
  status: ""
5
- task1: 'ssh.run node:"test_node", cmd:"ruby code.rb", su_user:"root", sources:["Runner_mobilize(test)/code.rb", "Runner_mobilize(test)/code.sh"]'
6
- task2: 'gsheet.write source:"task1", target:"Runner_mobilize(test)/test_ssh_1.out"'
5
+ stage1: 'ssh.run node:"test_node", cmd:"ruby code.rb", su_user:"root", sources:["Runner_mobilize(test)/code.rb", "Runner_mobilize(test)/code.sh"]'
6
+ stage2: 'gsheet.write source:"stage1", target:"Runner_mobilize(test)/test_ssh_1.out"'
7
7
  - name: test_ssh_2
8
8
  active: true
9
9
  trigger: once
10
10
  status: ""
11
- task1: 'ssh.run node:"test_node", cmd:"sh code.sh", su_user:"root", source:"Runner_mobilize(test)/code.sh"'
12
- task2: 'gsheet.write source:"task1", target:"Runner_mobilize(test)/test_ssh_2.out"'
11
+ stage1: 'ssh.run node:"test_node", cmd:"sh code.sh", su_user:"root", source:"Runner_mobilize(test)/code.sh"'
12
+ stage2: 'gsheet.write source:"stage1", target:"Runner_mobilize(test)/test_ssh_2.out"'
13
13
  - name: test_ssh_3
14
14
  active: true
15
15
  trigger: once
16
16
  status: ""
17
- task1: 'ssh.run node:"test_node", cmd:"whoami"'
18
- task2: 'gsheet.write source:"task1", target:"Runner_mobilize(test)/test_ssh_3.out"'
17
+ stage1: 'ssh.run node:"test_node", cmd:"whoami"'
18
+ stage2: 'gsheet.write source:"stage1", target:"Runner_mobilize(test)/test_ssh_3.out"'
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.0.65
4
+ version: 1.0.71
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: 2012-12-15 00:00:00.000000000 Z
12
+ date: 2012-12-17 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.0.75
21
+ version: 1.0.81
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.0.75
29
+ version: 1.0.81
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: net-ssh
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -93,7 +93,7 @@ files:
93
93
  - lib/mobilize-ssh/extensions/socket.rb
94
94
  - lib/mobilize-ssh/extensions/string.rb
95
95
  - lib/mobilize-ssh/handlers/ssh.rb
96
- - lib/mobilize-ssh/rakes.rb
96
+ - lib/mobilize-ssh/tasks.rb
97
97
  - lib/mobilize-ssh/version.rb
98
98
  - lib/samples/ssh.yml
99
99
  - mobilize-ssh.gemspec