Module: Diffend::LocalContext::Host
- Defined in:
- lib/diffend/local_context/host.rb
Overview
Module responsible for building host information from local context
Class Method Summary collapse
-
.call ⇒ Hash
Build host information.
Class Method Details
.call ⇒ Hash
Build host information
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/diffend/local_context/host.rb', line 19 def call uname = Etc.uname { 'command' => command, 'name' => uname[:nodename], 'system' => { 'machine' => uname[:machine], 'name' => uname[:sysname], 'release' => uname[:release], 'version' => uname[:version] }, 'tags' => , 'user' => Etc.getpwuid(Process.uid)&.name || ENV['USERNAME'], 'pid' => Process.pid }.freeze end |