mobilize-ssh 1.0.93 → 1.0.94

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/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ .DS_Store
2
+ test/dump.rdb
1
3
  *.gem
2
4
  *.rbc
3
5
  .bundle
data/README.md CHANGED
@@ -38,7 +38,7 @@ install section first.
38
38
  add this to your Gemfile:
39
39
 
40
40
  ``` ruby
41
- gem "mobilize-ssh", "~>1.0"
41
+ gem "mobilize-ssh"
42
42
  ```
43
43
 
44
44
  or do
@@ -55,8 +55,8 @@ for a ruby-wide install.
55
55
  Inside the Rakefile in your project's root dir, make sure you have:
56
56
 
57
57
  ``` ruby
58
- require 'mobilize-base/rakes'
59
- require 'mobilize-ssh/rakes'
58
+ require 'mobilize-base/tasks'
59
+ require 'mobilize-ssh/tasks'
60
60
  ```
61
61
 
62
62
  This defines rake tasks essential to run the environment.
@@ -69,6 +69,8 @@ run
69
69
 
70
70
  This will copy over a sample ssh.yml to your config dir.
71
71
 
72
+ It will also add mobilize-ssh to the extensions in jobtracker.yml.
73
+
72
74
  <a name='section_Configure'></a>
73
75
  Configure
74
76
  ------------
@@ -104,25 +106,58 @@ Each host and gateway has a series of ssh params:
104
106
  Sample ssh.yml:
105
107
 
106
108
  ``` yml
107
-
109
+ ---
108
110
  development:
109
- tmp_file_dir: "tmp/file/"
111
+ tmp_file_dir: tmp/file/
110
112
  nodes:
111
113
  dev_node:
112
- host: {name: dev-host.com, key: "config/mobilize/ssh_private.key", port: 22, user: host_user}
113
- gateway: {name: dev-gateway.com, key: "config/mobilize/ssh_private.key", port: 22, user: gateway_user}
114
+ sudoers:
115
+ - sudo_user
116
+ su_all_users: true
117
+ host:
118
+ name: dev-host.com
119
+ key: config/mobilize/ssh_private.key
120
+ port: 22
121
+ user: host_user
122
+ gateway:
123
+ name: dev-gateway.com
124
+ key: config/mobilize/ssh_private.key
125
+ port: 22
126
+ user: gateway_user
114
127
  test:
115
- tmp_file_dir: "tmp/file/"
128
+ tmp_file_dir: tmp/file/
116
129
  nodes:
117
130
  test_node:
118
- host: {name: test-host.com, key: "config/mobilize/ssh_private.key", port: 22, user: host_user}
119
- gateway: {name: test-gateway.com, key: "config/mobilize/ssh_private.key", port: 22, user: gateway_user}
131
+ sudoers:
132
+ - sudo_user
133
+ su_all_users: true
134
+ host:
135
+ name: test-host.com
136
+ key: config/mobilize/ssh_private.key
137
+ port: 22
138
+ user: host_user
139
+ gateway:
140
+ name: test-gateway.com
141
+ key: config/mobilize/ssh_private.key
142
+ port: 22
143
+ user: gateway_user
120
144
  production:
121
- tmp_file_dir: "tmp/file/"
145
+ tmp_file_dir: tmp/file/
122
146
  nodes:
123
147
  prod_node:
124
- host: {name: prod-host.com, key: "config/mobilize/ssh_private.key", port: 22, user: host_user}
125
- gateway: {name: prod-gateway.com, key: "config/mobilize/ssh_private.key", port: 22, user: gateway_user}
148
+ sudoers:
149
+ - sudo_user
150
+ su_all_users: true
151
+ host:
152
+ name: prod-host.com
153
+ key: config/mobilize/ssh_private.key
154
+ port: 22
155
+ user: host_user
156
+ gateway:
157
+ name: prod-gateway.com
158
+ key: config/mobilize/ssh_private.key
159
+ port: 22
160
+ user: gateway_user
126
161
  ```
127
162
 
128
163
  <a name='section_Start'></a>
@@ -21,5 +21,18 @@ namespace :mobilize_ssh do
21
21
  `cp #{sample_dir}#{fname} #{full_config_dir}#{fname}`
