class Cake < Formula desc "Cross platform build automation system with a C# DSL." homepage "http://cakebuild.net/" url "https://github.com/cake-build/cake/releases/download/v0.20.0/Cake-bin-net45-v0.20.0.zip" sha256 "1136e4265404a8d14dd166d97a5ae30c54b1887de037ebb0262718ae8c5e75d4" bottle :unneeded depends_on "mono" => :recommended def install libexec.install Dir["*.dll"] libexec.install Dir["*.exe"] libexec.install Dir["*.xml"] bin.mkpath (bin/"cake").write <<-EOS.undent #!/bin/bash mono #{libexec}/Cake.exe "$@" EOS end test do (testpath/"build.cake").write <<-EOS.undent var target = Argument ("target", "info"); Task("info").Does(() => { Information ("Hello Homebrew"); }); RunTarget ("info"); EOS assert_match "Hello Homebrew\n", shell_output("#{bin}/cake build.cake") end end