Thursday, July 2, 2009

Day 27

Today I another Lighthouse task, #131, which was to add a xml format feature to a few of the responders. Normally the responders, testHistory and pageHistory, would send back a FitNesse page with all the pretty pictures and dodads and such, but this nifty feature lets you see all the important information in some xml. This would also make it easier to have a program sift through the information. To accomplish this goal, I had to create two new velocity templates, one for testHistory and one for pageHistory. Each of them would layout all the data in a simple xml form. I came across an issue while trying to display the link to another page though. The link would be something like ...SomePage.ChildPage?testHistory&format=xml and then the browser would complain about the '=' sign. No matter how I changed the manner in which the '=' was displayed, it complained. Then I discovered it wasn't actually the '=' sign, but I needed to escape the '&'. This was done by just replacing the '&' with '&' followed with a amp; (hahaha, it wouldn't actually let me type the & amp; together in this blog) and this fixed the issue. I also had to write a few tests for each responder, and a little snippet to catch if the &format=xml was included in the request. Then just load the xml content rather than html, and mark a flag saying it was to be left as xml.

A note for anyone using IntelliJ to work on some ruby project, there used to be an issue with opening the project structure, but they just released a new update for the ruby plugin which fixed the issue.

I am still finding it difficult to test the Limelight players for my project, mostly because I need to require the Limelight gem, and it simply refuses! I am trying to get the newest version of jruby, which might fix the issue, but I had done this in a previous project last year and it worked fine :/

No comments:

Post a Comment