Module: CFManifests::Normalizer

Included in:
Loader
Defined in:
lib/manifests-cf-plugin/loader/normalizer.rb

Constant Summary collapse

MANIFEST_META =
["applications", "properties"]

Instance Method Summary collapse

Instance Method Details

#normalize!(manifest) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/manifests-cf-plugin/loader/normalizer.rb', line 5

def normalize!(manifest)
  toplevel = toplevel_attributes(manifest)

  apps = manifest["applications"]
  apps ||= [{}]

  default_paths_to_keys!(apps)

  apps = convert_to_array(apps)

  merge_toplevel!(toplevel, manifest, apps)
  normalize_apps!(apps)

  manifest["applications"] = apps

  normalize_paths!(apps)

  keyval = normalize_key_val(manifest)
  manifest.clear.merge!(keyval)

  nil
end