2015-01-07 01:49:45 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Gost < Formula
|
2015-08-01 09:35:45 +00:00
|
|
|
desc "Simple command-line utility for easily creating Gists for Github."
|
2015-01-07 01:49:45 +00:00
|
|
|
homepage "https://github.com/wilhelm-murdoch/gost"
|
2016-05-04 21:08:01 +00:00
|
|
|
url "https://github.com/wilhelm-murdoch/gost/archive/1.2.0.tar.gz"
|
|
|
|
sha256 "2dfe960f13a4dc6abb1148a28083d474f8caf63d5cf756558bf94772266f8512"
|
2015-01-07 01:49:45 +00:00
|
|
|
|
2015-06-20 04:10:43 +00:00
|
|
|
bottle do
|
2016-02-24 21:50:09 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-09-26 11:39:43 +00:00
|
|
|
sha256 "45dee0c06d08b7db1b38509e496e8374d682ca1bfaad6a403fe4454ef3f4e5ef" => :sierra
|
2016-05-04 21:27:57 +00:00
|
|
|
sha256 "42a60235f9f31d12b59d33867b4f74ac4e4fa979fd92f7066bd5720da2eb607b" => :el_capitan
|
|
|
|
sha256 "7acb5fcbd1230614a630cb4c0fefaef4a40b66dba633e067a641c17a4d444db2" => :yosemite
|
|
|
|
sha256 "7cc1cf98d45f0cfd43e0d822d60430670e58dbd40f221033b2a446f0f03bb681" => :mavericks
|
2015-06-20 04:10:43 +00:00
|
|
|
end
|
|
|
|
|
2015-01-07 01:49:45 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
2016-05-04 21:08:01 +00:00
|
|
|
go_resource "golang.org/x/oauth2" do
|
2016-09-09 09:35:56 +00:00
|
|
|
url "https://go.googlesource.com/oauth2.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "8434495902bd0900797016affe4ca35c55babb3f"
|
2016-05-04 21:08:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "golang.org/x/net" do
|
2016-09-09 09:35:56 +00:00
|
|
|
url "https://go.googlesource.com/net.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "35ec611a141ee705590b9eb64d673f9e6dfeb1ac"
|
2015-01-07 01:49:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/atotto/clipboard" do
|
2016-09-09 09:35:56 +00:00
|
|
|
url "https://github.com/atotto/clipboard.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "bb272b845f1112e10117e3e45ce39f690c0001ad"
|
2015-01-07 01:49:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/docopt/docopt.go" do
|
2016-09-09 09:35:56 +00:00
|
|
|
url "https://github.com/docopt/docopt.go.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "784ddc588536785e7299f7272f39101f7faccc3f"
|
2015-01-07 01:49:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/google/go-github" do
|
2016-09-09 09:35:56 +00:00
|
|
|
url "https://github.com/google/go-github.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "842c551fdeae14c97c04ef490f601ae4d849a00c"
|
2015-01-07 01:49:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/google/go-querystring" do
|
2016-09-09 09:35:56 +00:00
|
|
|
url "https://github.com/google/go-querystring.git",
|
2016-09-24 15:45:48 +00:00
|
|
|
:revision => "9235644dd9e52eeae6fa48efd539fdc351a0af53"
|
2015-01-07 01:49:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
|
|
|
system "go", "build", "-o", "gost"
|
|
|
|
bin.install "gost"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.txt").write "42"
|
|
|
|
system bin/"gost", "--file=test.txt"
|
|
|
|
end
|
|
|
|
end
|