def env_override(raw)
      { endpoint: 'WAVEFRONT_ENDPOINT',
        token:    'WAVEFRONT_TOKEN',
        proxy:    'WAVEFRONT_PROXY' }.each { |k, v| raw[k] = ENV[v] if ENV[v] }
      raw
    end
def env_override(raw)
      { endpoint: 'WAVEFRONT_ENDPOINT',
        token:    'WAVEFRONT_TOKEN',
        proxy:    'WAVEFRONT_PROXY' }.each { |k, v| raw[k] = ENV[v] if ENV[v] }
      raw
    end
Gives you an object of credentials and options for speaking to
 Wavefront. It will look in the following places:

 ~/.wavefront
 ~/.wavefront.conf
 /etc/wavefront/credentials
 WAVEFRONT_ENDPOINT and WAVEFRONT_TOKEN environment variables

 @param options [Hash] keys may be 'file', which
   specifies a config file which will be loaded and parsed. If
   no file is supplied, those listed above will be used.;
   and/or 'profile' which select a profile section from 'file'

 If the user has set certain environment variables, their
 values will override values from the config file or
 command-line.
 @param raw [Hash] the existing credentials
 @return [Hash] the modified credentials