fog/fog-core — pull request #34 by tokengeek (2014-04-04 11:39:42+00:00)
Title: Allow objects to bypass Service's global config

Up to now you had to accept that if `~/.fog` exists on a system that
it's values were likely to be merged into any service by the reference
to `Fog.credentials`.

One solution was to load your own credentials and pass the settings
through to services. However the cleaning of the Hash still merged the
settings with the global and created a new Hash.

This also encouraged each service to do it's own authentication
internally by passing in values like `username` and `password` then
requesting a token that was isolated to that service.

That made it unsuitable for passing one configuration object that is
shared between multiple services where both may want to change something
such as the latest, valid authentication token.

This change allows any object that responds to `config_service?` with
`true` to bypass the global merging, parsing, coercion etc. and be
passed directly to a service.

That allows services to dispense with primitive obsession and use tested
objects to configure their services.

Resolves fog/fog#1390