Module: AppManifest

Defined in:
lib/app_manifest.rb,
lib/app_manifest/env.rb,
lib/app_manifest/addon.rb,
lib/app_manifest/version.rb,
lib/app_manifest/manifest.rb,
lib/app_manifest/buildpack.rb,
lib/app_manifest/formation.rb,
lib/app_manifest/serializer.rb,
lib/app_manifest/environment.rb,
lib/app_manifest/nullable_array.rb,
lib/app_manifest/environment_attributes.rb

Defined Under Namespace

Modules: EnvironmentAttributes, Serializer Classes: Addon, Buildpack, Env, Environment, Formation, Manifest, NullableArray, NullableArrayAttribute

Constant Summary collapse

VERSION =
'0.5.0'.freeze

Class Method Summary collapse

Class Method Details

.canonicalize(manifest) ⇒ Object

Takes a hash representing an app manifest and returns a new hash with canonical serialization. This will resolve shorthands and older serializations into a canonical serialization.



29
30
31
32
33
34
35
36
# File 'lib/app_manifest.rb', line 29

def canonicalize(manifest)
  manifest = keys_to_sym(manifest)
  manifest
    .merge(canonicalize_env(manifest))
    .merge(canonicalize_formation(manifest))
    .merge(canonicalize_addons(manifest))
    .merge(canonicalize_environments(manifest))
end