From 16b3bab91ab5b9a69ef7c456441b0e0fced56516 Mon Sep 17 00:00:00 2001 From: Joe Wicentowski Date: Thu, 29 Dec 2016 05:37:01 -0600 Subject: [PATCH] Add eXist-db.app 3.0 (nightly build) (#3067) * Add eXist-db.app 3.0 (nightly build) * Remove nokogiri dependency as instructed - Replaced nokogiri with io.read.scan as proposed by @claui. - Addressed all brew cask style concerns - Tested the resulting script and confirmed that it successfully grabbed the latest nightly --- Casks/exist-db-nightly.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Casks/exist-db-nightly.rb diff --git a/Casks/exist-db-nightly.rb b/Casks/exist-db-nightly.rb new file mode 100644 index 000000000..9aa01b6dd --- /dev/null +++ b/Casks/exist-db-nightly.rb @@ -0,0 +1,19 @@ +cask 'exist-db-nightly' do + version :latest + sha256 :no_check + + # static.adamretter.org.uk/exist-nightly was verified as official when first introduced to the cask + url do + require 'open-uri' + base_url = 'http://static.adamretter.org.uk/exist-nightly' + builds_url = "#{base_url}/table.html" + latest_build_filename = open(builds_url) do |io| + io.read.scan(%r{.*?(.*?).*?dmg}m).max[1] + end + "#{base_url}/#{latest_build_filename}" + end + name 'eXist-db' + homepage 'http://exist-db.org/exist/apps/homepage/index.html' + + app 'eXist-db.app' +end