salticid 0.9.6 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64a66a4ad8d5621362736470e5e59de49304621e
4
- data.tar.gz: 2d23c1e7bb6805f3930a8b7851c6df1d3249bd78
3
+ metadata.gz: 18d94d9cf5f66f05559c0c92dd49b4adc6de060f
4
+ data.tar.gz: 53528e2a51a6f6ab2b23d9f066a070b236d54d5e
5
5
  SHA512:
6
- metadata.gz: 0473e989e79da8851aca8d0c1db2f3a73590811a97d558d56d495bc5437aa412af6d4f4e86bc1121c60d615db4eb815e776543af4e1bebe6e3e14c67756aeeff
7
- data.tar.gz: 3ab14e47b33c26ba52fcdd4742802e4729c59819dc657b3a985a1e65de4da90a89ec1bb9aca4d547d35dea46c9ac8783a8f2c0b7ee8fde52b76a65832f3c962a
6
+ metadata.gz: c7144fe249fca65c9013bd41d58b971af2225e470510b6eb0e6eefe30562faacbc47164432e169bf947a0e5cd7ace3968e4d8f44021946fb2ab572d698753b03
7
+ data.tar.gz: 4edada67749f62971f0263c01c8a44b8d17632e1ffd1ea30844a53b94696c5c70e7192fdf87ad08d42a434bf535236cd935b0a3da44fffcb8168c19b0add526e
@@ -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
- # STDERR
219
+ # Callback
218
220
  opts[:stderr].call(data) if opts[:stderr]
221
+
222
+ # Accrue in stderr string
219
223
  stderr << data
220
- log :stderr, stderr if opts[:echo]
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
@@ -12,6 +12,7 @@ class Salticid
12
12
  :error => Curses::COLOR_RED,
13
13
  :warn => Curses::COLOR_YELLOW,
14
14
  :debug => Curses::COLOR_CYAN,
15
+ :stderr => Curses::COLOR_MAGENTA,
15
16
  :finished => Curses::COLOR_GREEN
16
17
  }
17
18
  COLOR_PAIRS = {}
@@ -80,7 +80,7 @@ class Salticid
80
80
  else
81
81
  # Put hanging line
82
82
  @window.attron Curses::A_BOLD
83
- @window.attron color if color
83
+ @window.color_set color if color
84
84
  @window.setpos lines_left, offset
85
85
  @window.addstr line
86
86
  end
@@ -1,3 +1,3 @@
1
1
  class Salticid
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salticid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kingsbury