Skip to content

Commit 840d75d

Browse files
authored
Merge pull request #223334 from botantony/cookcli
cookcli 0.10.0 (new formula)
2 parents 8fbbaa5 + fb90050 commit 840d75d

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/autobump.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ contentful-cli
635635
convco
636636
convmv
637637
convox
638+
cookcli
638639
cookiecutter
639640
copa
640641
copier

Formula/c/cookcli.rb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
class Cookcli < Formula
2+
desc "CLI-tool for cooking recipes formated using Cooklang"
3+
homepage "https://cooklang.org"
4+
url "https://github.com/cooklang/cookcli/archive/refs/tags/v0.10.0.tar.gz"
5+
sha256 "6832191a18e4e4a2d9f5e3227631b7c598d239f01f0560bc226cc3ef3948194b"
6+
license "MIT"
7+
head "https://github.com/cooklang/cookcli.git", branch: "main"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "01306fee0d7da8501ff32659dcdab40c5705d12d042641a666708dfebb3efe17"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "952bef99a47f0fed5596abc7c6a0e842aeaec2d3d4bc10abd49eb95d0eefe943"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "266922100f1e6d6722969acc076b1580e6a5e6a66c7c7a37856529740449564d"
13+
sha256 cellar: :any_skip_relocation, sonoma: "a1657416d697b0cb55e057aa31658b514814b349c106c8576c096cac9c333b81"
14+
sha256 cellar: :any_skip_relocation, ventura: "792fc80ab06153e4a6291dfbe1a450c270a3b9cc6f71e2ad32b82b4c77c191c4"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "edb7a7f5ca3d7610a1ae9fe6e6963313a146a366440c4f948ba37697cd543be9"
16+
end
17+
18+
depends_on "rust" => :build
19+
depends_on "openssl@3"
20+
21+
def install
22+
ENV["OPENSSL_NO_VENDOR"] = "1"
23+
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
24+
system "cargo", "install", *std_cargo_args
25+
end
26+
27+
test do
28+
assert_match version.to_s, shell_output("#{bin}/cook --version")
29+
30+
(testpath/"pancakes.cook").write <<~COOK
31+
Crack the @eggs{3} into a #blender, then add the @plain flour{125%g},
32+
@milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth.
33+
COOK
34+
(testpath/"expected.md").write <<~MARKDOWN
35+
## Ingredients
36+
37+
- *3* eggs
38+
- *125 g* plain flour
39+
- *250 ml* milk
40+
- *1 pinch* sea salt
41+
42+
## Cookware
43+
44+
- blender
45+
46+
## Steps
47+
48+
1. Crack the eggs into a blender, then add the plain flour, milk and sea salt,
49+
and blitz until smooth.
50+
MARKDOWN
51+
assert_match (testpath/"expected.md").read,
52+
shell_output("#{bin}/cook recipe read --format markdown pancakes.cook")
53+
end
54+
end

0 commit comments

Comments
 (0)