Skip to content

Commit

Permalink
svgcleaner 0.7.0 (new formula)
Browse files Browse the repository at this point in the history
Closes #5880.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
carlorosati authored and MikeMcQuaid committed Oct 15, 2016
1 parent 21731ce commit fa65206
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Formula/svgcleaner.rb
@@ -0,0 +1,33 @@
class Svgcleaner < Formula
desc "Cleans your SVG files by removing unnecessary data."
homepage "https://github.com/RazrFalcon/svgcleaner"
url "https://github.com/RazrFalcon/svgcleaner/archive/v0.7.0.tar.gz"
sha256 "c0a2cc56c77486700c7229538d30e77b55fc9713e5f2e8660fea86053a7789c9"
head "https://github.com/RazrFalcon/svgcleaner.git"

depends_on "rust" => :build

def install
system "cargo", "build", "--release"
bin.install "target/release/svgcleaner"
end

test do
(testpath/"in.svg").write <<-EOS.undent
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="150"
height="150">
<rect
width="90"
height="90"
x="30"
y="30"
style="fill:#0000ff;fill-opacity:0.75;stroke:#000000"/>
</svg>
EOS
system "#{bin}/svgcleaner", "in.svg", "out.svg"
end
end

0 comments on commit fa65206

Please sign in to comment.