salticid 0.9.6 → 0.9.8
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.
- checksums.yaml +4 -4
- data/lib/salticid/host.rb +19 -2
- data/lib/salticid/interface.rb +1 -0
- data/lib/salticid/interface/host_view.rb +1 -1
- data/lib/salticid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18d94d9cf5f66f05559c0c92dd49b4adc6de060f
|
|
4
|
+
data.tar.gz: 53528e2a51a6f6ab2b23d9f066a070b236d54d5e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7144fe249fca65c9013bd41d58b971af2225e470510b6eb0e6eefe30562faacbc47164432e169bf947a0e5cd7ace3968e4d8f44021946fb2ab572d698753b03
|
|
7
|
+
data.tar.gz: 4edada67749f62971f0263c01c8a44b8d17632e1ffd1ea30844a53b94696c5c70e7192fdf87ad08d42a434bf535236cd935b0a3da44fffcb8168c19b0add526e
|
data/lib/salticid/host.rb
CHANGED
|
@@ -170,6 +170,7 @@ class Salticid::Host
|
|
|
170
170
|
|
|
171
171
|
buffer = ''
|
|
172
172
|
echoed = 0
|
|
173
|
+
stderr_echoed = 0
|
|
173
174
|
status = nil
|
|
174
175
|
written = false
|
|
175
176
|
|
|
@@ -213,11 +214,21 @@ class Salticid::Host
|
|
|
213
214
|
|
|
214
215
|
# Handle STDERR
|
|
215
216
|
ch.on_extended_data do |c, type, data|
|
|
217
|
+
# STDERR
|
|
216
218
|
if type == 1
|
|
217
|
-
#
|
|
219
|
+
# Callback
|
|
218
220
|
opts[:stderr].call(data) if opts[:stderr]
|
|
221
|
+
|
|
222
|
+
# Accrue in stderr string
|
|
219
223
|
stderr << data
|
|
220
|
-
|
|
224
|
+
|
|
225
|
+
# Play forward any unwritten lines
|
|
226
|
+
if opts[:echo] and stderr_echoed < stderr.length
|
|
227
|
+
stderr[stderr_echoed..-1].split("\n")[0..-2].each do |fragment|
|
|
228
|
+
stderr_echoed += fragment.length + 1
|
|
229
|
+
log :stderr, fragment
|
|
230
|
+
end
|
|
231
|
+
end
|
|
221
232
|
end
|
|
222
233
|
end
|
|
223
234
|
|
|
@@ -244,6 +255,12 @@ class Salticid::Host
|
|
|
244
255
|
echoed += fragment.length + 1
|
|
245
256
|
log fragment
|
|
246
257
|
end
|
|
258
|
+
|
|
259
|
+
# Last of stderr
|
|
260
|
+
stderr[stderr_echoed..-1].split("\n").each do |fragment|
|
|
261
|
+
echoed += fragment.length + 1
|
|
262
|
+
log :stderr, fragment
|
|
263
|
+
end
|
|
247
264
|
end
|
|
248
265
|
end
|
|
249
266
|
end
|
data/lib/salticid/interface.rb
CHANGED
data/lib/salticid/version.rb
CHANGED