homebrew-core/Formula/todoman.rb
2017-01-22 03:42:31 -08:00

79 lines
3.3 KiB
Ruby

class Todoman < Formula
include Language::Python::Virtualenv
desc "Simple CalDAV-based todo manager"
homepage "https://todoman.readthedocs.io/"
url "https://files.pythonhosted.org/packages/2f/06/a377b38dcd3cba5334f3e6444ab5a26a0d7b134a6d040ac46a16ed70568f/todoman-1.8.0.tar.gz"
sha256 "8ccd602da8b0870dab8273dd50631847b2b9ad7e902a8ec5bfe901e0ea6c72a2"
head "https://github.com/pimutils/todoman.git"
bottle do
sha256 "ec3463832a2f0e4fa1c78e091afd614a9d41f33e78e1eb387a9f15e15be3c1a2" => :sierra
sha256 "113aac5ad15ce47a8efe72010a301ddcf39ef328a2c0d456c1d0f03e57cab063" => :el_capitan
sha256 "e261c28da74f32c76b6bd7266653cae904f665f46c7620447c0a8b32a066568e" => :yosemite
end
depends_on :python3
resource "atomicwrites" do
url "https://files.pythonhosted.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz"
sha256 "240831ea22da9ab882b551b31d4225591e5e447a68c5e188db5b89ca1d487585"
end
resource "click" do
url "https://files.pythonhosted.org/packages/95/d9/c3336b6b5711c3ab9d1d3a80f1a3e2afeb9d8c02a7166462f6cc96570897/click-6.7.tar.gz"
sha256 "f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b"
end
resource "icalendar" do
url "https://files.pythonhosted.org/packages/e7/e7/71810ac9d3d5a062d3d7d16090ce2ea3e7877c2124afe23f9f7b8e2ffedd/icalendar-3.11.2.tar.gz"
sha256 "4f1df994cc0fe7ce63fec7adf1d9b3074b784faf3b1e702e7112cfb4b2f12c9f"
end
resource "parsedatetime" do
url "https://files.pythonhosted.org/packages/8b/20/37822d52be72c99cad913fad0b992d982928cac882efbbc491d4b9d216a9/parsedatetime-2.1.tar.gz"
sha256 "17c578775520c99131634e09cfca5a05ea9e1bd2a05cd06967ebece10df7af2d"
end
resource "python-dateutil" do
url "https://files.pythonhosted.org/packages/51/fc/39a3fbde6864942e8bb24c93663734b74e281b984d1b8c4f95d64b0c21f6/python-dateutil-2.6.0.tar.gz"
sha256 "62a2f8df3d66f878373fd0072eacf4ee52194ba302e00082828e0d263b0418d2"
end
resource "pytz" do
url "https://files.pythonhosted.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2"
sha256 "7016b2c4fa075c564b81c37a252a5fccf60d8964aa31b7f5eae59aeb594ae02b"
end
resource "pyxdg" do
url "https://files.pythonhosted.org/packages/26/28/ee953bd2c030ae5a9e9a0ff68e5912bd90ee50ae766871151cd2572ca570/pyxdg-0.25.tar.gz"
sha256 "81e883e0b9517d624e8b0499eb267b82a815c0b7146d5269f364988ae031279d"
end
resource "six" do
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
end
resource "urwid" do
url "https://files.pythonhosted.org/packages/85/5d/9317d75b7488c335b86bd9559ca03a2a023ed3413d0e8bfe18bea76f24be/urwid-1.3.1.tar.gz"
sha256 "cfcec03e36de25a1073e2e35c2c7b0cc6969b85745715c3a025a31d9786896a1"
end
def install
virtualenv_install_with_resources
end
test do
ENV["LC_ALL"] = "en_US.UTF-8"
(testpath/".config/todoman/todoman.conf").write <<-EOS.undent
[main]
path = #{testpath}/.calendar/*
date_format = %Y-%m-%d
default_list = Personal
EOS
(testpath/".calendar/Personal").mkpath
system "#{bin}/todo", "new", "newtodo"
assert_match "newtodo", shell_output("#{bin}/todo list")
end
end