Skip to content

Commit

Permalink
Merge pull request #200882 from Homebrew/crates-tui
Browse files Browse the repository at this point in the history
crates-tui 0.1.23 (new formula)
  • Loading branch information
BrewTestBot authored Dec 12, 2024
2 parents 7e5e8c0 + f034966 commit 66901cd
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ cpuid
cql-proxy
crabz
crane
crates-tui
cri-tools
crispy-doom
croaring
Expand Down
45 changes: 45 additions & 0 deletions Formula/c/crates-tui.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
class CratesTui < Formula
desc "TUI for exploring crates.io using Ratatui"
homepage "https://github.com/ratatui/crates-tui"
url "https://github.com/ratatui/crates-tui/archive/refs/tags/v0.1.23.tar.gz"
sha256 "104167275985e2811fa9c64af177bd2616ec6cd1b5a02e931f2afe5c6c29a191"
license "MIT"
head "https://github.com/ratatui/crates-tui.git", branch: "main"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "c4f5b9288ddc35bb6e2de20f0f5e6bb260c08d6b580a60fc03014c215ea38db6"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "4ee49a9c6e383a46c1a10589aee85cb132c0673fe564df630ab2f29e841dad4c"
sha256 cellar: :any_skip_relocation, arm64_ventura: "c2106fdebcd5d3a09b50d7943527b7b2677a8f0df2567a82cd6fcb9f73b8e329"
sha256 cellar: :any_skip_relocation, sonoma: "4bdd74f2e3bc06bf68d2def74e89405b4c01418bf1fbdb861728f102a5518db1"
sha256 cellar: :any_skip_relocation, ventura: "49366877add0406ba87dd5952ac875d4938496991e06fd399abd5fa1c4b77851"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b71bf937c05cd606ba6aa226768789fefaf23706daf0adf3c7bf7e160388bd8b"
end

depends_on "pkgconf" => :build
depends_on "rust" => :build

on_linux do
depends_on "openssl@3"
end

def install
system "cargo", "install", *std_cargo_args
end

test do
assert_match version.to_s, shell_output("#{bin}/crates-tui --version")

# failed with Linux CI, `No such device or address (os error 6)`
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]

begin
output_log = testpath/"output.log"
pid = spawn bin/"crates-tui", [:out, :err] => output_log.to_s
sleep 2
assert_match "New Crates", output_log.read
ensure
Process.kill("TERM", pid)
Process.wait(pid)
end
end
end

0 comments on commit 66901cd

Please sign in to comment.