Skip to content

Commit

Permalink
Merge pull request #162649 from Bo98/style-dec2023
Browse files Browse the repository at this point in the history
Fix various style issues under newer RuboCop
  • Loading branch information
Bo98 authored Dec 15, 2023
2 parents a64f34d + db4bc36 commit b59a487
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion Casks/b/blurscreen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion Casks/e/ealeksandrov-cd-to.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion Casks/g/gamemaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion Casks/p/pock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
2 changes: 1 addition & 1 deletion Casks/s/sqlight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion Casks/t/teamviewer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
1 change: 0 additions & 1 deletion Casks/t/trader-workstation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Casks/v/virtual-desktop-streamer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
1 change: 0 additions & 1 deletion Casks/z/zoom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
6 changes: 3 additions & 3 deletions developer/bin/generate_cask_token
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b59a487

Please sign in to comment.