Makes sense.

Sent from my iPad

On Feb 5, 2013, at 3:14 AM, Kenny Johnston <notifications@github.com> wrote:

> In lib/pgbackups-archive/heroku/client/pgbackups_archive.rb:
> 
> > @@ -23,6 +23,14 @@ def capture
> >      @backup
> >    end
> >  
> > +  def database_url
> > +    ENV[database_config_var]
> > +  end
> > +
> > +  def database_config_var
> > +    ENV['PGBACKUPS_DATABASE'] || 'DATABASE_URL'
> > +  end
> > +
> After going back and forth on this, I think the best decision is to follow suit with what Heroku does; go ahead and repeat the URL for each variable (as they do with DATABASE_URL and the corresponding color variable). The reasons for my thinking are:
> 
> Most pgbackups-archive users will omit this setting and allow the default DATABASE_URL to handle their situation. So, while in their heroku config they currently see the same URL in both the DATABASE_URL and color-based variables, there is no further repetition needed for pgbackups-archive's sake.
> 
> Users with an alternate database they would like to backup will only have to provide that URL one new time, for PGBACKUPS_DATABASE_URL, in addition to their existing color-based variable.
> 
> Setting an environment variable to the name of another environment variable will lead to some confusion since environment variables, to my knowledge at least, cannot be dynamic or read from one another. Some users might even assume they are supposed to paste the URL even if we add further documentation about using the name of another variable.
> 
> I appreciate the concept you've demonstrated here, but let's roll with the simple URL assignment strategy.
> 
> —
> Reply to this email directly or view it on GitHub.
>