Makes sense.  Thx!

Sent from my iPhone

On Feb 4, 2013, at 6:57 PM, 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
> > +
> The way this is composed, database_url will try to do ENV[ENV['PGBACKUPS_DATABASE']] if ENV['PGBACKUPS_DATABASE'] is set. To correct this, we could instead do:
> 
> def database_url
>   ENV["PGBACKUPS_DATABASE_URL"] || ENV["DATABASE_URL"]
> end
> Which also addresses the problem with just one method. Note that I'm using PGBACKUPS_DATABASE_URL instead of PGBACKUPS_DATABASE which I like better because it is more consistent with Heroku's DATABASE_URL.
> 
> —
> Reply to this email directly or view it on GitHub.
>