Module: Rbcli
- Defined in:
- lib/rbcli.rb,
lib/rbcli/version.rb,
lib/rbcli/engine/parser.rb,
lib/rbcli/logging/logging.rb,
lib/rbcli/engine/load_project.rb,
lib/rbcli/configuration/config.rb,
lib/rbcli/configuration/configurate.rb,
lib/rbcli/stateful_systems/storagetypes/localstate.rb,
lib/rbcli/stateful_systems/storagetypes/remotestate_dynamodb.rb
Overview
Defined Under Namespace
Modules: Autoupdate, Config, Configurate, ConfigurateStorage, Logger, Parser, State
Classes: Command, Scriptwrapper
Constant Summary
collapse
- VERSION =
"0.1.10"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
34
35
36
|
# File 'lib/rbcli/configuration/config.rb', line 34
def self.config
Rbcli::Config::config
end
|
.debug(obj) ⇒ Object
73
74
75
|
# File 'lib/rbcli/logging/logging.rb', line 73
def self.debug obj
puts obj.to_s.red
end
|
.load_project ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/rbcli/engine/load_project.rb', line 2
def self.load_project
project_root = File.expand_path "#{File.dirname(caller[0].split(':')[0])}/../"
%w(config hooks application application/commands).each do |dir|
dirpath = "#{project_root}/#{dir}"
Dir.glob "#{dirpath}/*.rb" do |file|
require file
end if Dir.exists? dirpath
end
configspath = "#{project_root}/default_user_configs"
Dir.glob "#{configspath}/*.{yml,yaml}" do |file|
Rbcli::Configurate.me {config_defaults file}
end
end
|
.local_state ⇒ Object
15
16
17
|
# File 'lib/rbcli/stateful_systems/storagetypes/localstate.rb', line 15
def self.local_state
Rbcli::ConfigurateStorage.data[:localstate]
end
|
.log ⇒ Object
69
70
71
|
# File 'lib/rbcli/logging/logging.rb', line 69
def self.log
Rbcli::Logger::log
end
|
.remote_state ⇒ Object
19
20
21
|
# File 'lib/rbcli/stateful_systems/storagetypes/remotestate_dynamodb.rb', line 19
def self.remote_state
Rbcli::ConfigurateStorage.data[:remotestate]
end
|