From 482a881d0569ada09bd49e2718bd013ddb04c9b4 Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Sat, 7 Jan 2023 18:35:04 -0800 Subject: [PATCH] podsync 2.5.0 (new formula) Closes #120052. Signed-off-by: Dawid Dziurla <9713907+dawidd6@users.noreply.github.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/podsync.rb | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Formula/podsync.rb diff --git a/Formula/podsync.rb b/Formula/podsync.rb new file mode 100644 index 00000000000..98aef1c92e4 --- /dev/null +++ b/Formula/podsync.rb @@ -0,0 +1,47 @@ +class Podsync < Formula + desc "Turn YouTube or Vimeo channels, users, or playlists into podcast feeds" + homepage "https://github.com/mxpv/podsync" + url "https://github.com/mxpv/podsync/archive/refs/tags/v2.5.0.tar.gz" + sha256 "45c3afea38ef45f665f456bc542ac57fecdafed884181156df6b44624b66d6b8" + license "MIT" + head "https://github.com/mxpv/podsync.git", branch: "main" + + depends_on "go" => :build + depends_on "ffmpeg" + depends_on "youtube-dl" + + def install + system "make", "build" + bin.install "bin/podsync" + end + + test do + port = free_port + + (testpath/"config.toml").write <<~EOS + [server] + port = #{port} + + [log] + filename = "podsync.log" + + [storage] + [storage.local] + data_dir = "data/podsync/" + + [feeds] + [feeds.ID1] + url = "https://www.youtube.com/channel/UCxC5Ls6DwqV0e-CYcAKkExQ" + EOS + + pid = fork do + exec bin/"podsync" + end + sleep 1 + + Process.kill("SIGINT", pid) + Process.wait(pid) + + assert_predicate testpath/"podsync.log", :exist? + end +end