-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200738 from Homebrew/repren
repren 1.0.1 (new formula)
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2559,6 +2559,7 @@ remind | |
renovate | ||
repo | ||
reposurgeon | ||
repren | ||
reproc | ||
restic | ||
restview | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
class Repren < Formula | ||
include Language::Python::Virtualenv | ||
|
||
desc "Rename anything using powerful regex search and replace" | ||
homepage "https://github.com/jlevy/repren" | ||
url "https://files.pythonhosted.org/packages/83/2c/2086d6b7bc88fb115aa2dd00641a1ade8a22e4854e7f4d290133bfc6a6d1/repren-1.0.1.tar.gz" | ||
sha256 "6e5eeaa211154abed194eaa09a7ae8a5c760c0dfb103636542221089f4d335e1" | ||
license "MIT" | ||
|
||
bottle do | ||
sha256 cellar: :any_skip_relocation, all: "7e67e2a780fcea707e9f2c3e40dbe897c6ffb64580c065015701e1c891518ea8" | ||
end | ||
|
||
depends_on "[email protected]" | ||
|
||
def install | ||
virtualenv_install_with_resources | ||
end | ||
|
||
test do | ||
assert_match version.to_s, shell_output("#{bin}/repren --version") | ||
|
||
(testpath/"test.txt").write <<~EOS | ||
Hello World! | ||
Replace Me | ||
EOS | ||
|
||
system bin/"repren", "--from", "Replace", "--to", "Modify", testpath/"test.txt" | ||
assert_match "Modify Me", (testpath/"test.txt").read | ||
end | ||
end |