Update audacity (v2.1.2)

Changed Audacity download URL.

Update audacity URL, now grabbed from an embeded iframe within the protected download URL

Update audacity with proper URL and no more style offenses

Update audacity and comments in code for future maintenance
This commit is contained in:
tobadia 2016-06-13 11:59:22 +02:00 committed by Claudia
parent cd7bd59723
commit 9edc5b792e
1 changed files with 14 additions and 3 deletions

View File

@ -1,9 +1,20 @@
# Audacity does not provide a fixed URL
# Their download URL points to a html page that generates a temporary URL embedded within an iframe
# 'open-uri' is required to open that page and grab the temporary URL
require 'open-uri'
cask 'audacity' do
version '2.1.2-1453294898'
version '2.1.2'
sha256 '2e4b7d608ecc0d2f79bf16663f085d383075e488f7d50bf7d74c0b69173defe7'
# oldfoss.com:81/download/Audacity was verified as official when first introduced to the cask
url "http://app.oldfoss.com:81/download/Audacity/audacity_macosx_ub_#{version.dots_to_underscores}.dmg"
# Current official URL as proposed on http://www.audacityteam.org/download/mac/
# must be parsed to extract temporary url embedded in iframe
iframe_src_protected_url = nil
open("http://www.fosshub.com/Audacity.html/audacity-macosx-ub-#{version}.dmg") do |io|
content = io.read
iframe_src_protected_url = %r{^\<iframe.*src=\"(http.*\.dmg)\".*>}.match(content)[1].to_s
end
url iframe_src_protected_url
name 'Audacity'
homepage 'http://audacityteam.org'
license :gpl