diff --git a/Casks/b/blurscreen.rb b/Casks/b/blurscreen.rb index 812bdb0cf937..40c085ae8773 100644 --- a/Casks/b/blurscreen.rb +++ b/Casks/b/blurscreen.rb @@ -25,7 +25,6 @@ ohai "The BlurScreen package postinstall script launches the BlurScreen app" if retries >= 3 ohai "Attempting to close BlurScreen.app to avoid unwanted user intervention" if retries >= 3 return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/BlurScreen.app"] - rescue RuntimeError sleep 1 retry unless (retries -= 1).zero? diff --git a/Casks/e/ealeksandrov-cd-to.rb b/Casks/e/ealeksandrov-cd-to.rb index 1f3de9840a35..d9208c731c8c 100644 --- a/Casks/e/ealeksandrov-cd-to.rb +++ b/Casks/e/ealeksandrov-cd-to.rb @@ -11,7 +11,7 @@ url :url regex(/^v?(\d+(?:[._]\d+)+)$/i) strategy :git do |tags, regex| - tags.map { |tag| tag[regex, 1]&.gsub("_", ".") }.compact + tags.map { |tag| tag[regex, 1]&.tr("_", ".") }.compact end end diff --git a/Casks/g/gamemaker.rb b/Casks/g/gamemaker.rb index 490c997bf0dc..053724d8872f 100644 --- a/Casks/g/gamemaker.rb +++ b/Casks/g/gamemaker.rb @@ -23,7 +23,6 @@ ohai "The GameMaker package postinstall script launches the GameMaker app" if retries >= 3 ohai "Attempting to close com.yoyogames.gms2 to avoid unwanted user intervention" if retries >= 3 return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/GameMaker.app"] - rescue RuntimeError sleep 1 retry unless (retries -= 1).zero? diff --git a/Casks/p/pock.rb b/Casks/p/pock.rb index 59866fa1f420..e10b49db78f3 100644 --- a/Casks/p/pock.rb +++ b/Casks/p/pock.rb @@ -2,7 +2,7 @@ version "0.9.0-22" sha256 "c190b719a4ecd98680fcea6a8095432012a2b9e0067adac9d4e7b2c92dc8ca6b" - url "https://pock.app/builds/pock_#{version.dots_to_underscores.gsub(/-/, "__")}.zip" + url "https://pock.app/builds/pock_#{version.dots_to_underscores.gsub("-", "__")}.zip" name "Pock" desc "Utility to display the Dock in the Touch Bar" homepage "https://pock.app/" diff --git a/Casks/s/sqlight.rb b/Casks/s/sqlight.rb index 4a95222b5233..694ea92bd12f 100644 --- a/Casks/s/sqlight.rb +++ b/Casks/s/sqlight.rb @@ -21,7 +21,7 @@ js_file_data = Homebrew::Livecheck::Strategy.page_content("https://www.aurvan.com/#{js_file}") next [] if js_file_data[:content].blank? - js_file_data[:content].scan(regex).map { |match| match&.first&.gsub("_", ".") } + js_file_data[:content].scan(regex).map { |match| match&.first&.tr("_", ".") } end end diff --git a/Casks/t/teamviewer.rb b/Casks/t/teamviewer.rb index 672e038f81c9..8c54eac00707 100644 --- a/Casks/t/teamviewer.rb +++ b/Casks/t/teamviewer.rb @@ -68,7 +68,6 @@ ohai "The TeamViewer package postinstall script launches the TeamViewer app" if retries >= 3 ohai "Attempting to close the TeamViewer app to avoid unwanted user intervention" if retries >= 3 return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/TeamViewer.app"] - rescue RuntimeError sleep 1 retry unless (retries -= 1).zero? diff --git a/Casks/t/trader-workstation.rb b/Casks/t/trader-workstation.rb index acd7a63853f6..604330085128 100644 --- a/Casks/t/trader-workstation.rb +++ b/Casks/t/trader-workstation.rb @@ -23,7 +23,6 @@ uninstall_preflight do ohai "Stopping all running instances of Trader Workstation prior to uninstall" system_command "/usr/bin/pkill", args: ["-f", "/Applications/Trader Workstation/Trader Workstation.app"] - rescue RuntimeError ohai "No running instances of Trader Workstation found" end diff --git a/Casks/v/virtual-desktop-streamer.rb b/Casks/v/virtual-desktop-streamer.rb index 7ce188c65743..28bc425c1f76 100644 --- a/Casks/v/virtual-desktop-streamer.rb +++ b/Casks/v/virtual-desktop-streamer.rb @@ -21,7 +21,6 @@ ohai "The Virtual Desktop package postinstall script launches the Streamer app" if retries >= 3 ohai "Attempting to close the Streamer app to avoid unwanted user intervention" if retries >= 3 return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/Virtual Desktop Streamer.app"] - rescue RuntimeError sleep 1 retry unless (retries -= 1).zero? diff --git a/Casks/z/zoom.rb b/Casks/z/zoom.rb index b12e78b0ba99..c2f9f9b302a5 100644 --- a/Casks/z/zoom.rb +++ b/Casks/z/zoom.rb @@ -29,7 +29,6 @@ ohai "The Zoom package postinstall script launches the Zoom app" if retries >= 3 ohai "Attempting to close zoom.us.app to avoid unwanted user intervention" if retries >= 3 return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/zoom.us.app"] - rescue RuntimeError sleep 1 retry unless (retries -= 1).zero? diff --git a/developer/bin/generate_cask_token b/developer/bin/generate_cask_token index edac84878249..1e6715f2c67c 100755 --- a/developer/bin/generate_cask_token +++ b/developer/bin/generate_cask_token @@ -130,15 +130,15 @@ class AppName end def self.remove_trailing_pat - @@remove_trailing_pat ||= /(?<=.)(?:#{REMOVE_TRAILING_PATS.join('|')})\Z/i # rubocop:disable Style/ClassVars + @@remove_trailing_pat ||= /(?<=.)(?:#{REMOVE_TRAILING_PATS.join("|")})\Z/i # rubocop:disable Style/ClassVars end def self.preserve_trailing_pat - @@preserve_trailing_pat ||= /(?:#{PRESERVE_TRAILING_PATS.join('|')})\Z/i # rubocop:disable Style/ClassVars + @@preserve_trailing_pat ||= /(?:#{PRESERVE_TRAILING_PATS.join("|")})\Z/i # rubocop:disable Style/ClassVars end def self.after_interior_version_pat - @@after_interior_version_pat ||= /(?:#{AFTER_INTERIOR_VERSION_PATS.join('|')})/i # rubocop:disable Style/ClassVars + @@after_interior_version_pat ||= /(?:#{AFTER_INTERIOR_VERSION_PATS.join("|")})/i # rubocop:disable Style/ClassVars end def english_from_app_bundle