1 cask "wljs-notebook" do
2 arch arm: "arm64", intel: "x64"
5 sha256 arm: "c95b6c456aa2a08a0d9f0a31cbb74e85a3a7b3c99da8a65cf5125bf01e5ede56",
6 intel: "e7b952b6e3b7a7cc19d22939578e5be385314e8c836ec9bc395cea74ae2167f7"
8 url "https://github.com/JerryI/wolfram-js-frontend/releases/download/#{version.csv.second || version.csv.first}/wljs-notebook-#{version.csv.first}-#{arch}-macos.dmg",
9 verified: "github.com/JerryI/wolfram-js-frontend/"
11 desc "Javascript frontend for Wolfram Engine"
12 homepage "https://jerryi.github.io/wljs-docs/"
14 # The upstream release tag can sometimes differ from the version in the
15 # filename (e.g. 2.5.6FIX vs. 2.5.6), so we include the tag in the cask
16 # `version` when this happens.
19 regex(/wljs[._-]notebook[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}(?:[._-]macos)?\.dmg/i)
20 strategy :github_releases do |json, regex|
22 next if release["draft"] || release["prerelease"]
24 tag = release["tag_name"]
25 tag_version = tag[/^v?(\d+(?:\.\d+)+.*)$/i, 1]
26 next if tag_version.blank?
28 release["assets"]&.map do |asset|
29 match = asset["name"]&.match(regex)
32 (match[1] == tag_version) ? tag_version : "#{match[1]},#{tag}"
39 depends_on macos: ">= :catalina"
41 app "WLJS Notebook.app"
44 "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/wljs-notebook.sfl*",
45 "~/Library/Application Support/wljs-notebook",
46 "~/Library/Preferences/wljs-notebook.plist",
47 "~/Library/Saved Application State/wljs-notebook.savedState",