From jmg3000 at gmail.com Thu Sep 7 15:30:06 2006 From: jmg3000 at gmail.com (John Gabriele) Date: Thu, 7 Sep 2006 15:30:06 -0400 Subject: [Rake-devel] possibly helpful tweaks to the docs Message-ID: <65e0bb520609071230tece9232u921179a281f9fd8f@mail.gmail.com> Hi, I'm just learning my way 'round Rake, and I'm grateful for the great docs available. That said, here's my 2 cents on some small changes that might be made to the docs at http://rake.rubyforge.org/ that I think would make them even more helpful: * Add "target" to doc/glossary.rdoc * Possibly rename doc/rational.rdoc to doc/rationale.rdoc * Not sure my guess is right here, but, in that rationale doc, add the date it was written, and note at the top that the doc is historical and many improvements have been made to Rake since then. * doc/proto_rake.rdoc is a mostly empty page. You might either add the code to it, or else remove it. * in doc/rakefile.rdoc: * Under "Tasks with Prerequisites", you might mention again that prereq's are themselves tasks too. Also, I'm guessing the prereq's and handled in the order they're listed (left-to-right) -- if that's the case, you might explicitly say so here. * Also under Tasks, you might tell the reader about the default task, and how they'd know what the default task for their rakefile *is* (and how they'd set the default task). * The 2nd paragraph under "Importing Dependencies" may be difficult to understand. You might change that first sentence to "Because your dependency files will be already loaded...". Also, you might change '"ready to go"' to "already generated", and also sub!(/make/, "makes") in that paragraph. * In the "Comments" section, you might add a line in the "rake -T" output sample that contains the text from the "desc" command you just described. * Namespaces section, first sentence can do without the "if". * FileTasks subsection: sub!(/file task names in name space/, "file task names in a namespace") Thanks, ---John From john at fivesquaresoftware.com Wed Sep 27 18:18:33 2006 From: john at fivesquaresoftware.com (John Clayton) Date: Wed, 27 Sep 2006 15:18:33 -0700 Subject: [Rake-devel] Re-rooting a directory tree for use with package task Message-ID: <1D40CD37-9EDA-4451-A1DF-5BEB94D7EBA3@fivesquaresoftware.com> Hi, Let's say I have two source trees in a project, source1 and source2. Let's also say I want to create two packages when packing up the app for distribution, one from each tree. So, I'd like to create one package with just the files under source1 and another with just the files in source2. What I'd like: source1 | - file1 - file2 - file3 source2 | - file1 - file2 - file3 pkg | - SuperApp-component1 | - file1 - file2 - file3 | - SuperApp-component2 | - file1 - file2 - file3 What I get: pkg | - SuperApp-component1 | - source1 | - file1 - file2 - file3 | - SuperApp-component2 | - source2 | - file1 - file2 - file3 What I've tried so far (simplified): Rake::PackageTask.new("SuperApp-component1") do |p| p.package_files = FileList["rails/**/*"] end - and - Rake::PackageTask.new("SuperApp-component1") do |p| p.package_files = FileList["rails/**/*"].pathmap("%-1d") end The first gets the files, the second does not, of course, but I though i'd try ... Is there anyway to re-root the copied files in a package task, subtracting the parent directory? I could of course copy the files to a temporary directory first, but I wondered if there is a way to do it with the package task. Best, John