homebrew-core/Formula/mkdocs.rb
2017-10-31 02:34:03 -07:00

93 lines
3.8 KiB
Ruby

class Mkdocs < Formula
include Language::Python::Virtualenv
desc "Project documentation with Markdown"
homepage "http://www.mkdocs.org/"
url "https://github.com/mkdocs/mkdocs/archive/0.17.1.tar.gz"
sha256 "1a71e4d5be3da3285f8ce075efcc6fefc8881dece9b21d36aec45ec7a25927dc"
bottle do
cellar :any_skip_relocation
sha256 "cce6df16d9b8785e482c45ba161cc02e8eb87c55ea101aecda871f1ca87dec70" => :high_sierra
sha256 "95eeb56a7d582b317d7a65ae8ad4a2931f842859bab39cab41e1314ba6e5349e" => :sierra
sha256 "4a2379194baf44440ad9ccb8a061e6da7e45eacdbb515c64f8699f7232cf372c" => :el_capitan
end
depends_on :python if MacOS.version <= :snow_leopard
resource "backports_abc" do
url "https://files.pythonhosted.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-0.5.tar.gz"
sha256 "033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde"
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/20/d0/3f7a84b0c5b89e94abbd073a5f00c7176089f526edb056686751d5064cbd/certifi-2017.7.27.1.tar.gz"
sha256 "40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5"
end
resource "click" do
url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz"
sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b"
end
resource "Jinja2" do
url "https://files.pythonhosted.org/packages/90/61/f820ff0076a2599dd39406dcb858ecb239438c02ce706c8e91131ab9c7f1/Jinja2-2.9.6.tar.gz"
sha256 "ddaa01a212cd6d641401cb01b605f4a4d9f37bfc93043d7f760ec70fb99ff9ff"
end
resource "livereload" do
url "https://files.pythonhosted.org/packages/e9/2e/c4972828cf526a2e5f5571d647fb2740df68f17e8084a9a1092f4d209f4c/livereload-2.5.1.tar.gz"
sha256 "422de10d7ea9467a1ba27cbaffa84c74b809d96fb1598d9de4b9b676adf35e2c"
end
resource "Markdown" do
url "https://files.pythonhosted.org/packages/29/82/dfe242bcfd9eec0e7bf93a80a8f8d8515a95b980c44f5c0b45606397a423/Markdown-2.6.9.tar.gz"
sha256 "73af797238b95768b3a9b6fe6270e250e5c09d988b8e5b223fd5efa4e06faf81"
end
resource "MarkupSafe" do
url "https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz"
sha256 "a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665"
end
resource "PyYAML" do
url "https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz"
sha256 "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
end
resource "singledispatch" do
url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz"
sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c"
end
resource "six" do
url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
end
resource "tornado" do
url "https://files.pythonhosted.org/packages/fa/14/52e2072197dd0e63589e875ebf5984c91a027121262aa08f71a49b958359/tornado-4.5.2.tar.gz"
sha256 "1fb8e494cd46c674d86fac5885a3ff87b0e283937a47d74eb3c02a48c9e89ad0"
end
def install
virtualenv_install_with_resources
end
test do
# build a very simple site that uses the "readthedocs" theme.
(testpath/"mkdocs.yml").write <<~EOS
site_name: MkLorum
pages:
- Home: index.md
theme: readthedocs
EOS
mkdir testpath/"docs"
(testpath/"docs/index.md").write <<~EOS
# A heading
And some deeply meaningful prose.
EOS
system "#{bin}/mkdocs", "build", "--clean"
end
end