1
1
class Code2prompt < Formula
2
2
desc "CLI tool to convert your codebase into a single LLM prompt"
3
3
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 "
6
6
license "MIT"
7
7
head "https://github.com/mufeedvh/code2prompt.git" , branch : "main"
8
8
@@ -27,7 +27,7 @@ def install
27
27
ENV [ "OPENSSL_DIR" ] = Formula [ "openssl@3" ] . opt_prefix
28
28
ENV [ "OPENSSL_NO_VENDOR" ] = "1"
29
29
30
- system "cargo" , "install" , *std_cargo_args
30
+ system "cargo" , "install" , *std_cargo_args ( path : "crates/code2prompt" )
31
31
end
32
32
33
33
test do
@@ -40,8 +40,9 @@ def hello_world():
40
40
print("Hello, world!")
41
41
PYTHON
42
42
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" ]
45
46
46
47
[
47
48
Formula [ "openssl@3" ] . opt_lib /shared_library ( "libssl" ) ,
0 commit comments