I wrote this before your last update to the bug. I thought I may as well still send it.

William Sobel wrote:

On Mar 14, 2009, at 3:21 PM, Amanda Waite wrote:

I'm still using 2.1.2, mainly because of all the deprecation messages that I kept getting. The problem that this ticket related to was that if something does go wrong in doAddEvent and doAddPerson, and a user or an event are not added then the driver won't catch that and the op will still succeed.

I'm using 2.2.2 and have not had any deprecation warnings. Please be specific about the warnings. It looks like there are checks for failure in there already, except now we keep getting the warnings that we aren't following the redirects. I think it would be easier to follow the redirect and check for the successfully added message. This will be easier than all the additional logic in there.

The redirect warnings (actually infos) are an issue with the Apache HttpClient, it's not allowed to follow redirects from POST requests so we handle them manually, unfortunately we also get the annoying info messages. I have checks for failure but as described in the original bug, a failure to add a user or event is just indicated by a flash message on the current page. To the driver this can be detected by the fact that the return code was SC_OK and not SC_MOVED_TEMPORARILY. This means in the switch statement for SC_OK you can scrape the response for the flash message. This is what I do in the driver currently. This also means we only need to check those responses that have probably failed for errors and not check every response for success.

As for the deprecation messages:

development.log:DEPRECATION WARNING: country_select will be removed from 2.2.0. http://www.rubyonrails.org/deprecation/list-of-countries has more information. See http://www.rubyonrails.org/deprecation for details. (called from country_select at /var/ruby/1.8/gem_home/gems/actionpack-2.1.2/lib/action_view/helpers/form_options_helper.rb:138)

Which isn't a problem of course until you use 2.2.2 when as you say, you need to add it back manually.*

*

What do you think?
Are you changing the base Rails version to 2.2.2 now? I'm fine with that and I'll move to the latest bits after Community One in NY this week. After that I can probably start systematically working through all of the possible Use Cases and failures.

Amanda


Cheers,
- Will Sobel


Reply via email to