Module: Luban::Deployment::Parameters::General

Extended by:
Base
Included in:
Command, Runner, Worker::Base
Defined in:
lib/luban/deployment/parameters.rb

Constant Summary collapse

DefaultLubanRootPath =
Pathname.new('/opt/luban')

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Base

parameter

Class Method Details

.included(mod) ⇒ Object



27
28
29
# File 'lib/luban/deployment/parameters.rb', line 27

def self.included(mod)
  mod.extend(Base)
end

Instance Method Details

#current_uidObject



35
36
37
# File 'lib/luban/deployment/parameters.rb', line 35

def current_uid
  Etc.getpwnam(current_user).uid
end

#current_userObject



31
32
33
# File 'lib/luban/deployment/parameters.rb', line 31

def current_user
  ENV['USER'] || `whoami 2>/dev/null`.chomp
end