From 53ebef099defab4174ba486ec5dc0a7a51492eaa Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 16 Aug 2016 15:38:59 +0200 Subject: [PATCH] Use version conversions where possible. (#2460) --- Casks/adobe-reader-de.rb | 4 ++-- Casks/adobe-reader-fr.rb | 4 ++-- Casks/adobe-reader-ja.rb | 6 ++---- Casks/adobe-reader-pl.rb | 4 ++-- Casks/adobe-reader-pt-br.rb | 4 ++-- Casks/scansnap-manager-sv600.rb | 2 +- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Casks/adobe-reader-de.rb b/Casks/adobe-reader-de.rb index 5d4ef951b..2ce2b56e2 100644 --- a/Casks/adobe-reader-de.rb +++ b/Casks/adobe-reader-de.rb @@ -2,14 +2,14 @@ cask 'adobe-reader-de' do version '11.0.00' sha256 'fba620a52ab0073c53dca18dc29edeebfe3e534325b97bbcd2a318f3747b6a98' - url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/de_DE/AdbeRdr#{version.gsub('.', '')}_de_DE.dmg" + url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/de_DE/AdbeRdr#{version.no_dots}_de_DE.dmg" name 'Adobe Reader' homepage 'https://www.adobe.com/de/products/reader.html' license :unknown # TODO: change license and remove this comment; ':unknown' is a machine-generated placeholder pkg 'Adobe Reader XI Installer.pkg' - uninstall pkgutil: "com.adobe.acrobat.reader.#{version.gsub('.', '')}.*", + uninstall pkgutil: "com.adobe.acrobat.reader.#{version.no_dots}.*", delete: '/Applications/Adobe Reader.app' zap delete: [ diff --git a/Casks/adobe-reader-fr.rb b/Casks/adobe-reader-fr.rb index 9a0f787a8..33ebbf740 100644 --- a/Casks/adobe-reader-fr.rb +++ b/Casks/adobe-reader-fr.rb @@ -2,14 +2,14 @@ cask 'adobe-reader-fr' do version '11.0.00' sha256 '528b3fae5b712d3bb115c5ca47e507eaa2f34008b6c8a1aab542aac8770b7f77' - url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/fr_FR/AdbeRdr#{version.gsub('.', '')}_fr_FR.dmg" + url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/fr_FR/AdbeRdr#{version.no_dots}_fr_FR.dmg" name 'Adobe Reader' homepage 'https://www.adobe.com/fr/products/reader.html' license :unknown # TODO: change license and remove this comment; ':unknown' is a machine-generated placeholder pkg 'Adobe Reader XI Installer.pkg' - uninstall pkgutil: "com.adobe.acrobat.reader.#{version.gsub('.', '')}.*", + uninstall pkgutil: "com.adobe.acrobat.reader.#{version.no_dots}.*", delete: '/Applications/Adobe Reader.app' zap delete: [ diff --git a/Casks/adobe-reader-ja.rb b/Casks/adobe-reader-ja.rb index 324e665f4..57f3533a8 100644 --- a/Casks/adobe-reader-ja.rb +++ b/Casks/adobe-reader-ja.rb @@ -2,15 +2,13 @@ cask 'adobe-reader-ja' do version '11.0.00' sha256 '69f71085799700ecd7e7f59e14095eafc5889e8962ed3a2e84e0a40d3a04d570' - major_version = version.split('.')[0] - - url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{major_version}.x/#{version}/ja_JP/AdbeRdr#{version.gsub('.', '')}_ja_JP.dmg" + url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/ja_JP/AdbeRdr#{version.no_dots}_ja_JP.dmg" name 'Adobe Reader' homepage 'https://www.adobe.com/jp/products/reader.html' license :closed pkg 'Adobe Reader XI Installer.pkg' - uninstall pkgutil: "com.adobe.acrobat.reader.#{major_version}.*", + uninstall pkgutil: "com.adobe.acrobat.reader.#{version.major}.*", delete: '/Applications/Adobe Reader.app' end diff --git a/Casks/adobe-reader-pl.rb b/Casks/adobe-reader-pl.rb index 92f0d5926..f852c0aaf 100644 --- a/Casks/adobe-reader-pl.rb +++ b/Casks/adobe-reader-pl.rb @@ -2,14 +2,14 @@ cask 'adobe-reader-pl' do version '11.0.00' sha256 'cfeeef917cec3175ab7673c9afd9df081794d952c5e919e29a962df21e041b37' - url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/pl_PL/AdbeRdr#{version.gsub('.', '')}_pl_PL.dmg" + url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/pl_PL/AdbeRdr#{version.no_dots}_pl_PL.dmg" name 'Adobe Reader' homepage 'https://www.adobe.com/pl/products/reader.html' license :gratis pkg 'Adobe Reader XI Installer.pkg' - uninstall pkgutil: "com.adobe.acrobat.reader.#{version.gsub('.', '')}.*", + uninstall pkgutil: "com.adobe.acrobat.reader.#{version.no_dots}.*", delete: '/Applications/Adobe Reader.app' zap delete: [ diff --git a/Casks/adobe-reader-pt-br.rb b/Casks/adobe-reader-pt-br.rb index c4968c14d..6a36cf1af 100644 --- a/Casks/adobe-reader-pt-br.rb +++ b/Casks/adobe-reader-pt-br.rb @@ -2,14 +2,14 @@ cask 'adobe-reader-pt-br' do version '11.0.00' sha256 '432b83f2d895c42c496226214e5b700e1ee078bc03b4501500b9a783d63e4dad' - url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/pt_BR/AdbeRdr#{version.gsub('.', '')}_pt_BR.dmg" + url "http://ardownload.adobe.com/pub/adobe/reader/mac/#{version.major}.x/#{version}/pt_BR/AdbeRdr#{version.no_dots}_pt_BR.dmg" name 'Adobe Reader' homepage 'https://www.adobe.com/br/products/reader.html' license :gratis pkg 'Adobe Reader XI Installer.pkg' - uninstall pkgutil: "com.adobe.acrobat.reader.#{version.gsub('.', '')}.*", + uninstall pkgutil: "com.adobe.acrobat.reader.#{version.no_dots}.*", delete: '/Applications/Adobe Reader.app' zap delete: [ diff --git a/Casks/scansnap-manager-sv600.rb b/Casks/scansnap-manager-sv600.rb index 434527a31..82c3739cd 100644 --- a/Casks/scansnap-manager-sv600.rb +++ b/Casks/scansnap-manager-sv600.rb @@ -2,7 +2,7 @@ cask 'scansnap-manager-sv600' do version '6.2L10' sha256 '7273034398e9a57eb0fa89167c9e801ad2bf9fe56b52b3d9591628e978168afb' - url "https://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV#{version.gsub('.', '')}WW.dmg" + url "https://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV#{version.no_dots}WW.dmg" name 'ScanSnap Manager for Fujitsu ScanSnap SV600' homepage 'https://www.fujitsu.com/global/support/computing/peripheral/scanners/software/' license :gratis