gaptool-client 0.6.13 → 0.6.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/gaptool-client.rb +14 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed7aec78e38e775659a5c972701836ba26bd0bf
|
4
|
+
data.tar.gz: 81242d83526297e991438283510aa26398f7d982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb71d1eb887b8efe99d8e8ecdfb0a4b61976b81a6168f07bdda6eed75113ee3fd212276fcd3b6a66fecc93f120db9b5b6ae34c2517763352f1f501dfe8d88ae6
|
7
|
+
data.tar.gz: 61978da8b616780f2f94e6ece704adc5d3726aa59462a6925e5dd0d5e7098ce159da73ed35712a7c8006e8a238d4e1166670cb44f137d07a6e1071b80ab6d4fb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.14
|
data/lib/gaptool-client.rb
CHANGED
@@ -40,32 +40,30 @@ def sshcmd(node, commands)
|
|
40
40
|
:keys_only => true,
|
41
41
|
:paranoid => false
|
42
42
|
) do |ssh|
|
43
|
-
stdout_data = ""
|
44
|
-
stderr_data = ""
|
45
43
|
exit_code = nil
|
46
44
|
exit_signal = nil
|
47
45
|
commands.each do |command|
|
48
46
|
ssh.open_channel do |channel|
|
49
|
-
channel.exec(command) do |
|
47
|
+
channel.exec(command) do |chx, success|
|
50
48
|
unless success
|
51
49
|
abort "FAILED: couldn't execute command (ssh.channel.exec)"
|
52
50
|
end
|
53
|
-
channel.on_data do |
|
51
|
+
channel.on_data do |chd,data|
|
54
52
|
puts "#{Rainbow(node['role']).yellow}:#{Rainbow(node['environment']).yellow}:#{Rainbow(node['instance']).yellow}> #{data}"
|
55
53
|
end
|
56
54
|
|
57
|
-
channel.on_extended_data do |
|
55
|
+
channel.on_extended_data do |che,type,data|
|
58
56
|
puts "#{Rainbow(node['role']).yellow}:#{Rainbow(node['environment']).yellow}:#{Rainbow(node['instance']).red}> #{data}"
|
59
57
|
end
|
60
58
|
|
61
|
-
channel.on_request("exit-status") do |
|
59
|
+
channel.on_request("exit-status") do |chs,data|
|
62
60
|
exit_code = data.read_long
|
63
61
|
if exit_code != 0
|
64
62
|
exit exit_code
|
65
63
|
end
|
66
64
|
end
|
67
65
|
|
68
|
-
channel.on_request("exit-signal") do |
|
66
|
+
channel.on_request("exit-signal") do |chg, data|
|
69
67
|
exit_signal = data.read_string
|
70
68
|
end
|
71
69
|
end
|
@@ -247,17 +245,24 @@ module Gaptool
|
|
247
245
|
nodes = $api.getenvroles(role, environment)
|
248
246
|
end
|
249
247
|
nodes.peach do |node|
|
248
|
+
if node['chef_runlist'].nil?
|
249
|
+
runlist = ['recipe[main]']
|
250
|
+
elsif node['chef_runlist'].is_a? Array
|
251
|
+
runlist = node['chef_runlist']
|
252
|
+
else
|
253
|
+
runlist = eval(node['chef_runlist'])
|
254
|
+
end
|
250
255
|
json = {
|
251
256
|
'this_server' => "#{role}-#{environment}-#{node['instance']}",
|
252
257
|
'role' => role,
|
253
258
|
'environment' => environment,
|
254
259
|
'app_user' => node['appuser'],
|
255
|
-
'run_list' =>
|
260
|
+
'run_list' => runlist,
|
256
261
|
'hostname' => node['hostname'],
|
257
262
|
'instance' => node['instance'],
|
258
263
|
'zone' => node['zone'],
|
259
264
|
'itype' => node['itype'],
|
260
|
-
'apps' => eval(node['apps']),
|
265
|
+
'apps' => eval(node['apps'] || '[]'),
|
261
266
|
}.merge(attrs)
|
262
267
|
git="git fetch --all; git reset --hard origin/`git rev-parse --abbrev-ref HEAD`"
|
263
268
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gaptool-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Laurita
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
requirements: []
|
228
228
|
rubyforge_project: gaptool-client
|
229
|
-
rubygems_version: 2.
|
229
|
+
rubygems_version: 2.4.3
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: client for gaptool-server
|