My co-worker Nando and I are testing thoroughly ruote-rest trunk
version. We've come up with an issue related to expressions and date
formats. We're using ruby 1.8.7 (2008-08-11 patchlevel 72)
[i486-linux] - included with Debian Lenny.
Here is a way to get the bug (web browser):
1. Launch the default process (PUT /processes).
2. GET /expressions for that process and select one of them (i.e. 0_0_0)
3. Update (PUT) that flowexpression (0_0_0) (YAML format)
4. Now again GET /expressions for that process. The error will show as follows:
undefined method `ctime' for "2009-06-08 11:58:40.001874 +02:00":String
ruote-rest/lib/helpers/application.rb:77:in `display_time'
The error is similar when using a REST client with "Accept: application/xml
undefined method `httpdate' for "2009-06-08 11:44:04.057000 +02:00":String
ruote-rest/vendor/ruote/lib/openwfe/util/xml.rb:156:in `to_httpdate'
Interestingly enough, there are no errors from the REST client when
using "Accept: application/json"
For more info, please refer to the attached file.
Best regards,
Gonzalo
Hello Gonzalo and Nando,
thanks for the detailed report and the test case, very classy !
I have fixed that. I'm not very happy about the fix though, well,
we'll do better with ruote-kit and ruote2.0
http://github.com/jmettraux/ruote/commit/53a147f3f2b3893d555f9b0e579e01bb18053ecc
http://github.com/jmettraux/ruote-rest/commit/4fee6c3ab7d01427f748b9915c4a0814dc78cbe8
Thanks again !
--
John Mettraux - http://jmettraux.wordpress.com