95884bae22
Closes Homebrew/homebrew#42407. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
30 lines
979 B
Ruby
30 lines
979 B
Ruby
class Visitors < Formula
|
|
desc "eb server log analyzer"
|
|
homepage "http://www.hping.org/visitors/"
|
|
url "http://www.hping.org/visitors/visitors-0.7.tar.gz"
|
|
sha256 "d2149e33ffe96b1f52b0587cff65973b0bc0b24ec43cdf072a782c1bd52148ab"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha1 "928de6f2794afa9e0158067ebf008e6389ef91f0" => :mavericks
|
|
sha1 "74a01b10e5eba82754b52c4db7bf03c5f19470f0" => :mountain_lion
|
|
sha1 "af85dc4e113dfc1d54661d7b762c191dca5f8fb9" => :lion
|
|
end
|
|
|
|
def install
|
|
system "make"
|
|
|
|
# There is no "make install", so do it manually
|
|
bin.install "visitors"
|
|
man1.install "visitors.1"
|
|
end
|
|
|
|
test do
|
|
IO.popen("#{bin}/visitors - -o text 2>&1", "w+") do |pipe|
|
|
pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:00 -0400] "GET /1 HTTP/1.1" 200 9 - -'
|
|
pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:01 -0400] "GET /2 HTTP/1.1" 200 9 - -'
|
|
pipe.close_write
|
|
assert pipe.read.include?("Different pages requested: 2")
|
|
end
|
|
end
|
|
end
|