Open danp opened 12 years ago
@dpiddy - how about HEROKU_API_KEY. If that is set then Heroku::API.new
should just work I think. Granted it doesn't deal with netrc and the like, but seems fairly close in terms of simplicity. We can possibly do better, but I don't necessarily want to add a netrc dependency here. Maybe it should be a separate little gem that is just a shim for hooking together API with netrc.
Ref heroku/heroku#508
I currently have the heroku gem in a project's bundle because it has
Heroku::Auth.api
which makes it really easy to get a ready-to-useHeroku::API
instance. I don't have to worry about netrc and other stuff.It would be nice if heroku.rb itself or another gem outside the main CLI gem provided what is in
Heroku::Auth
so I could easily get aHeroku::API
instance without bringing in the entire CLI.It's possible this is complicated by plugins that change the auth process.