Class: Bricolage::ConfigLoader
- Inherits:
-
Object
- Object
- Bricolage::ConfigLoader
show all
- Includes:
- EmbeddedCodeAPI
- Defined in:
- lib/bricolage/configloader.rb
Constant Summary
Constants included
from VacuumLock
VacuumLock::DEFAULT_VACUUM_LOCK_FILE, VacuumLock::DEFAULT_VACUUM_LOCK_TIMEOUT
Instance Method Summary
collapse
Methods included from VacuumLock
cleanup_vacuum_lock, create_lockfile_cmd, create_vacuum_lock_file, enable_vacuum_lock?, locking?, psql_serialize_vacuum_begin, psql_serialize_vacuum_end, serialize_vacuum, using, #using_vacuum_lock, vacuum_lock_parameters
Constructor Details
13
14
15
16
|
# File 'lib/bricolage/configloader.rb', line 13
def initialize(app_home)
@app_home = app_home
@base_dir = Pathname('.')
end
|
Instance Method Details
#eruby(text, path) ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/bricolage/configloader.rb', line 26
def eruby(text, path)
erb = ERB.new(text, nil, '%-')
erb.filename = path.to_s
push_base_dir(path) {
erb.result(binding())
}
end
|
#load_text(path) ⇒ Object
22
23
24
|
# File 'lib/bricolage/configloader.rb', line 22
def load_text(path)
eruby(read_file(path), path)
end
|
#load_yaml(path) ⇒ Object
18
19
20
|
# File 'lib/bricolage/configloader.rb', line 18
def load_yaml(path)
parse_yaml(load_text(path), path)
end
|