rumblelabs/asset_sync — pull request #162 by marcgg (2013-02-27 08:52:18+00:00)
Title: Do not overwrite config with ENV if ENV variable not present

Hello,

I have a case where I don't want to use `ENV['FOG_PROVIDER']` for setting the fog_provider because the variable name isn't right for me. Same thing with variables such as `ENV['AWS_ACCESS_KEY_ID']` that can conflict with other AWS credentials.

Using Rails + Heroku, I would like to be able to do

config.asset_sync.fog_provider = 'AWS'

in my environment file.

The problem is that this would get overwritten by the environment variable, enven if it's empty. My commit changes that.

Other option would be:

config.fog_provider ||= ENV['FOG_PROVIDER']

Let me know if you'd prefer this and I'll make another PR.

Thanks for the gem