Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whatweb 0.5.5 (new formula) #140724

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Formula/w/whatweb.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Whatweb < Formula
desc "Web scanner. Identify the technology stack that powers a website"
homepage "https://morningstarsecurity.com/research/whatweb"
url "https://github.com/urbanadventurer/WhatWeb/archive/refs/tags/v0.5.5.tar.gz"
sha256 "96dedb6a377184fb8f5fd3f2a81c26ff8c92c4dc1503ce409793a1e7ab23695d"
license "GPL-2.0-only"
head "https://github.com/urbanadventurer/WhatWeb.git", branch: "master"

uses_from_macos "ruby" => :build, since: :ventura

def install
ENV["GEM_HOME"] = buildpath/"gem_home"
system "gem", "install", "bundler"
ENV.prepend_path "PATH", buildpath/"gem_home/bin"
system "bundle", "config", "--local", "#{libexec}/whatweb"
system "bundle", "install"
system "make", "install",
"prefix=#{prefix}",
"-e", "BINPATH=#{bin}",
"-e", "DOCPATH=#{doc}",
"-e", "LIBPATH=#{lib}",
"-e", "MANPATH=#{man}"
end

test do

Check failure on line 25 in Formula/w/whatweb.rb

View workflow job for this annotation

GitHub Actions / macOS 11-arm64

`brew test --verbose whatweb` failed on macOS Big Sur (11) on Apple Silicon!

/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/bin/bundle clean ==> Testing whatweb ==> /opt/homebrew/Cellar/whatweb/0.5.5/bin/whatweb --log-json=test.json --verbose --color=never google.com WhatWeb is not installed and is missing dependencies. The following gems are missing: - addressable To install run the following command from the WhatWeb folder: 'bundle install' Error: whatweb: failed An exception occurred within a child process: Minitest::Assertion: Expected: 0 Actual: 1 /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:183:in `assert' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:218:in `assert_equal' /opt/homebrew/Library/Homebrew/formula_assertions.rb:26:in `shell_output' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/w/whatweb.rb:30:in `block in <class:Whatweb>' /opt/homebrew/Library/Homebrew/formula.rb:2493:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:499:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2492:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1054:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2491:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run' /opt/homebrew/Library/Homebrew/formula.rb:2784:in `mktemp' /opt/homebrew/Library/Homebrew/formula.rb:2485:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:44:in `block in <main>' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/lib/ruby/2.6.0/timeout.rb:33:in `block in catch' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/lib/ruby/2.6.0/timeout.rb:33:in `catch' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/lib/ruby/2.6.0/timeout.rb:33:in `catch' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/lib/ruby/2.6.0/timeout.rb:108:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:48:in `<main>'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like https://github.com/urbanadventurer/WhatWeb/blob/master/Gemfile is missing a Gemfile.lock and that perhaps is why addressable isn't being installed as expected. I'd suggest perhaps making a PR to add one but there's been no PRs merged since 2021 so I'm wondering if this project is maintained at all any more, unfortunately.

target_test = shell_output("#{bin}/whatweb --log-json=test.json --verbose --color=never google.com").strip
log_test = File.exist?("test.json")
assert_equal true, log_test
assert_match(/Status\s\s\s\s:\s[0-9]+/, target_test)
assert_match(/Title\s\s\s\s\s:\sGoogle/, target_test)
assert_match(/Country\s\s\s:\sUNITED\sSTATES(,)\sUS/, target_test)
version_test = shell_output("#{bin}/whatweb --version").strip
assert_equal "WhatWeb version #{version} ( https://www.morningstarsecurity.com/research/whatweb/ )", version_test
end
end
Loading