Module: Djin
- Defined in:
- lib/djin.rb,
lib/djin/cli.rb,
lib/djin/version.rb,
lib/djin/executor.rb,
lib/djin/interpreter.rb,
lib/djin/memory_cache.rb,
lib/djin/config_loader.rb,
lib/djin/entities/task.rb,
lib/djin/task_contract.rb,
lib/djin/entities/types.rb,
lib/djin/root_cli_parser.rb,
lib/djin/include_resolver.rb,
lib/djin/entities/main_config.rb,
lib/djin/entities/include_config.rb,
lib/djin/extensions/hash_extensions.rb,
lib/djin/entities/include_config/base.rb,
lib/djin/extensions/object_extensions.rb,
lib/djin/entities/include_config/local.rb,
lib/djin/interpreter/base_command_builder.rb,
lib/djin/interpreter/local_command_builder.rb,
lib/djin/interpreter/docker_command_builder.rb,
lib/djin/repositories/remote_config_repository.rb,
lib/djin/interpreter/docker_compose_command_builder.rb
Defined Under Namespace
Modules: HashExtensions, IncludeConfig, ObjectExtensions, Types
Classes: CLI, ConfigLoader, Error, Executor, IncludeResolver, Interpreter, MainConfig, MemoryCache, RemoteConfigRepository, RootCliParser, Task, TaskContract
Constant Summary
collapse
- VERSION =
'0.11.0'
Class Method Summary
collapse
Class Method Details
.cache ⇒ Object
71
72
73
|
# File 'lib/djin.rb', line 71
def cache
@cache ||= MemoryCache.new
end
|
.load_tasks!(*file_paths) ⇒ Object
.remote_config_repository ⇒ Object
67
68
69
|
# File 'lib/djin.rb', line 67
def remote_config_repository
@remote_config_repository ||= RemoteConfigRepository.new
end
|
.root_path ⇒ Object
75
76
77
|
# File 'lib/djin.rb', line 75
def root_path
Pathname.new File.expand_path(__dir__ + '/..')
end
|
.stderr ⇒ Object
91
92
93
|
# File 'lib/djin.rb', line 91
def stderr
$stderr
end
|
.task_repository ⇒ Object
63
64
65
|
# File 'lib/djin.rb', line 63
def task_repository
@task_repository ||= TaskRepository.new
end
|
.tasks ⇒ Object
59
60
61
|
# File 'lib/djin.rb', line 59
def tasks
task_repository.all
end
|
.warn(message, type: 'WARNING') ⇒ Object
79
80
81
|
# File 'lib/djin.rb', line 79
def warn(message, type: 'WARNING')
stderr.puts "[#{type}] #{message}"
end
|
.warn_once(message, type: 'WARNING') ⇒ Object
83
84
85
86
87
88
89
|
# File 'lib/djin.rb', line 83
def warn_once(message, type: 'WARNING')
return if warnings.include?(message)
warn(message, type: type)
warnings << message
end
|