diff --git a/Formula/c/code2prompt.rb b/Formula/c/code2prompt.rb index 3116ca97648b4..7564a43fa7bd2 100644 --- a/Formula/c/code2prompt.rb +++ b/Formula/c/code2prompt.rb @@ -1,19 +1,19 @@ class Code2prompt < Formula desc "CLI tool to convert your codebase into a single LLM prompt" homepage "https://github.com/mufeedvh/code2prompt" - url "https://github.com/mufeedvh/code2prompt/archive/refs/tags/v2.1.0.tar.gz" - sha256 "f1864a5d9e8e23270e0ef17ec56d709dad0ba4134950cf72b310a63b548b5c2d" + url "https://github.com/mufeedvh/code2prompt/archive/refs/tags/v3.0.2.tar.gz" + sha256 "08e45407b71bf5e5fb89930043b085cf8965a008dc5004d4aa4ac64db0e447e0" license "MIT" head "https://github.com/mufeedvh/code2prompt.git", branch: "main" bottle do - sha256 cellar: :any, arm64_sequoia: "a1dc66e144a2dfeff7dda031cc0d16632d282119d736b0993cf50a7a5b005b67" - sha256 cellar: :any, arm64_sonoma: "8c40b3ece87ed6c35ea242579e781faf9fd20686a94b7fe432abe3a13ab32736" - sha256 cellar: :any, arm64_ventura: "db469773a77d1e02a4ddb2a95a451eb8615aca0ef682e40bd6101b789887f999" - sha256 cellar: :any, sonoma: "20723e1b0317cc845d3a485f4bc117e2555d302f897e91711bf15f463da9af09" - sha256 cellar: :any, ventura: "2dd202385ad7dd7ae77789cd49776a2ca7156f99040d26fcb5fc926bde3bb57b" - sha256 cellar: :any_skip_relocation, arm64_linux: "602d1c3a1a724b30a16c84e774aaf3f13f948d63a093ff4578391d3e6c475c7a" - sha256 cellar: :any_skip_relocation, x86_64_linux: "9344860f7461bba1dae2a42a0d29c35279a5fde630d1dc1589137de249cdcdfa" + sha256 cellar: :any, arm64_sequoia: "ffb0a37cd1c18cfce0671d5f12893bf3e76861adeed8aebd0877bb0e297722aa" + sha256 cellar: :any, arm64_sonoma: "bf804355c19b6f6be322938ed43f0cc80201f1b530a5fa26ef0f155326f19f5c" + sha256 cellar: :any, arm64_ventura: "2c8ece110e8e9691417400d8e011ed0954a9b7f3b160a3d0988632219cf0c5e3" + sha256 cellar: :any, sonoma: "a9a016853a6abfd026b1ab3db2205faf4da346be2fec686a5504b7eac87071a2" + sha256 cellar: :any, ventura: "7429f9f5fa52f3d55ce31b80a92feacbcf2d8dcd5a5a13ec5b3da1f50ff362a0" + sha256 cellar: :any_skip_relocation, arm64_linux: "61242b4adb9b40caf4e07985b0f3e8296574322f18b60cf459812cf6e8197e09" + sha256 cellar: :any_skip_relocation, x86_64_linux: "ef85b418af9acc67de01f42ac222b996933588a6f8d02cd7b162346aae8084ff" end depends_on "pkgconf" => :build @@ -27,7 +27,7 @@ def install ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix ENV["OPENSSL_NO_VENDOR"] = "1" - system "cargo", "install", *std_cargo_args + system "cargo", "install", *std_cargo_args(path: "crates/code2prompt") end test do @@ -40,8 +40,9 @@ def hello_world(): print("Hello, world!") PYTHON - output = shell_output("#{bin}/code2prompt --no-clipboard --json test.py") - assert_match "ChatGPT models, text-embedding-ada-002", JSON.parse(output)["model_info"] + system bin/"code2prompt", "--no-clipboard", "--output-file", "test.json", "--output-format", "json", "test.py" + json_output = (testpath/"test.json").read + assert_match "ChatGPT models, text-embedding-ada-002", JSON.parse(json_output)["model_info"] [ Formula["openssl@3"].opt_lib/shared_library("libssl"),