Skip to content

Commit

Permalink
Merge pull request #200738 from Homebrew/repren
Browse files Browse the repository at this point in the history
repren 1.0.1 (new formula)
  • Loading branch information
BrewTestBot authored Dec 11, 2024
2 parents 786e628 + 4f0530e commit e4145b3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,7 @@ remind
renovate
repo
reposurgeon
repren
reproc
restic
restview
Expand Down
31 changes: 31 additions & 0 deletions Formula/r/repren.rb
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

0 comments on commit e4145b3

Please sign in to comment.