vici: Use default Unix vici socket if none passed to ruby constructor

While we currently have a static path instead of one generated with Autotools,
this at least is congruent to what we have in the Python library.
This commit is contained in:
Martin Willi
2015-03-18 13:59:14 +01:00
parent 61fb10c8cf
commit fb8b119cfa
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -390,7 +390,10 @@ module Vici
# during encoding.
class Connection
def initialize(socket)
def initialize(socket = nil)
if socket == nil
socket = UNIXSocket.new("/var/run/charon.vici")
end
@transp = Transport.new(socket)
end