orchardup/fig — pull request #297 by ryanbrainard (2014-07-08 04:51:57+00:00)
Title: Resolve environment without values to values on host

For parity with the Docker CLI, allow environment variables without values to be automatically resolved to their values on the host.

If someone defines an `environment` as a `list`, this also converts it to a `dict` so the above resolution works as expected. Defining `environment` as `dict` is canonical, but using a `list` already worked, so this conversion supports backward compatibility.

docker-py resolves `environment` with a value of `None` to the string `'None'`, which is not what someone would want if the value could not be found in the host's environment. This resolves that case to empty string, which is how Docker CLI also handles this situation.

Fixes https://github.com/orchardup/fig/issues/277