Module: CMDB
- Defined in:
- lib/cmdb.rb,
lib/cmdb/version.rb,
lib/cmdb/commands.rb,
lib/cmdb/rewriter.rb,
lib/cmdb/interface.rb,
lib/cmdb/file_source.rb,
lib/cmdb/consul_source.rb
Defined Under Namespace
Modules: Commands Classes: BadData, BadKey, BadValue, ConsulSource, EnvironmentConflict, Error, FileRewriter, FileSource, Interface, MissingKey, NameConflict, Rewriter, ValueConflict
Constant Summary collapse
- DEVELOPMENT_ENVIRONMENTS =
Values of RACK_ENV/RAILS_ENV that are considered to be “development,” which relaxes certain runtime sanity checks.
[nil, 'development', 'test'].freeze
- VALID_KEY =
Regexp that matches valid key names. Key names consist of one or more dot-separated words; each word must begin with a lowercase alpha character and may contain alphanumerics or underscores.
/^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)*$/- Conflict =
Deprecated name for ValueConflict
ValueConflict- VERSION =
'2.6.0'
Class Method Summary collapse
-
.development? ⇒ Boolean
Determine whether CMDB is running in a development environment.
- .log ⇒ Object
- .log=(log) ⇒ Object
Class Method Details
.development? ⇒ Boolean
Determine whether CMDB is running in a development environment.
131 132 133 |
# File 'lib/cmdb.rb', line 131 def development? DEVELOPMENT_ENVIRONMENTS.include?(ENV['RACK_ENV'] || ENV['RAILS_ENV']) end |
.log ⇒ Object
116 117 118 119 120 121 122 123 |
# File 'lib/cmdb.rb', line 116 def log unless @log @log = Logger.new(STDOUT) @log.level = Logger::WARN end @log end |
.log=(log) ⇒ Object
125 126 127 |
# File 'lib/cmdb.rb', line 125 def log=(log) @log = log end |