From: Mark Bates Date: 2008-04-26T03:44:05+09:00 Subject: [ANN] Mack Framework 0.4.7 http://www.mackframework.com/ 0.4.7 is a MUST have release. It fixes a few good bugs, like the ability to upload files now works! Plus it introduces a few nice little goodies. File uploads are now pretty easy to do. There’s a new Mack::Request::UploadedFile that helps to wrap the Hash that Rack gives you when you upload a file. Here’s a simple example of it being used: class UploadsController < Mack::Controller::Base def create @my_new_file = request.file(:my_new_file) @my_new_file.save_to([MACK_PUBLIC, "uploaded_files", @my_new_file.file_name]) end end That’s it! That’s all you need to upload a file! I’m going to add file uploads to the blog demo over the next few days. You can now do ‘namespaced’ routes, such as Admin::UserController. You can very simply map them in your routes.rb as: r.resource "admin/users" There’s now a new rake task, generator:list, that shows all the generators available to your app. Darsono Sutedja gets the prize for being the first person, other than myself, to contribute to Mack. Thanks a ton Darsono! It’s much appreciated. All of the generators now use the Genosaurus generator system. Not really that exciting, but it makes for a nice, cleaner code base. There’s a few other things in there as well. The changelog below has a few more things. Enjoy! Changelog: * Added Mack::Request::UploadedFile class to make dealing with file uploads easy. * Fixed bug where if a controller didn't exist it wasn't checking the public directory. * Generated DataMapper models no longer extend DataMapper::Base, but rather 'include DataMapper::Persistence'. This corresponds to the 0.9.0 upcoming release of DataMapper. * Fixed a bug in request.params that was making file uploads into strings. * Namespaced resourced routes, such as Admin::UserController, now work. * Added rake generator:list task to list all the available generators. * scaffold generator now creates a stub functional test. * model generator now creates a stub unit test. * Rake tasks in plugins now show up in the Rake tasks list. * All generators, including the 'mack' binary are now using Genosaurus. * [dsutedja] initializer will load MACK_APP/controllers/default_controller.rb if it exists * [dsutedja] added link_image_to and image_tag to html helper. * gem: thin 0.8.1 * gem: genosaurus 1.1.1 -- Posted via http://www.ruby-forum.com/.