Rake vs Subversion

Discussion in 'Ruby' started by Vincent Foley, May 4, 2005.

  1. Hello,

    I have a question for people who use both Rake and Subversion: is there
    a way to make an Rake::RDocTask not delete the whole documentation
    folder? Because right now, when I call rake with my rdoc task, it
    nukes the folder, including the .svn/ directory in it. Right now I
    generate documentation in another directory, but I would really like to
    know if there's a way to make Rake and Subversion play nice.

    And while we're talking about Subversion, is there a way when comes the
    time to package my app to select everything but the .svn folders?

    Thanks,

    Vincent.
     
    Vincent Foley, May 4, 2005
    #1
    1. Advertising

  2. On May 4, 2005, at 5:34 PM, Vincent Foley wrote:

    > Hello,
    >
    > I have a question for people who use both Rake and Subversion: is
    > there
    > a way to make an Rake::RDocTask not delete the whole documentation
    > folder? Because right now, when I call rake with my rdoc task, it
    > nukes the folder, including the .svn/ directory in it. Right now I
    > generate documentation in another directory, but I would really
    > like to
    > know if there's a way to make Rake and Subversion play nice.


    Well, the general thinking here is that RDoc documentation should not
    be version controlled. It can be recreated from the source at any
    time, so storing it just provides the window for it to get out of
    sync with the current state of the code.

    If that makes sense to you, just propset svn:ignore for the rdoc
    directory.

    > And while we're talking about Subversion, is there a way when comes
    > the
    > time to package my app to select everything but the .svn folders?


    When you pass the file list to your Rake packaging task, use
    something like:

    Dir.glob("{examples,lib,test}/**/*.rb").delete_if { |item|
    item.include?(".svn") }

    The delete_if() isn't even needed in this instance, because .svn
    won't end in .rb. I just put it in there to give you ideas. Now
    that I think about it, I'm not even sure if Dir.glob() returns things
    that begin with a . character.

    Anyway, hope some of that babble gives you a leaping off point. :D

    James Edward Gray II
     
    James Edward Gray II, May 4, 2005
    #2
    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. Replies:
    5
    Views:
    817
    John B. Matthews
    Apr 30, 2010
  2. Replies:
    0
    Views:
    387
  3. Joe Van Dyk
    Replies:
    2
    Views:
    117
    Damphyr
    Jan 31, 2006
  4. peppermonkey
    Replies:
    1
    Views:
    268
    Gregory Brown
    Feb 10, 2007
  5. Adam Anderson
    Replies:
    1
    Views:
    147
    Adam Anderson
    Sep 19, 2007
Loading...

Share This Page