From 67bf84257e21a8c031bc16c83a640cacdbb04eeb Mon Sep 17 00:00:00 2001 From: Christopher 'Chief' Najewicz Date: Thu, 17 Nov 2016 09:52:03 -0500 Subject: [PATCH] wu 3.10.0 (new formula) Closes #7015. Signed-off-by: Mike McQuaid --- Formula/wu.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Formula/wu.rb diff --git a/Formula/wu.rb b/Formula/wu.rb new file mode 100644 index 0000000000..6b5c5bed7e --- /dev/null +++ b/Formula/wu.rb @@ -0,0 +1,22 @@ +class Wu < Formula + desc "CLI that retrieves weather data from Weather Underground." + homepage "https://github.com/sramsay/wu" + url "https://github.com/sramsay/wu/archive/3.10.0.tar.gz" + sha256 "0934771cdd04cb4c38b45190dbfa97fa8b3aafaf53ea75152f070c97de850223" + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + mkdir_p buildpath/"src/github.com/sramsay" + ln_sf buildpath, buildpath/"src/github.com/sramsay/wu" + + cd "src/github.com/sramsay/wu" do + system "go", "build", "-o", bin/"wu", "-ldflags", "-X main.Version=#{version}" + end + end + + test do + assert_match "You must create a .condrc file in $HOME.", shell_output("#{bin}/wu -all") + end +end