Added git information

This commit is contained in:
alexey
2025-02-20 00:15:26 +03:00
parent 982ea3322c
commit 895fb918b5
10 changed files with 349 additions and 15 deletions

10
classes/systeminfo.rb Normal file
View File

@@ -0,0 +1,10 @@
require "socket"
require "etc"
def systeminfo_get_ip
Socket.ip_address_list.find { |ai| ai.ipv4? && !ai.ipv4_loopback? }.ip_address
end
def systeminfo_get_username
Etc.getpwuid(Process.uid).name
end