Module: D13n
- Defined in:
- lib/d13n.rb,
lib/d13n/logger.rb,
lib/d13n/service.rb,
lib/d13n/version.rb,
lib/d13n/cli/command.rb,
lib/d13n/configuration.rb,
lib/d13n/service/start.rb,
lib/d13n/logger/log_once.rb,
lib/d13n/logger/null_logger.rb,
lib/d13n/logger/memory_logger.rb,
lib/d13n/rack/d13n_middleware.rb,
lib/d13n/rack/metric_middleware.rb,
lib/d13n/configuration/mask_defaults.rb
Defined Under Namespace
Modules: Application, Cli, Configuration, Metric, Rack, VERSION
Classes: Error, Logger, Service
Constant Summary
collapse
- NAME =
'd13n'.freeze
- RELEASE =
"#{NAME} #{VERSION::STRING} codename #{VERSION::CODENAME}".freeze
Class Method Summary
collapse
Class Method Details
.app_name ⇒ Object
67
68
69
|
# File 'lib/d13n.rb', line 67
def app_name
application.name.underscore
end
|
.app_prefix ⇒ Object
71
72
73
|
# File 'lib/d13n.rb', line 71
def app_prefix
app_name.upcase
end
|
.application ⇒ Object
57
58
59
|
# File 'lib/d13n.rb', line 57
def application
@application ||= self
end
|
.application=(app) ⇒ Object
61
62
63
64
65
|
# File 'lib/d13n.rb', line 61
def application=(app)
@application = app
@app_name = nil
@app_prefix = nil
end
|
.config=(cfg) ⇒ Object
20
21
22
|
# File 'lib/d13n.rb', line 20
def config=(cfg)
@config = cfg
end
|
.dry_run? ⇒ Boolean
8
9
10
|
# File 'lib/d13n.rb', line 8
def dry_run?
@dry_run ||= false
end
|
.enable_dry_run ⇒ Object
12
13
14
|
# File 'lib/d13n.rb', line 12
def enable_dry_run
@dry_run = true
end
|
.idc_env ⇒ Object
79
80
81
|
# File 'lib/d13n.rb', line 79
def idc_env
config[:'idc.env'] || 'dev'
end
|
.idc_name ⇒ Object
75
76
77
|
# File 'lib/d13n.rb', line 75
def idc_name
config[:'idc.name'] || 'hqidc'
end
|
.logger=(log) ⇒ Object
32
33
34
|
# File 'lib/d13n.rb', line 32
def logger=(log)
@logger = log
end
|
.reset ⇒ Object
45
46
47
|
# File 'lib/d13n.rb', line 45
def reset
Thread.current[:d13n] = {}
end
|
.service ⇒ Object
49
50
51
|
# File 'lib/d13n.rb', line 49
def service
@service ||= D13n::Service
end
|
.service=(srv) ⇒ Object
53
54
55
|
# File 'lib/d13n.rb', line 53
def service=(srv)
@service = srv
end
|
.threaded ⇒ Object
def opt_state
D13n::Operation::State
end
40
41
42
43
|
# File 'lib/d13n.rb', line 40
def threaded
Thread.current[:d13n] ||= {}
end
|