dburkes/databasedotcom-rails — Issue #1: Option for reading dbdc config from ENV['DATABASE_COM_URL']
Author: pbn-lumen
Created: 2011-12-07 21:42:14+00:00
State: open

Hi,

I work for salesforce.com and working database.com heroku addon. Do you mind adding an option for reading database.com config (in the Controller.rb class) from environment variable 'DATABASE_COM_URL' as well, similar to databasedotcom's Client.rb.

For example,something similar to this.

def dbdc_client
unless @dbdc_client
if ENV['DATABASE_COM_URL']
@dbdc_client = Databasedotcom::Client.new
else
config = YAML.load_file(File.join(::Rails.root, 'config', 'databasedotcom.yml'))
@dbdc_client = Databasedotcom::Client.new(config)
end
@dbdc_client.authenticate(:username => @dbdc_client.username, :password => @dbdc_client.password)
end
@dbdc_client
end

Thanks
Babu