Module: Bosh::Deployer::Helpers
- Included in:
- Cli::Command::Micro, Config, InstanceManager, InstanceManager
- Defined in:
- lib/deployer/helpers.rb
Constant Summary collapse
- DEPLOYMENTS_FILE =
"bosh-deployments.yml"
Instance Method Summary collapse
Instance Method Details
#cloud_plugin(config) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/deployer/helpers.rb', line 13 def cloud_plugin(config) err "No cloud properties defined" if config["cloud"].nil? err "No cloud plugin defined" if config["cloud"]["plugin"].nil? config["cloud"]["plugin"] end |
#dig_hash(hash, *path) ⇒ Object
20 21 22 23 24 |
# File 'lib/deployer/helpers.rb', line 20 def dig_hash(hash, *path) path.inject(hash) do |location, key| location.respond_to?(:keys) ? location[key] : nil end end |
#is_tgz?(path) ⇒ Boolean
9 10 11 |
# File 'lib/deployer/helpers.rb', line 9 def is_tgz?(path) File.extname(path) == ".tgz" end |