style(xbar): fix rubocop linting complaints

This commit is contained in:
2025-08-24 17:21:52 +01:00
parent bf79e3aa4c
commit e47b73d645
3 changed files with 30 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
# frozen_string_literal: true
# <xbar.title>Brew Services</xbar.title>
# <xbar.version>v3.2.0</xbar.version>
# <xbar.version>v3.2.1</xbar.version>
# <xbar.author>Jim Myhrberg</xbar.author>
# <xbar.author.github>jimeh</xbar.author.github>
# <xbar.desc>List and manage Homebrew Services</xbar.desc>
@@ -14,7 +14,6 @@
# <xbar.var>string(VAR_BREW_PATH=""): Path to "brew" executable.</xbar.var>
# <xbar.var>string(VAR_HIDDEN_SERVICES=""): Comma-separated list of services to hide.</xbar.var>
# rubocop:disable Lint/ShadowingOuterLocalVariable
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/BlockLength
# rubocop:disable Metrics/ClassLength
@@ -35,11 +34,11 @@ module Xbar
module Helpers
def plugin_data_path
@plugin_data_path ||= (swiftbar_data_path || File.dirname(__FILE__))
@plugin_data_path ||= swiftbar_data_path || File.dirname(__FILE__)
end
def plugin_file_path
@plugin_file_path ||= (swiftbar_plugin_path || __FILE__)
@plugin_file_path ||= swiftbar_plugin_path || __FILE__
end
def plugin_filename
@@ -209,12 +208,12 @@ module Xbar
def plugin_refresh_uri
return @plugin_refresh_uri if @plugin_refresh_uri
if swiftbar?
@plugin_refresh_uri = "swiftbar://refreshplugin?name=#{plugin_name}"
else
@plugin_refresh_uri = 'xbar://app.xbarapp.com/refreshPlugin' \
"?path=#{plugin_filename}"
end
@plugin_refresh_uri = if swiftbar?
"swiftbar://refreshplugin?name=#{plugin_name}"
else
'xbar://app.xbarapp.com/refreshPlugin' \
"?path=#{plugin_filename}"
end
end
def normalize_props(props = {})
@@ -670,7 +669,7 @@ rescue StandardError => e
puts 'exit status 1'
puts '---'
puts 'Error:'
puts e.message.to_s
puts e.message
e.backtrace.each do |line|
puts "--#{line}"
end
@@ -684,4 +683,3 @@ end
# rubocop:enable Metrics/ClassLength
# rubocop:enable Metrics/BlockLength
# rubocop:enable Metrics/AbcSize
# rubocop:enable Lint/ShadowingOuterLocalVariable