Not sure there is really a gem that does it all, but Etc.getlogin and Socket.getshostname should work across platforms I think. I use this or variations of to get the os:
require 'rbconfig'
def os
@os ||= (
host_os = RbConfig::CONFIG['host_os']
case host_os
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
:windows
when /darwin|mac os/
:macosx
when /linux/
:linux
when /solaris|bsd/
:unix
else
raise "unknown os: #{host_os.inspect}"
end
)
end
which is ripped off from the selenium gem: https://code.google.com/p/selenium/source/browse/rb/lib/selenium/webdriver/common/platform.rb which might provide a bit more inspiration.