Interactive Rake Tasks

Anyone have a guide or a good example gem/rake task that prompts the
user for input and does logic based on it?

I want to write an interactive installer for a plugin.

Steve M. wrote:

Anyone have a guide or a good example gem/rake task that prompts the
user for input and does logic based on it?

I want to write an interactive installer for a plugin.

Might be overkill but Radiant CMS has a task called rake dn:bootstrap
that asks some questions at the end. Would that help?

Cheers,
Mohit.
8/13/2008 | 1:30 AM.

Mohit S. wrote:

Steve M. wrote:

Anyone have a guide or a good example gem/rake task that prompts the
user for input and does logic based on it?

I want to write an interactive installer for a plugin.

Might be overkill but Radiant CMS has a task called rake dn:bootstrap
that asks some questions at the end. Would that help?

Looking through the source for Radiant shows that you should see:
http://dev.radiantcms.org/browser/trunk/radiant/lib/tasks/database.rake
which connects to:
http://dev.radiantcms.org/browser/trunk/radiant/lib/radiant/setup.rb

Hope this helps.

Cheers,
Mohit.
8/13/2008 | 1:38 AM.

Thanks Mohit, that helps, I see the ask and agree methods there, I
should be able to follow from here.

Steve

http://highline.rubyforge.org/doc/

On Tue, Aug 12, 2008 at 2:43 PM, d c [email protected] wrote:

http://highline.rubyforge.org/doc/

Second this.


Avdi

Home: http://avdi.org
Developer Blog: Avdi Grimm, Code Cleric
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com

It looks like the radiant tasks I looked at were using highline, this is
perfect, thanks.

Avdi G. wrote:

On Tue, Aug 12, 2008 at 2:43 PM, d c [email protected] wrote:

http://highline.rubyforge.org/doc/

Second this.


Avdi

Home: http://avdi.org
Developer Blog: Avdi Grimm, Code Cleric
Twitter: http://twitter.com/avdi
Journal: http://avdi.livejournal.com