bin/probe in utils-0.0.84 vs bin/probe in utils-0.0.85
- old
+ new
@@ -1,9 +1,13 @@
#!/usr/bin/env ruby
# encoding: UTF-8
require 'tins/xt'
+require 'term/ansicolor'
+class String
+ include Term::ANSIColor
+end
require 'tins/lines_file'
include Tins::GO
require 'utils'
include Utils
require 'drb'
@@ -55,11 +59,11 @@
@jobs = Queue.new
Thread.new { work_loop }
end
def enqueue(job)
- output_message "Job #{job.inspect} enqueued."
+ output_message "Job #{job.inspect} enqueued.".black.on_green
@jobs.push job
end
alias run enqueue
private
@@ -68,15 +72,15 @@
STDOUT.puts msg
STDOUT.flush
end
def run_job(job)
- output_message "Job #{job.inspect} about to run now."
+ output_message "Job #{job.inspect} about to run now:".black.on_yellow
fork do
exec(*cmd(job))
end
Process.wait
- output_message "Job #{job.inspect} was just run."
+ output_message "Job #{job.inspect} was just run.".black.on_red
end
def work_loop
loop do
job = @jobs.shift