Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions Formula/m/mdfried.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
class Mdfried < Formula
desc "Terminal markdown viewer"
homepage "https://github.com/benjajaja/mdfried"
url "https://github.com/benjajaja/mdfried/archive/refs/tags/v0.18.2.tar.gz"
sha256 "af31a4ca3215a54ea826246cba8b2fbbb957164fd8ee7f8f253f751e98ff4ee9"
url "https://github.com/benjajaja/mdfried/archive/refs/tags/v0.18.3.tar.gz"
sha256 "c19f3e678b758b565c3931a1d6ab4860694cdc9c9bba36ecb580c16a35ab2a87"
license "GPL-3.0-or-later"
head "https://github.com/benjajaja/mdfried.git", branch: "master"

bottle do
sha256 cellar: :any, arm64_tahoe: "b6d09fb5125fa782f66c718951b90fcf2c94434890ce8224af43beb11d5681b8"
sha256 cellar: :any, arm64_sequoia: "90627161d40bfd25f87f879f3acebf8bb8d4b70d2b314ae42e54dcba4a9f013a"
sha256 cellar: :any, arm64_sonoma: "6b1eef3e88d8599874c733c9dfd8e40f64c3ba5113c7a0ca23dc0db1a8ed60ba"
sha256 cellar: :any, sonoma: "5d83fbfe0fe34114c38ff81823da7992ed95f52320445ba284aaf9e962fb0a09"
sha256 cellar: :any_skip_relocation, arm64_linux: "a7e967b34689d2124a2c2018dff36515f409b00cfe221694d4a2d64789f48bb8"
sha256 cellar: :any_skip_relocation, x86_64_linux: "db4b30df5c99b4929f2877ba2bb3c08ace94b6d136f81b29152ecb012e6325f0"
sha256 cellar: :any, arm64_tahoe: "b7e133ed074955a63c6a8798a61b9eddc29715a58bba8e5b4a7eaa36662c031f"
sha256 cellar: :any, arm64_sequoia: "2ccfdde9bd0df499826ceccf88b8f1fef19d35a918e941f3fd965678251bc4ee"
sha256 cellar: :any, arm64_sonoma: "b36d51ab316c9ecf3d6df02490e01c38dd045693f1f60e0efab37bff27d6e86d"
sha256 cellar: :any, sonoma: "01840cf4b5367b8c6b9fb8e1046870b3b8e81b661945b690b38a5c125bcb30a9"
sha256 cellar: :any_skip_relocation, arm64_linux: "6d1cda6d4d5f9682fcdca2160442f7758b0bc15da9c37826c3e2c7044dbd2b61"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7df0436b04a6afeefe201c9f4abf9a7ea56a4a6a6d90352328155eb34369b555"
end

depends_on "pkgconf" => :build
Expand All @@ -35,15 +35,17 @@ def install
# Hello World
MARKDOWN

cmd = "#{bin}/mdfried #{testpath}/test.md 2>&1"
output = if OS.mac?
shell_output(cmd)
output_log = testpath/"output.log"
pid = if OS.mac?
spawn bin/"mdfried", testpath/"test.md", [:out, :err] => output_log.to_s
else
require "pty"
r, _w, pid = PTY.spawn({ "FONTCONFIG_FILE" => "#{etc}/fonts/fonts.conf" }, cmd)
Process.wait(pid)
r.read_nonblock(1024)
PTY.spawn("#{bin}/mdfried #{testpath}/test.md", [:out, :err] => output_log.to_s).last
end
assert_match "cursor position could not be read", output
sleep 3
assert_match "Detecting supported graphics protocols...", output_log.read
ensure
Process.kill("TERM", pid)
Process.wait(pid)
end
end
Loading