Class: VMC::Cli::Command::Manifest

Inherits:
Base show all
Includes:
ManifestHelper
Defined in:
lib/cli/commands/manifest.rb

Constant Summary

Constants included from ManifestHelper

ManifestHelper::DEFAULTS, ManifestHelper::MANIFEST, ManifestHelper::YES_SET

Constants inherited from Base

Base::MANIFEST

Instance Attribute Summary

Attributes inherited from Base

#no_prompt, #prompt_ok

Instance Method Summary collapse

Methods included from ManifestHelper

#bind_services, #configure_app, #configure_service, #detect_framework, #each_app, #interact, #save_manifest, #set, #target_manifest

Methods included from ServicesHelper

#bind_service_banner, #check_app_for_restart, #create_service_banner, #delete_service_banner, #display_provisioned_services, #display_provisioned_services_table, #display_system_services, #random_service_name, #unbind_service_banner

Methods inherited from Base

#auth_token, #client, #client_info, #find_in_hash, #find_symbol, #frameworks_info, #load_manifest, #load_manifest_structure, #manifest, #manifest_file, #merge_manifest, #merge_parent, #resolve_in, #resolve_lexically, #resolve_manifest, #resolve_symbol, #runtimes_info, #target_base, #target_url

Constructor Details

#initialize(options) ⇒ Manifest

Returns a new instance of Manifest.



5
6
7
8
9
10
11
12
13
14
# File 'lib/cli/commands/manifest.rb', line 5

def initialize(options)
  super

  # don't resolve any of the manifest template stuff
  if manifest_file
    @manifest = load_manifest_structure manifest_file
  else
    @manifest = {}
  end
end

Instance Method Details

#editObject



16
17
18
19
# File 'lib/cli/commands/manifest.rb', line 16

def edit
  build_manifest
  save_manifest
end

#extend(which) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/cli/commands/manifest.rb', line 21

def extend(which)
  parent = load_manifest_structure which
  @manifest = load_manifest_structure which

  build_manifest

  simplify(@manifest, parent)

  @manifest["inherit"] ||= []
  @manifest["inherit"] << which

  save_manifest(ask("Save where?"))
end