22
22
  end
23
23
  end
24
+ #make sure that the jobtracker.yml is updated to include the
25
+ #mobilize-ssh library
26
+ jt_config_file = "#{config_dir}jobtracker.yml"
27
+ if File.exists?(jt_config_file)
28
+ yml_hash = YAML.load_file(jt_config_file)
29
+ yml_hash.keys.each do |k|
30
+ if yml_hash[k]['extensions'] and !yml_hash[k]['extensions'].include?('mobilize-ssh')
31
+ puts "adding mobilize-ssh to jobtracker.yml/#{k}/extensions"
32
+ yml_hash[k]['extensions'] = yml_hash[k]['extensions'].to_a + ['mobilize-ssh']
33
+ end
34
+ end
35
+ File.open(jt_config_file,"w") {|f| f.print(yml_hash.to_yaml)}
36
+ end
24
37
  end
25
38
  end
@@ -1,5 +1,5 @@
1
1
  module Mobilize
2
2
  module Ssh
3
- VERSION = "1.0.93"
3
+ VERSION = "1.0.94"
4
4
  end
5
5
  end
data/lib/samples/ssh.yml CHANGED
@@ -1,24 +1,52 @@
1
+ ---
1
2
  development:
2
- tmp_file_dir: "tmp/file/"
3
+ tmp_file_dir: tmp/file/
3
4
  nodes:
4
5
  dev_node:
5
- sudoers: [sudo_user]
6
+ sudoers:
7
+ - sudo_user
6
8
  su_all_users: true
7
- host: {name: dev-host.com, key: "config/mobilize/ssh_private.key", port: 22, user: host_user}
8
- gateway: {name: dev-gateway.com, key: "config/mobilize/ssh_private.key", port: 22, user: gateway_user}
9
+ host:
10
+ name: dev-host.com
11
+ key: config/mobilize/ssh_private.key
12
+ port: 22
13
+ user: host_user
14
+ gateway:
15
+ name: dev-gateway.com
16
+ key: config/mobilize/ssh_private.key
17
+ port: 22
18
+ user: gateway_user
9
19
  test:
10
- tmp_file_dir: "tmp/file/"
20
+ tmp_file_dir: tmp/file/
11
21
  nodes:
12
22
  test_node:
13
- sudoers: [sudo_user]
23
+ sudoers:
24
+ - sudo_user
14
25
  su_all_users: true
15
- host: {name: test-host.com, key: "config/mobilize/ssh_private.key", port: 22, user: host_user}
16
- gateway: {name: test-gateway.com, key: "config/mobilize/ssh_private.key", port: 22, user: gateway_user}
26
+ host:
27
+ name: test-host.com
28
+ key: config/mobilize/ssh_private.key
29
+ port: 22
30
+ user: host_user
31
+ gateway:
32
+ name: test-gateway.com
33
+ key: config/mobilize/ssh_private.key
34
+ port: 22
35
+ user: gateway_user
17
36
  production:
18
- tmp_file_dir: "tmp/file/"
37
+ tmp_file_dir: tmp/file/
19
38
  nodes:
20
39
  prod_node:
21
- sudoers: [sudo_user]
40
+ sudoers:
41
+ - sudo_user
22
42
  su_all_users: true
23
- host: {name: prod-host.com, key: "config/mobilize/ssh_private.key", port: 22, user: host_user}
24
- gateway: {name: prod-gateway.com, key: "config/mobilize/ssh_private.key", port: 22, user: gateway_user}
43
+ host:
44
+ name: prod-host.com
45
+ key: config/mobilize/ssh_private.key
46
+ port: 22
47
+ user: host_user
48
+ gateway:
49
+ name: prod-gateway.com
50
+ key: config/mobilize/ssh_private.key
51
+ port: 22
52
+ user: gateway_user
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.93"
19
+ gem.add_runtime_dependency "mobilize-base","1.0.94"
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.0.93
4
+ version: 1.0.94
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.93
21
+ version: 1.0.94
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.93
29
+ version: 1.0.94
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: net-ssh
32
32
  requirement: !ruby/object:Gem::Requirement