walmartlabs/hula-hoop — pull request #3 by patrickkettner (2014-07-22 18:23:31+00:00)
Title: add `allowMissing` param to resource object definition

In a normal localDev -> QA -> Prod flow, it is quite possible that
someone would want to have a resource being developed locally, and in
QA, but not ever be released to Prod (An in progress, major version,
backwards incompatible version for example). During that time period,
the QA server might need to be used to QA the stable version of the
resource.

This results in a setup like this

``` {
"resource" : [
{
"name": "a-stable",
"version": "1.0.0",
"path": "./stable"
},
{
"name": "a-nextgen",
"version": "2.0.0",
"path": "./nextgen"
}
]
}
```

This allows you to use both resources during local development and QA,
when it has been deployed properly. But if you are QAing an exact Prod
release, Hula-Hoop will current throw an error unless you include the
in progress (and most likely broken/incomplete) version. Rather than do
that, `allowMissing changes the above to

``` {
"resource" : [
{
"name": "a-stable",
"version": "1.0.0",
"path": "./stable"
},
{
"name": "a-nextgen",
"version": "2.0.0",
"path": "./nextgen",
"allowMissing": true
}
]
}
```

Now, when Prod is being tested in QA, `resources` becomes

``` {
"resource" : [
{
"name": "a-stable",
"version": "1.0.0",
"path": "./stable"
}
]
}
```

after resolution, and continues on its merry way.