mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-13 04:22:35 +00:00
Added .rubocop.yml, sync.
This commit is contained in:
8
.rubocop.yml
Normal file
8
.rubocop.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
Style/StringLiterals:
|
||||
EnforcedStyle: double_quotes
|
||||
|
||||
Metrics/MethodLength:
|
||||
Max: 40
|
||||
|
||||
Style/EmptyMethod:
|
||||
EnforcedStyle: expanded
|
||||
@@ -6,9 +6,9 @@ module TAC
|
||||
@titlebar.style.background = [ Palette::TACNET_PRIMARY, Palette::TACNET_SECONDARY ]
|
||||
|
||||
background Gosu::Color::GRAY
|
||||
label @options[:message]
|
||||
label @options[:message], width: 1.0
|
||||
|
||||
@sound = Gosu::Sample.new(TAC::ROOT_PATH + "/media/error_alarm.ogg").play(1, 1, true)
|
||||
@sound = Gosu::Sample.new("#{TAC::ROOT_PATH}/media/error_alarm.ogg").play(1, 1, true)
|
||||
|
||||
button "Close", width: 1.0, margin_top: THEME_DIALOG_BUTTON_PADDING do
|
||||
close
|
||||
|
||||
@@ -40,7 +40,7 @@ class NewEditor < CyberarmEngine::GuiState
|
||||
end
|
||||
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/larger.png"), tip: "Maximize", image_height: 1.0 do |btn|
|
||||
window.maximize
|
||||
window.maximize if window.respond_to?(:maximize)
|
||||
end
|
||||
|
||||
button get_image("#{TAC::ROOT_PATH}/media/icons/cross.png"), tip: "Exit", image_height: 1.0, **TAC::THEME_DANGER_BUTTON do
|
||||
|
||||
@@ -41,15 +41,15 @@ module TAC
|
||||
net_stats += "<b>Data Received:</b> #{client.data_received} bytes\n"
|
||||
|
||||
"<b>Status:</b> #{_status}\n\n#{net_stats}"
|
||||
elsif @connection && @connection.client && @connection.client.socket_error?
|
||||
"<b>Status:</b> #{_status}\n\n#{@connection.client.last_socket_error.to_s.chars.each_slice(80).to_a.map { |c| c.join }.join("\n")}"
|
||||
elsif @connection&.client && @connection.client.socket_error?
|
||||
"<b>Status:</b> #{_status}\n\n#{@connection.client.last_socket_error.to_s}"
|
||||
else
|
||||
"<b>Status:</b> #{_status}"
|
||||
end
|
||||
end
|
||||
|
||||
def connected?
|
||||
@connection && @connection.connected?
|
||||
@connection&.connected?
|
||||
end
|
||||
|
||||
def close
|
||||
|
||||
Reference in New Issue
Block a user