lib/invoker/ipc/unix_client.rb in invoker-1.5.4 vs lib/invoker/ipc/unix_client.rb in invoker-1.5.5
- old
+ new
@@ -26,11 +26,11 @@
def send_and_wait(command, message = {})
begin
socket = Socket.unix(Invoker::IPC::Server::SOCKET_PATH)
rescue
- abort("Invoker does not seem to be running".color(:red))
+ abort("Invoker does not seem to be running".colorize(:red))
end
message_object = get_message_object(command, message)
send_json_message(socket, message_object)
socket.flush
socket
@@ -47,10 +47,10 @@
end
def open_client_socket(abort_if_not_running = true)
Socket.unix(Invoker::IPC::Server::SOCKET_PATH) { |socket| yield socket }
rescue
- abort_if_not_running && abort("Invoker does not seem to be running".color(:red))
+ abort_if_not_running && abort("Invoker does not seem to be running".colorize(:red))
end
def send_json_message(socket, message_object)
socket.write(message_object.encoded_message)
end