homebrew-core/Formula/django-completion.rb

27 lines
791 B
Ruby

class DjangoCompletion < Formula
desc "Bash completion for Django"
homepage "https://www.djangoproject.com/"
url "https://github.com/django/django/archive/4.1.4.tar.gz"
sha256 "412554a01d16e77f699d18e30d1efd3cec6d986c9730fb6f152b8a0beb65425e"
license "BSD-3-Clause"
head "https://github.com/django/django.git", branch: "main"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "74fdbf3b4112a124da9872621e1b06e120ecc82377fb7a4d1d755eeb5a7ee4a8"
end
def install
bash_completion.install "extras/django_bash_completion" => "django"
end
test do
assert_match "-F _django_completion",
shell_output("bash -c 'source #{bash_completion}/django && complete -p django-admin'")
end
end