On 12/14/10 - 11:31:17PM, Mohammed Morsi wrote:
This is a rework of the original deltacloud rails 3 patch to split changes into multiple patches and add further support and compatability fixes to make the deltacloud aggregator rails 3 compliant.
Once again the app itself and the spec suite are fully working but there is a bit more work that needs tbd to get the cucumber feature suite functional.
Here are some specific points of interest about this patch:
I tested it on Fedora 14, shipping with Ruby 1.8.7, and with Rails 3 installed via 'sudo gem install rails -v 3.0.1'
All usptream gem communities seem to be on the ball concerning the adoption of rails 3. I did have to make a few changes to authlogic (2.1.6) to get rid of some annoying deprecation warnings, but these don't break anything and we can patch the rpm as needed. These changes are in /usr/lib/ruby/gems/1.8/gems/authlogic-2.1.6/ lib/authlogic/session/callbacks.rb (s/save_without_session_maintenance(false)/save_without_session_maintenance(:validate => false)) lib/authlogic/acts_as_authentic/password.rb (s/save(false)/save(:validate => false) lib/authlogic/acts_as_authentic/logged_in_status.rb (s/named_scope/scope)
I took care of everything else outstanding for rails 3 adoption outlined in the first patch (validation methods, error messages, views and logging updates, etc) and merged the patch into the new deltacloud updates from the next HEAD. The only remaining item AFAIK is to fix the features suite
Rails 3 has many various changes:
gem dependencies are now managed via Bundler and listed in the Gemfile. Install them with 'bundle install' (as opposed to 'rake gems:install' as instructed in the install docs).
routes.rb has been overhauled, and I had to make some changes in the app to bring things in line
all the scripts/ have been replaced with scripts/rails
the '-' operator is no longer supported in haml, rather use '=' for all ruby code
many deprecations, api updates, and more
One thing that is not clear to me; can any of these patches go in without breaking rails 2? Alternatively, would it be relatively easy to split some of these out so that we could apply them without breaking rails 2?
I'm not trying to make a ton more work for you, but if we can slowly feed pieces into the repository, I think that would make it easier than having a flag day. If we can't do this, of course, that's fine; just tell me :).