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.6.tar.gz"
sha256 "4dd70e3a82b0c4c377a7454b7edd99daa1180ca5562c642f1899175e6c6a6695"
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: "483ef3790b36a39982373fe9ccb4ab3285d3e198c6f272ec7b56faa72883ae66"
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