mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 09:06:44 +00:00
style(xbar): fix rubocop linting complaints
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# rubocop:disable Layout/LineLength
|
||||
|
||||
# <xbar.title>Brew Updates</xbar.title>
|
||||
# <xbar.version>v2.7.0</xbar.version>
|
||||
# <xbar.version>v2.7.1</xbar.version>
|
||||
# <xbar.author>Jim Myhrberg</xbar.author>
|
||||
# <xbar.author.github>jimeh</xbar.author.github>
|
||||
# <xbar.desc>List and manage outdated Homebrew formulas and casks</xbar.desc>
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
# rubocop:enable Layout/LineLength
|
||||
|
||||
# rubocop:disable Lint/ShadowingOuterLocalVariable
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
# rubocop:disable Metrics/BlockLength
|
||||
# rubocop:disable Metrics/ClassLength
|
||||
@@ -42,11 +41,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
|
||||
@@ -216,12 +215,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 = {})
|
||||
@@ -743,7 +742,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
|
||||
@@ -757,4 +756,3 @@ end
|
||||
# rubocop:enable Metrics/ClassLength
|
||||
# rubocop:enable Metrics/BlockLength
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
# rubocop:enable Lint/ShadowingOuterLocalVariable
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# rubocop:disable Layout/LineLength
|
||||
|
||||
# <xbar.title>Mise Updates</xbar.title>
|
||||
# <xbar.version>v0.3.0</xbar.version>
|
||||
# <xbar.version>v0.3.1</xbar.version>
|
||||
# <xbar.author>Jim Myhrberg</xbar.author>
|
||||
# <xbar.author.github>jimeh</xbar.author.github>
|
||||
# <xbar.desc>List and manage outdated tools installed with mise</xbar.desc>
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
# rubocop:enable Layout/LineLength
|
||||
|
||||
# rubocop:disable Lint/ShadowingOuterLocalVariable
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
# rubocop:disable Metrics/BlockLength
|
||||
# rubocop:disable Metrics/ClassLength
|
||||
@@ -38,11 +37,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
|
||||
@@ -212,12 +211,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 = {})
|
||||
@@ -708,7 +707,7 @@ module Mise
|
||||
dotted = version_str.to_s[/\A\d+(?:\.\d+)*/]
|
||||
return [] if dotted.nil? || dotted.empty?
|
||||
|
||||
dotted.split('.').map { |s| s.to_i }
|
||||
dotted.split('.').map(&:to_i)
|
||||
end
|
||||
|
||||
def version_greater?(a_str, b_str)
|
||||
@@ -1005,4 +1004,3 @@ end
|
||||
# rubocop:enable Metrics/ClassLength
|
||||
# rubocop:enable Metrics/BlockLength
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
# rubocop:enable Lint/ShadowingOuterLocalVariable
|
||||
|
||||
Reference in New Issue
Block a user