Module: Locd
- Includes:
- NRSER::Log::Mixin
- Defined in:
- lib/locd.rb,
lib/locd/util.rb,
lib/locd/errors.rb,
lib/locd/version.rb,
lib/locd/config/types.rb,
lib/locd/cli/command/base.rb,
lib/locd/cli/command/main.rb,
lib/locd/cli/command/project.rb,
lib/locd/cli/command/agent/add.rb
Overview
Namespace
Defined Under Namespace
Modules: CLI, Label, Launchctl, Newsyslog, Proxy Classes: Agent, Config, HandledError, NotFoundError, Pattern, RequestError
Constant Summary collapse
- HOST_RE =
Regexp to match HTTP "Host" header line.
/^Host\:\ /i
- ROTATE_LOGS_LABEL =
'com.nrser.locd.rotate-logs'
- ROOT =
Absolute, expanded path to the gem's root directory.
Pathname.new( __dir__ ).join( '..', '..' ).
- VERSION =
String version read from
//VERSION
(ROOT / 'VERSION').read
- GEM_NAME =
The gem name
'locd'
Class Method Summary collapse
-
.config ⇒ Locd::Config
The configuration.
- .resolve(project_root, path = nil) ⇒ Object
-
.resolve_to_s(*args) ⇒ String
Just like Locd.resolve but returns a String (instead of a Pathname).
Class Method Details
.config ⇒ Locd::Config
Returns The configuration.
63 64 65 |
# File 'lib/locd.rb', line 63 def self.config @config ||= Locd::Config.new end |
.resolve(project_root, path = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/locd/util.rb', line 9 def self.resolve project_root, path = nil return project_root if path.nil? if path.start_with? '//' project_root / path[2..-1] elsif path.start_with? '/' path.to_pn else project_root / path end end |
.resolve_to_s(*args) ⇒ String
Just like resolve but returns a String (instead of a Pathname).
27 28 29 |
# File 'lib/locd/util.rb', line 27 def self.resolve_to_s *args resolve( *args ).to_s end |