lib/juicer/binary.rb in juicer-1.1.2 vs lib/juicer/binary.rb in juicer-1.2.0
- old
+ new
@@ -27,12 +27,12 @@
@path
end
# Run command
#
- def execute(params = nil)
- cmd = IO.popen("#{self.command} #{params}", "r")
+ def execute(*params)
+ cmd = IO.popen(([self.command] + params).flatten, "r")
results = cmd.gets(nil)
cmd.close
results
end
@@ -105,10 +105,10 @@
# Constructs the command to use
#
def command
return @command if !@opt_set && @command
@opt_set = false
- @command = "#{@binary} #{options}"
+ @command = [@binary, options]
end
# Locate the binary to execute. The binary is searched for in the
# following places:
#