class Eralchemy < Formula include Language::Python::Virtualenv desc "Simple entity relation (ER) diagrams generation" homepage "https://github.com/Alexis-benoist/eralchemy" url "https://files.pythonhosted.org/packages/87/40/07b58c29406ad9cc8747e567e3e37dd74c0a8756130ad8fd3a4d71c796e3/ERAlchemy-1.2.10.tar.gz" sha256 "be992624878278195c3240b90523acb35d97453f1a350c44b4311d4333940f0d" revision 1 bottle do cellar :any sha256 "320e7effb4ad462af7bf6a0e2d64268a0b4b70fde13a790acba135f9c5d84cb6" => :mojave sha256 "621719b08e3abedd44a67d7b95b3ea4bab6640d5fb0ca8c00cf6df0cf3e09d39" => :high_sierra sha256 "fa18d8b468d21350b688e44afd453a0af15d62eeb763009ea31c0b0473ac75e8" => :sierra end depends_on "pkg-config" => :build depends_on "graphviz" depends_on "openssl" depends_on "python" resource "pygraphviz" do url "https://files.pythonhosted.org/packages/98/bb/a32e33f7665b921c926209305dde66fe41003a4ad934b10efb7c1211a419/pygraphviz-1.3.1.tar.gz" sha256 "7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408" end resource "SQLAlchemy" do url "https://files.pythonhosted.org/packages/f3/b7/d8725042f105cc6b71c7bae0ffd46e49f762e5a08f421f1eddd855a1f723/SQLAlchemy-1.2.4.tar.gz" sha256 "6997507af46b10630e13b605ac278b78885fd683d038896dbee0e7ec41d809d2" end resource "er_example" do url "https://raw.githubusercontent.com/Alexis-benoist/eralchemy/v1.1.0/example/newsmeme.er" sha256 "5c475bacd91a63490e1cbbd1741dc70a3435e98161b5b9458d195ee97f40a3fa" end def install venv = virtualenv_create(libexec, "python3") res = resources.map(&:name).to_set - ["er_example"] res.each do |r| venv.pip_install resource(r) end venv.pip_install_and_link buildpath end test do system "#{bin}/eralchemy", "-v" resource("er_example").stage do system "#{bin}/eralchemy", "-i", "newsmeme.er", "-o", "test_eralchemy.pdf" assert_predicate Pathname.pwd/"test_eralchemy.pdf", :exist? end end end