File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ class Cogapp < Formula
2+ include Language ::Python ::Virtualenv
3+
4+ desc "Small bits of Python computation for static files"
5+ homepage "https://cog.readthedocs.io/en/latest/"
6+ url "https://files.pythonhosted.org/packages/27/04/395d2067e7cb2e0c847dad74ef6048ce9cdf2c77c7add3805485455ac288/cogapp-3.5.1.tar.gz"
7+ sha256 "a9e8b8c31e5e47de722f27eaba1ec128dd6c8e7b6015555d9c8edaa5ad6092b4"
8+ license "MIT"
9+
10+ bottle do
11+ sha256 cellar : :any_skip_relocation , all : "a904c26976e9e55216ce6316e12727825dd8fdda8b4a762be8a6632efe60d172"
12+ end
13+
14+ 15+
16+ def install
17+ virtualenv_install_with_resources
18+ end
19+
20+ test do
21+ assert_match version . to_s , shell_output ( "#{ bin } /cog -v" )
22+
23+ ( testpath /"test.cpp" ) . write <<~CPP
24+ /*[[[cog
25+ import cog
26+ fnames = ['DoSomething', 'DoAnotherThing', 'DoLastThing']
27+ for fn in fnames:
28+ cog.outl("void %s();" % fn)
29+ ]]]*/
30+ //[[[end]]]
31+ CPP
32+
33+ output = shell_output ( "#{ bin } /cog test.cpp" )
34+ assert_match "void DoSomething();\n void DoAnotherThing();\n void DoLastThing();" , output
35+ end
36+ end
You can’t perform that action at this time.
0 commit comments