From a2a64a50eff2b69571d1052b64be872ce46f3804 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 10 Dec 2024 18:55:09 -0500 Subject: [PATCH 1/2] repren 1.0.1 (new formula) Signed-off-by: Rui Chen --- .github/autobump.txt | 1 + Formula/r/repren.rb | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Formula/r/repren.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index f6ea7de8643c9..1785b613a6ec9 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -2557,6 +2557,7 @@ remind renovate repo reposurgeon +repren reproc restic restview diff --git a/Formula/r/repren.rb b/Formula/r/repren.rb new file mode 100644 index 0000000000000..5023ef928b306 --- /dev/null +++ b/Formula/r/repren.rb @@ -0,0 +1,27 @@ +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" + + depends_on "python@3.13" + + 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 From 4f0530e95c3a3d934f65d2752f474fa6619ea27e Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 11 Dec 2024 13:49:01 +0000 Subject: [PATCH 2/2] repren: add 1.0.1 bottle. --- Formula/r/repren.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Formula/r/repren.rb b/Formula/r/repren.rb index 5023ef928b306..4ba2c04b21da0 100644 --- a/Formula/r/repren.rb +++ b/Formula/r/repren.rb @@ -7,6 +7,10 @@ class Repren < Formula sha256 "6e5eeaa211154abed194eaa09a7ae8a5c760c0dfb103636542221089f4d335e1" license "MIT" + bottle do + sha256 cellar: :any_skip_relocation, all: "7e67e2a780fcea707e9f2c3e40dbe897c6ffb64580c065015701e1c891518ea8" + end + depends_on "python@3.13" def install