This really intrigued me, so I thought I'd dig into the Heroku gem (
http://github.com/heroku/heroku/blob/master/lib/heroku/client.rb) and see
what I could find.

On line 120 of client.rb (
http://github.com/heroku/heroku/blob/master/lib/heroku/client.rb#L120) there
is a function called add_domain. It looks like you can do pretty much
anything that you could do from the command line in your code. So to solve
your problem:

require 'heroku'
heroku = Heroku::Client.new("[email protected]","mypass")
heroku.add_domain("myapp","http://www.example.com";)

It's as simple as that! Hope that helps.

Phillip Ridlen
@philtr

On Thu, Aug 12, 2010 at 11:17 AM, Daniel Spangenberg <
[email protected]> wrote:

> Hey,
> look at this cool blog post, it's for an other problem,
> but I think it's that what you need.
> http://blog.darkhax.com/2010/07/30/auto-scale-your-resque-workers-on-heroku
>
> Mit freundlichen Grüßen
> Daniel Spangenberg
> [email protected]
>
>
> Am 12.08.2010 um 18:13 schrieb Brett:
>
> > Hi all,
> >
> > I want to let users purchase custom domain names to access my app on
> > Heroku.  When the purchase transaction takes place, I'd like to add
> > the custom domain to my app in real time.  I thought of using the
> > Heroku gem/command line tool from within the app, analagous to the
> > command-line expression:
> > heroku domains:add www.example.com
> >
> > Is this possible?  If so, what is the syntax?
> >
> > Thanks!
> >
> > Brett
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<heroku%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<heroku%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to