Giles Bowkett
2008-Jan-31 21:20 UTC
[Cruisecontrolrb-users] thoughtworks site down? / another tiny patch for Rails 2 compatibility
Hi - couldn''t find the dev list because it appears http://cruisecontrolrb.thoughtworks.com/ is throwing 503 errors. But, to get CCrb running with the new ActiveSupport, I had to do this: http://s3.amazonaws.com/giles/ccrb_duration_patch.jpg (Sorry to submit my patch in JPEG format but you know what they say, anything for a weird life.) The changes are on lines 18 and 27: ".value" added to the end of attr_accessor calls to Configuration, passed as args to sleep. (The file is app/models/polling_scheduler.rb.) The reason is that 30.seconds (inside app/models/configuration.rb) won''t return a time interval any more, but an ActiveSupport::Duration, which has a value attribute which is a time interval. I''m still having issues running it under Rails 2, but this fix gets the builder loop working with ActiveSupport 2.0.2. -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com
Giles Bowkett
2008-Jan-31 21:21 UTC
[Cruisecontrolrb-users] thoughtworks site down? / another tiny patch for Rails 2 compatibility
Just a note, a better version of the same patch would probably include something like this: class ActiveSupport::Duration alias :to_time_interval :value end -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com