Skip to content

Instantly share code, notes, and snippets.

@squeedee
Created September 9, 2010 20:56
Show Gist options
  • Save squeedee/572556 to your computer and use it in GitHub Desktop.
Save squeedee/572556 to your computer and use it in GitHub Desktop.
Rasheed@Rasheed-PC /cygdrive/c/Users/Rasheed/Documents/vWork/client/vWork
$ thor -T
root
----
/usr/bin/thor rl:command com.vf.SomeClass # Creates a robotlegs command.
/usr/bin/thor rl:module_command com.vf.SomeClass # Creates a robotlegs command.
/usr/bin/thor vf:context com.vf.SomeClass com.vf.BoootstrapCommand # Creates a Visfleet context.
/usr/bin/thor vf:event com.vf.SomeClass [param1:String otherParam:Boolean] # Creates a Visfleet event.
/usr/bin/thor vf:folder_stub com.vf.SomeClass "Put cool things in this folder" # Creates a visfleet folder stub class.
/usr/bin/thor vf:module Map # Creates a module heirarchy.
/usr/bin/thor vf:sequencer com.vf.SomeClass # Creates a visfleet sequencer.
spec
----
/usr/bin/thor spec:clobber # clobber
/usr/bin/thor spec:clobber_tasks # Remove rcov products for tasks
/usr/bin/thor spec:tasks # Run specs using RCov

If i'm developing away, i often want to add 'Commands' in a conventional way so:

$ thor rl:command com.vf.SomeClass 

and i'll do this all day. Interesting note, rl:command also invokes vf:event to create an event for each command (unless told not to)

Someone says, hey we need a new module.. A module is a sub-app, so think it terms of a rails application generator.

$ thor rl:module moduleName

This should create a folder structure, some stubs, and a few basic, always used commands. So it tries to invoke rl:command several times to add 'commands'. It also wants to invoke my vf:folder_stub helper..

Invoke wont let me do this.

Thor::Actions#thor will however

it doesn't work with console prompts (i'll raise an issue)

it's considerably slower

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment