Rake best practices for managing multi-directory project?

Discussion in 'Ruby' started by Stuart Hungerford, Mar 14, 2006.

  1. Hi,

    I'm currently working on a project with a number of "modules"
    in different directories. I'm using Rake to manage the running
    of the module services in the correct order.

    I have a directory structure something like this:


    /project
    +-- Rakefile

    +-- module A
    +-- module A files
    +-- tasks.rake

    +-- module B
    +-- module B files
    + tasks.rake

    +-- module C
    etc

    So each module directory has its own tasks.rake file and all
    the SQL, shell, Ruby etc scripts needed to implement the
    service it provides. Each tasks.rake uses Rake namespaces
    fully to avoid any task name ambiguity across the project.

    The "top level" Rakefile in /project uses Rake imports to
    bring each module tasks.rake file into it and make them
    available from the command line.

    Are there any Rake best practices or idioms or patterns that
    I could be applying in this situation?

    For example, in my current setup the top level Rakefile needs
    to setup module paths as global variables so the tasks.rake
    files look in their own directory for script files and not the
    top level directory--which seems a bit clunky.

    Any advice from people using Rake for similar projects would
    be much appreciated.

    TIA,

    Stu
     
    Stuart Hungerford, Mar 14, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juergen
    Replies:
    2
    Views:
    7,047
    Juergen
    Jan 20, 2005
  2. Rafe
    Replies:
    1
    Views:
    396
  3. Big George
    Replies:
    2
    Views:
    1,031
    Big George
    Feb 16, 2009
  4. peppermonkey
    Replies:
    1
    Views:
    251
    Gregory Brown
    Feb 10, 2007
  5. Replies:
    7
    Views:
    152
    Douglas Crockford
    Nov 4, 2005
Loading...

Share This Page