Yeah, more tests are definitely needed. I'll try to add a couple more as well here and there when working on something. I like the java_files channel addition but I'm wondering whether we shouldn't keep the selection of java files from the source dir no matter what. So merge the java_files channel with the source files instead of doing an either/or.
<br><br>I can't think of any case where you'll be using the javac task without some java files hanging somewhere. Whereas if I want to add java files to the channel manually, I don't want to have to re-add the source directory manually anytime. It's better to optimize for the most common case I think.
<br><br>What do you think?<br><br>Matthieu<br><br><br><div><span class="gmail_quote">On 2/14/07, <b class="gmail_sendername">Matthew Foemmel</b> <<a href="mailto:rubyforge@foemmel.com">rubyforge@foemmel.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br><br>Just checked in a couple things:<br><br>The first is a new task called "fileset", which simply scans a directory for files matching a pattern, and sticks them in the appropriate channel, based on file extension (
e.g. *.java files go in the "java_files" channel, *.foo files go in the "foo_files" channel, etc). I've also changed the javac task to check the "java_files" channel, so you can now do things like:
<br><br> fileset :server_src do |t|<br> t.dir = 'src'<br> t.includes << 'com/example/server/**/*.java'<br> end<br><br> javac :server_javac => :server_src<br><br>And (eventually):
<br><br> jar_source :server_jarsrc => :server_src<br><br>The other change was some refactoring of way logging works to make it easier unit test things. You can see in the JavacTaskTest class that it includes the TaskTest module, which has a method called "assert_in_log". This method can be used to check that certain strings appear in the output log of each test.
<br><br>Right now we don't have much test coverage, but I'm going to try and work my way through the tasks and add tests for each of them.<br><br>Cheers,<br>Foemmel<br>_______________________________________________
<br>Raven-devel mailing list<br><a href="mailto:Raven-devel@rubyforge.org">Raven-devel@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/raven-devel">http://rubyforge.org/mailman/listinfo/raven-devel</a>
<br></blockquote></div><br>