Casks/r/rstudio.rb
cask "rstudio" do
version "2024.04.2,764"
sha256 "d0ddd3958d036b1d09436d70743a11d9e746c934a30fd89a395d58d0925d023d"
url "https://download1.rstudio.org/electron/macos/RStudio-#{version.csv.first}-#{version.csv.second}.dmg",
verified: "download1.rstudio.org/electron/macos/"
name "RStudio"
desc "Data science software focusing on R and Python"
homepage "https://posit.co/products/open-source/rstudio/"
livecheck do
url "https://posit.co/download/rstudio-desktop/"
strategy :page_match do |page|
match = page.match(/RStudio[._-]v?(\d+(?:\.\d+)+)[._-](\d+)\.dmg/i)
next if match.blank?
"#{match[1]},#{match[2]}"
end
end
conflicts_with cask: "rstudio@daily"
depends_on macos: ">= :monterey"
app "RStudio.app"
zap trash: "~/.rstudio-desktop"
caveats <<~EOS
#{token} depends on R. The R Project provides official binaries:
brew install --cask r
Alternatively, the Homebrew-compiled version of R omits the GUI app:
brew install r
EOS
end