mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-15 13:32:33 +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 ]
|
@titlebar.style.background = [ Palette::TACNET_PRIMARY, Palette::TACNET_SECONDARY ]
|
||||||
|
|
||||||
background Gosu::Color::GRAY
|
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
|
button "Close", width: 1.0, margin_top: THEME_DIALOG_BUTTON_PADDING do
|
||||||
close
|
close
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class NewEditor < CyberarmEngine::GuiState
|
|||||||
end
|
end
|
||||||
|
|
||||||
button get_image("#{TAC::ROOT_PATH}/media/icons/larger.png"), tip: "Maximize", image_height: 1.0 do |btn|
|
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
|
end
|
||||||
|
|
||||||
button get_image("#{TAC::ROOT_PATH}/media/icons/cross.png"), tip: "Exit", image_height: 1.0, **TAC::THEME_DANGER_BUTTON do
|
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"
|
net_stats += "<b>Data Received:</b> #{client.data_received} bytes\n"
|
||||||
|
|
||||||
"<b>Status:</b> #{_status}\n\n#{net_stats}"
|
"<b>Status:</b> #{_status}\n\n#{net_stats}"
|
||||||
elsif @connection && @connection.client && @connection.client.socket_error?
|
elsif @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")}"
|
"<b>Status:</b> #{_status}\n\n#{@connection.client.last_socket_error.to_s}"
|
||||||
else
|
else
|
||||||
"<b>Status:</b> #{_status}"
|
"<b>Status:</b> #{_status}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def connected?
|
def connected?
|
||||||
@connection && @connection.connected?
|
@connection&.connected?
|
||||||
end
|
end
|
||||||
|
|
||||||
def close
|
def close
|
||||||
|
|||||||
Reference in New Issue
Block a user