2014-02-06 16:16:28 +00:00
|
|
|
class Cask < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Emacs dependency management"
|
2015-05-08 10:48:23 +00:00
|
|
|
homepage "https://cask.readthedocs.org/"
|
2014-09-23 05:49:03 +00:00
|
|
|
url "https://github.com/cask/cask/archive/v0.7.2.tar.gz"
|
2015-05-08 07:52:53 +00:00
|
|
|
sha256 "5c8804933dd395ec79e957c96179bf6ac20af24066928685a713e54f44107a2c"
|
2014-02-06 16:16:28 +00:00
|
|
|
head "https://github.com/cask/cask.git"
|
|
|
|
|
2015-05-08 08:35:10 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha256 "68b9e9f496dabaf85bdbef1414679bb5cbd5531383db02ab625d7bab454b6a78" => :yosemite
|
|
|
|
sha256 "b8bb1e95119383cb7fa3e22eea1d73cafd77cadcc8fff32b22414115b24faabc" => :mavericks
|
|
|
|
sha256 "2a9c3376bc81daa443d7b9a10043e871f7439eb8d11ae2523b18ca0cf11e3832" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-05-08 07:52:53 +00:00
|
|
|
depends_on :emacs => "23"
|
2014-02-06 16:16:28 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
zsh_completion.install "etc/cask_completion.zsh"
|
|
|
|
bin.install "bin/cask"
|
|
|
|
prefix.install Dir["*.el"]
|
|
|
|
prefix.install "templates"
|
2014-04-01 12:36:31 +00:00
|
|
|
(share/"emacs/site-lisp").install_symlink "#{prefix}/cask-bootstrap.el"
|
|
|
|
(share/"emacs/site-lisp").install_symlink "#{prefix}/cask.el"
|
2014-02-06 16:16:28 +00:00
|
|
|
# Stop cask performing self-upgrades.
|
|
|
|
touch prefix/".no-upgrade"
|
|
|
|
end
|
2015-05-08 07:52:53 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.el").write <<-EOS.undent
|
|
|
|
(add-to-list 'load-path "#{share}/emacs/site-lisp")
|
|
|
|
(require 'cask)
|
|
|
|
(print (minibuffer-prompt-width))
|
|
|
|
EOS
|
|
|
|
assert_equal "0", shell_output("emacs -batch -l #{testpath}/test.el").strip
|
|
|
|
end
|
2014-02-06 16:16:28 +00:00
|
|
|
end
|