diff options
| author | Marcin Kulik | 2014-12-18 14:10:25 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-18 16:07:26 +0000 |
| commit | d94284e74b3043ebdff781a383a07d5e4005fe54 (patch) | |
| tree | 370b4076dcd684d9fe5e338c17c5780197c08664 | |
| parent | 329505ac338012ad21564913f313d67c5f2c6675 (diff) | |
| download | homebrew-d94284e74b3043ebdff781a383a07d5e4005fe54.tar.bz2 | |
asciinema 0.9.9
| -rw-r--r-- | Library/Formula/asciinema.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Library/Formula/asciinema.rb b/Library/Formula/asciinema.rb new file mode 100644 index 000000000..5536b03f7 --- /dev/null +++ b/Library/Formula/asciinema.rb @@ -0,0 +1,38 @@ +require "language/go" + +class Asciinema < Formula + homepage "https://asciinema.org/" + url "https://github.com/asciinema/asciinema-cli/archive/v0.9.9.tar.gz" + sha1 "155c19366ffb3347e97026e9ab8006c16d2a52c6" + + depends_on "go" => :build + + go_resource "github.com/kr/pty" do + url "https://github.com/kr/pty.git", :revision => "67e2db24c831afa6c64fc17b4a143390674365ef" + end + + go_resource "code.google.com/p/go.crypto" do + url "https://code.google.com/p/go.crypto/", :revision => "aa2644fe4aa5", :using => :hg + end + + go_resource "code.google.com/p/gcfg" do + url "https://code.google.com/p/gcfg/", :revision => "c2d3050044d05357eaf6c3547249ba57c5e235cb", :using => :git + end + + def install + ENV["GOPATH"] = buildpath + mkdir_p buildpath/"src/github.com/asciinema" + ln_s buildpath, buildpath/"src/github.com/asciinema/asciinema-cli" + Language::Go.stage_deps resources, buildpath/"src" + + system "go", "build", "-o", "asciinema" + + bin.install "asciinema" + end + + test do + assert_match /browser/, pipe_output("HOME=#{testpath} #{bin}/asciinema auth") + assert File.exists?("#{testpath}/.asciinema/config") + end + +end |
