56 lines
2 KiB
Ruby
56 lines
2 KiB
Ruby
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 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "7a0b31108c3a7efe0f8662168d178869e2b4e5f0bfe4913c04d8b9f04558b258" => :mojave
|
|
sha256 "ce898fdfe7beabeaaaad38459168d3de64ccaca1980bd37936e354efdd24e02c" => :high_sierra
|
|
sha256 "14a0226d77bdadcdfb8b39166e697b4647a43ba819893ceb0cb590e3b405626a" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "graphviz"
|
|
depends_on "openssl@1.1"
|
|
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
|