Module: Freyr
- Extended by:
- Freyr
- Included in:
- Freyr
- Defined in:
- lib/freyr.rb,
lib/freyr/cli.rb,
lib/freyr/rvm.rb,
lib/freyr/pinger.rb,
lib/freyr/command.rb,
lib/freyr/helpers.rb,
lib/freyr/service.rb,
lib/freyr/version.rb,
lib/freyr/pid_file.rb,
lib/freyr/cli/helpers.rb,
lib/freyr/cli/monitor.rb,
lib/freyr/process_info.rb,
lib/freyr/service_info.rb,
lib/freyr/cli/launching.rb,
lib/freyr/service_group.rb,
lib/freyr/cli/management.rb
Defined Under Namespace
Modules: RVM
Classes: AdminRequired, CLI, Command, PidFile, Pinger, ProcessInfo, Service, ServiceGroup, ServiceInfo, Timeout
Constant Summary
collapse
- OUT =
STDOUT.dup
- VERSION =
File.open(File.expand_path(File.dirname(__FILE__)+'/../../VERSION')).read
Instance Method Summary
collapse
Instance Method Details
#has_rvm? ⇒ Boolean
6
7
8
|
# File 'lib/freyr/helpers.rb', line 6
def has_rvm?
ENV["rvm_loaded_flag"] == "1"
end
|
#is_root? ⇒ Boolean
2
3
4
|
# File 'lib/freyr/helpers.rb', line 2
def is_root?
Process.euid == 0
end
|
#logger ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/freyr.rb', line 11
def logger
@logger ||= begin
log = Logger.new(STDOUT)
log.level = Logger::FATAL
log.formatter = proc do |severity, datetime, progname, msg|
%Q{#{severity.chars.first}: #{[progname,msg].compact.join(' - ')}\n}
end
log
end
end
|
#logger=(logger) ⇒ Object
22
23
24
|
# File 'lib/freyr.rb', line 22
def logger= logger
@logger = logger
end
|