I spent a bit of time yesterday/today going through the Deltacloud Aggregator,
updating the necessary components to work with Rails 3. Obviously I won't push
for this patch to be included until Rails 3 is in Fedora, but the good news is
that most everything seems to be working in the aggregator against it. 

Some more work needs to be done to get the feature suite fully functional again 
and
some additional fixes are needed for various things (mostly to not rely on rails
functionality which is there but deprecated), but currently the webapp itself
works as it does w/ Rails 2.3.x and the spec suite is 100% 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'

  - Rails 3 has many various configuration 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).
       We actually may be able to use this to our advantage by
       parsing this file in our build system and using it to
       generate the Requires in the rpm spec

     * 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

  - All the gems and plugins we depend on seem to have been updated
    to work against Rails 3. The upstream communities seem to be on
    the ball regarding this matter

  - I updated the spec suite to fully work against rails 3 and the
    updated dependencies. I also did alot to fix the cucumber feature
    suite, but this is not fully finished. I didn't touch the test suite 
    at all as this is deprecated, and should be removed at somepoint soon

  - Some things have been deprecated / changed in the Rails API which
    affect us:
      - overriding the 'validate' method in the models is deprected and
        we need to update those classes to register our own validation
        method  (eg validate :foo_validation_method)

      - authlogic doesn't work 100% with rails 3, and I had to add a small hack
        to app/models/user_session.rb to get things working again
        (see relevant comment in that file)

      - error_messages for forms is not directly supported in rails 3 as it was 
in 2,
        rather its a plugin that needs to be seperately installed
        (and thus we need to package)

      - log_error doesn't seem to be present in rails anymore, so I had to 
substitute
        it in the application controller with what the method used to do 
(simply log
        the error to the rails logger)


I'll continue to fix the app to bring it in line with the new way of doing 
things
and we might need to change a few things here and there, but for the most part 
everything looks pretty good concerning supporting Deltacloud on Rails 3.

  -Mo
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to