typesafehub/config — pull request #168 by bjaglin (2014-06-04 13:48:33+00:00)
Title: Parse env variables so that they don't all end up as strings

When a key resolution fallbacks to an existing environment variable, the type of that key is always `String`, although it might be an `int` and would be parsed as such if the exact same content was injected directly in the config or via a system property.

This makes sure that the same code path is hit for environment variables and system properties, effectively making environment variables first class citizens when it comes to setting values.

I could not come up with a generic way to test it without doing some refactoring around the call to `System.getEnv()`, since AFAIK, it's impossible to set an environment variable at runtime and there is no canonical numerical environment variable we could use. An (uncommited) adhoc unit test passed locally, where a `GNOME_KEYRING_PID=2055` was set.