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

ferret 0.18.0 (new formula) #347

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
28 changes: 28 additions & 0 deletions Formula/f/ferret.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class Ferret < Formula
desc "Declarative web scraping"
homepage "https://www.montferret.dev/"
url "https://github.com/MontFerret/ferret/archive/refs/tags/v0.18.0.tar.gz"
sha256 "c6170136012dcef52d4f20e226f8f4625fdb31519433a52d95a37a1c0d15d85d"
license "Apache-2.0"
head "https://github.com/MontFerret/ferret.git", branch: "master"

depends_on "go" => :build

def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "./e2e/cli.go"
end

test do
# seeing different behaviors with Linux CI and hosted runner
# use macos test is good enough
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]

(testpath/"test.fql").write <<~EOS
LET doc = DOCUMENT("https://www.example.com")
RETURN doc.title
EOS

output = shell_output("#{bin}/ferret run #{testpath}/test.fql", 1)
assert_match "Example Domain", output
end
end
Loading