Skip to content

Commit a920dea

Browse files
BrewTestBotchenrui333
authored andcommitted
code2prompt 3.0.2
code2prompt: update build Signed-off-by: Rui Chen <[email protected]> code2prompt: update test Signed-off-by: Rui Chen <[email protected]>
1 parent 0e9c126 commit a920dea

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Formula/c/code2prompt.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class Code2prompt < Formula
22
desc "CLI tool to convert your codebase into a single LLM prompt"
33
homepage "https://github.com/mufeedvh/code2prompt"
4-
url "https://github.com/mufeedvh/code2prompt/archive/refs/tags/v2.1.0.tar.gz"
5-
sha256 "f1864a5d9e8e23270e0ef17ec56d709dad0ba4134950cf72b310a63b548b5c2d"
4+
url "https://github.com/mufeedvh/code2prompt/archive/refs/tags/v3.0.2.tar.gz"
5+
sha256 "08e45407b71bf5e5fb89930043b085cf8965a008dc5004d4aa4ac64db0e447e0"
66
license "MIT"
77
head "https://github.com/mufeedvh/code2prompt.git", branch: "main"
88

@@ -27,7 +27,7 @@ def install
2727
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
2828
ENV["OPENSSL_NO_VENDOR"] = "1"
2929

30-
system "cargo", "install", *std_cargo_args
30+
system "cargo", "install", *std_cargo_args(path: "crates/code2prompt")
3131
end
3232

3333
test do
@@ -40,8 +40,9 @@ def hello_world():
4040
print("Hello, world!")
4141
PYTHON
4242

43-
output = shell_output("#{bin}/code2prompt --no-clipboard --json test.py")
44-
assert_match "ChatGPT models, text-embedding-ada-002", JSON.parse(output)["model_info"]
43+
system bin/"code2prompt", "--no-clipboard", "--output-file", "test.json", "--output-format", "json", "test.py"
44+
json_output = (testpath/"test.json").read
45+
assert_match "ChatGPT models, text-embedding-ada-002", JSON.parse(json_output)["model_info"]
4546

4647
[
4748
Formula["openssl@3"].opt_lib/shared_library("libssl"),

0 commit comments

Comments
 (0)