2019-07-19 11:37:48 +00:00
|
|
|
class Fastmod < Formula
|
|
|
|
desc "Fast partial replacement for the codemod tool"
|
|
|
|
homepage "https://github.com/facebookincubator/fastmod"
|
|
|
|
url "https://github.com/facebookincubator/fastmod/archive/v0.2.6.tar.gz"
|
|
|
|
sha256 "b70f615e883cc6cc235b62ee15ec2ec7ef4b04618b42fb79d8ee807440f6cf3c"
|
|
|
|
|
2019-09-14 15:07:52 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2019-11-03 03:59:17 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "b8796ef40402ee2f3f1663186cf0c72a0b46e7870bdc38ed36b42797b1d8903e" => :catalina
|
|
|
|
sha256 "3e63d95fed7192044cb1140179d6b0565f69c7187e82efb541b157c91cd27186" => :mojave
|
|
|
|
sha256 "8047f087b7034a595a66daa17b6d5e7fb381ce8a50fe443747f5ce42714b323f" => :high_sierra
|
2019-09-14 15:07:52 +00:00
|
|
|
end
|
|
|
|
|
2019-07-19 11:37:48 +00:00
|
|
|
depends_on "rust" => :build
|
|
|
|
|
|
|
|
def install
|
2019-11-03 01:59:56 +00:00
|
|
|
system "cargo", "install", "--locked", "--root", prefix, "--path", "."
|
2019-07-19 11:37:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"input.txt").write("Hello, World!")
|
|
|
|
system bin/"fastmod", "-d", testpath, "--accept-all", "World", "fastmod"
|
|
|
|
assert_equal "Hello, fastmod!", (testpath/"input.txt").read
|
|
|
|
end
|
|
|
|
end
|