File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ class Yek < Formula
2+ desc "Fast Rust based tool to serialize text-based files for LLM consumption"
3+ homepage "https://github.com/bodo-run/yek"
4+ url "https://github.com/bodo-run/yek/archive/refs/tags/v0.21.0.tar.gz"
5+ sha256 "2c0e863e0f49f690977910498a1b8dd151c625bf04b88a7d6ff20553590b6ccf"
6+ license "MIT"
7+ head "https://github.com/bodo-run/yek.git" , branch : "main"
8+
9+ livecheck do
10+ url :stable
11+ regex ( /^v?(\d +(?:\. \d +)+)$/i )
12+ end
13+
14+ depends_on "pkgconf" => :build
15+ depends_on "rust" => :build
16+
17+ depends_on "openssl@3"
18+ uses_from_macos "zlib"
19+
20+ def install
21+ ENV [ "OPENSSL_DIR" ] = Formula [ "openssl@3" ] . opt_prefix
22+ ENV [ "OPENSSL_NO_VENDOR" ] = "1"
23+
24+ system "cargo" , "install" , *std_cargo_args
25+ end
26+
27+ test do
28+ assert_match version . to_s , shell_output ( "#{ bin } /yek --version" )
29+
30+ ( testpath /"main.c" ) . write <<~C
31+ #include <stdio.h>
32+ #include <stdlib.h>
33+
34+ int main(void) {
35+ printf("%s\n ", "Hello, world!");
36+ return EXIT_SUCCESS;
37+ }
38+ C
39+ expected_file = shell_output ( "#{ bin } /yek --output-dir #{ testpath } " )
40+ assert_match ">>>> main.c" , expected_file
41+ end
42+ end
You can’t perform that action at this time.
0 commit comments