Module: Adminix
- Defined in:
- lib/adminix.rb,
lib/adminix/config.rb,
lib/adminix/version.rb,
lib/adminix/watcher.rb,
lib/adminix/web/router.rb,
lib/adminix/web/server.rb,
lib/adminix/entities/job.rb,
lib/adminix/entities/log.rb,
lib/adminix/helpers/files.rb,
lib/adminix/helpers/output.rb,
lib/adminix/helpers/command.rb,
lib/adminix/web/view_helper.rb,
lib/adminix/entities/service.rb,
lib/adminix/helpers/net_http.rb,
lib/adminix/entities/variable.rb,
lib/adminix/helpers/systemctl.rb,
lib/adminix/helpers/log_reader.rb,
lib/adminix/services/app_service.rb,
lib/adminix/services/logs_service.rb,
lib/adminix/entities/sysload_stamp.rb,
lib/adminix/services/system_load_service.rb
Defined Under Namespace
Modules: Entities, Helpers, Services, Web
Classes: Config, Watcher
Constant Summary
collapse
- VERSION =
'0.2'
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
19
20
21
|
# File 'lib/adminix.rb', line 19
def self.config
@config
end
|
.config=(config) ⇒ Object
15
16
17
|
# File 'lib/adminix.rb', line 15
def self.config=(config)
@config = config
end
|
.define_logger(source, lvl = nil) ⇒ Object
44
45
46
47
|
# File 'lib/adminix.rb', line 44
def self.define_logger(source, lvl = nil)
@logger = Logger.new(source)
@logger.level = lvl if lvl
end
|
.logger ⇒ Object
40
41
42
|
# File 'lib/adminix.rb', line 40
def self.logger
@logger
end
|
.os ⇒ Object
31
32
33
34
35
36
37
38
|
# File 'lib/adminix.rb', line 31
def self.os
return @os if @os
@os = if RUBY_PLATFORM =~ /darwin/ then 'mac'
elsif RUBY_PLATFORM =~ /linux/ then 'linux'
elsif RUBY_PLATFORM =~ /mswin32/ then 'windows'
else 'unknown'
end
end
|
.root ⇒ Object
11
12
13
|
# File 'lib/adminix.rb', line 11
def self.root
File.dirname __dir__
end
|
.test? ⇒ Boolean
49
50
51
|
# File 'lib/adminix.rb', line 49
def self.test?
ENV['ADMINIX_ENV'] == 'test'
end
|
.watcher ⇒ Object
27
28
29
|
# File 'lib/adminix.rb', line 27
def self.watcher
@watcher
end
|
.watcher=(watcher) ⇒ Object
23
24
25
|
# File 'lib/adminix.rb', line 23
def self.watcher=(watcher)
@watcher = watcher
end
|