Module: Oxidized
- Defined in:
- lib/oxidized.rb,
lib/oxidized/cli.rb,
lib/oxidized/job.rb,
lib/oxidized/core.rb,
lib/oxidized/hook.rb,
lib/oxidized/jobs.rb,
lib/oxidized/node.rb,
lib/oxidized/nodes.rb,
lib/oxidized/config.rb,
lib/oxidized/worker.rb,
lib/oxidized/manager.rb,
lib/oxidized/signals.rb,
lib/oxidized/version.rb,
lib/oxidized/input/cli.rb,
lib/oxidized/input/ftp.rb,
lib/oxidized/input/scp.rb,
lib/oxidized/input/ssh.rb,
lib/oxidized/input/exec.rb,
lib/oxidized/input/http.rb,
lib/oxidized/input/tftp.rb,
lib/oxidized/node/stats.rb,
lib/oxidized/output/git.rb,
lib/oxidized/source/csv.rb,
lib/oxidized/source/sql.rb,
lib/oxidized/input/input.rb,
lib/oxidized/model/model.rb,
lib/oxidized/output/file.rb,
lib/oxidized/output/http.rb,
lib/oxidized/source/http.rb,
lib/oxidized/input/telnet.rb,
lib/oxidized/model/outputs.rb,
lib/oxidized/output/output.rb,
lib/oxidized/source/source.rb,
lib/oxidized/output/gitcrypt.rb
Defined Under Namespace
Classes: CLI, CSV, Config, Core, Exec, FTP, Git, GitCrypt, HTTP, Hook, HookManager, Http, Input, InvalidConfig, Job, Jobs, Manager, MethodNotFound, Model, ModelNotFound, NoConfig, Node, NodeNotFound, Nodes, NotSupported, Output, OxidizedError, OxidizedFile, PromptUndetect, SCP, SQL, SSH, Signals, Source, TFTP, Telnet, Worker
Constant Summary
collapse
- Directory =
File.expand_path(File.join(File.dirname(__FILE__), '../'))
- VERSION =
'0.30.1'.freeze
- VERSION_FULL =
'0.30.1'.freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.hooks ⇒ Object
Returns the value of attribute hooks.
78
79
80
|
# File 'lib/oxidized/config.rb', line 78
def hooks
@hooks
end
|
.mgr ⇒ Object
Returns the value of attribute mgr.
78
79
80
|
# File 'lib/oxidized/config.rb', line 78
def mgr
@mgr
end
|
Class Method Details
.asetus ⇒ Object
19
20
21
|
# File 'lib/oxidized.rb', line 19
def self.asetus
@@asetus
end
|
.asetus=(val) ⇒ Object
23
24
25
|
# File 'lib/oxidized.rb', line 23
def self.asetus=(val)
@@asetus = val
end
|
.config ⇒ Object
27
28
29
|
# File 'lib/oxidized.rb', line 27
def self.config
asetus.cfg
end
|
.logger ⇒ Object
31
32
33
|
# File 'lib/oxidized.rb', line 31
def self.logger
@@logger
end
|
.logger=(val) ⇒ Object
35
36
37
|
# File 'lib/oxidized.rb', line 35
def self.logger=(val)
@@logger = val
end
|
.new(*args) ⇒ Object
3
4
5
|
# File 'lib/oxidized/core.rb', line 3
def new(*args)
Core.new args
end
|
.setup_logger ⇒ Object
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/oxidized.rb', line 39
def self.setup_logger
FileUtils.mkdir_p(Config::LOG) unless File.directory?(Config::LOG)
self.logger = if config.has_key?('use_syslog') && config.use_syslog
require 'syslog/logger'
Syslog::Logger.new('oxidized')
else
require 'logger'
if config.has_key?('log')
Logger.new(File.expand_path(config.log))
else
Logger.new($stderr)
end
end
logger.level = Logger::INFO unless config.debug
end
|
.version_set ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/oxidized/version.rb', line 4
def self.version_set
version_full = %x(git describe --tags).chop rescue ""
version = %x(git describe --tags --abbrev=0).chop rescue ""
return false unless [version, version_full].none?(&:empty?)
Oxidized.send(:remove_const, :VERSION)
Oxidized.send(:remove_const, :VERSION_FULL)
const_set(:VERSION, version)
const_set(:VERSION_FULL, version_full)
file = File.readlines(__FILE__)
file[1] = " VERSION = '%s'.freeze\n" % VERSION
file[2] = " VERSION_FULL = '%s'.freeze\n" % VERSION_FULL
File.write(__FILE__, file.join)
end
|