goaccess: replace Utils::JSON with corelib JSON.
This commit is contained in:
parent
e518c6dd9a
commit
9340f46bd8
1 changed files with 1 additions and 3 deletions
|
@ -36,14 +36,12 @@ class Goaccess < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
require "utils/json"
|
||||
|
||||
(testpath/"access.log").write <<-EOS.undent
|
||||
127.0.0.1 - - [04/May/2015:15:48:17 +0200] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36"
|
||||
EOS
|
||||
|
||||
output = shell_output("#{bin}/goaccess --time-format=%T --date-format=%d/%b/%Y --log-format='%h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\"' -f access.log -o json 2>/dev/null")
|
||||
|
||||
assert_equal "Chrome", Utils::JSON.load(output)["browsers"]["data"][0]["data"]
|
||||
assert_equal "Chrome", JSON.parse(output)["browsers"]["data"][0]["data"]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue