imessage-exporter icon indicating copy to clipboard operation
imessage-exporter copied to clipboard

Release to Brew

Open ReagentX opened this issue 1 year ago • 3 comments

imessage-exporter.rb:

class ImessageExporter < Formula
  desc "Export MacOS iMessage data + run iMessage Diagnostics"
  homepage "https://github.com/ReagentX/imessage-exporter"
  url "https://github.com/ReagentX/imessage-exporter/archive/refs/tags/0.1.9.tar.gz"
  sha256 "033789e51e3621a74b19e4a5339f0e0b65c2d33b8c3e367a5f7fbd1cdfa642e7"
  license "GPL-3.0-or-later"

  depends_on "rust" => :build

  def install
    system "cargo", "install", *std_cargo_args(path: "imessage-exporter")
  end

  test do
    assert_equal "imessage is not a valid export type! Must be one of <txt, html>\n",
    shell_output("imessage-exporter -f imessage")
    assert_equal "Diagnostics are enabled; format is disallowed\n",
    shell_output("imessage-exporter -f txt -d")
    assert_equal "No export type selected, required by no-copy\n",
    shell_output("imessage-exporter -n")
    assert_equal "No export type selected, required by export-path\n",
    shell_output("imessage-exporter -o imessage")
    assert_equal "",
    shell_output("imessage-exporter -p imessage")
  end
end

ReagentX avatar Oct 19 '22 22:10 ReagentX