June 10th, 2008 — General, Releases, Updates
This is actually a combined post about 0.5.5.3 and 0.5.5.4. They are both small patch releases, but they both address some pretty big problems.
0.5.5.3:
The new version of Passenger (aka mod_rails) now has support for Rack based applications. In their documentation they show how to use a Mack app with Passenger. The documentation is based on the yet to be released Thin adapter. With that said, both of those systems use a piece of Mack that’s no longer there. Because of that I’ve restored the small section of code, to make sure those two systems work with Mack. Which is great news.
On some flavors of Unix when you do a Dir.glob you don’t necessarily get back an ordered list of files. Because of that some people we’re getting uninitialized constant errors. This has also been addressed in 0.5.5.3.
0.5.5.4:
A couple of people have reported issues where they were getting the following error even with the most simple application:
“Rack::Lint::LintError: env missing required key QUERY_STRING”
A Mack supporter by the name of Andre Ludwig stepped up to help me try and figure out the problem. I couldn’t reproduce it on the machines I have access to, I suppose that goes without saying, because I could’ve reproduced it, I would’ve fixed it sooner. Anyway, Andre stepped up with both his time, spending most of his Sunday online with me, but also with his hardware. Andre opened up his server to me so I could go in there directly and play with things until I found the problem.
Sure enough, once I got in there, it didn’t take me too long to figure out what the problem was. It turned out to be a conflict between the latest version of Mongrel (1.1.5) and the latest version of Thin (0.8.1). A simple rewrite of the rake server task and voila! problem solved.
So I would like to say thanks so much to Andre Ludwig for all his time and his hardware. I would also like to thank Saji for originally reporting the problem and for doing some troubleshooting for me as well.
As the community grows I can’t help but be awed by not only how much people are loving what Mack is doing, but also by the communities willingness to get involved and help out. Thanks so much everyone!
Changelog 0.5.5.4:
- Fixed the damn Lint error some people were facing!
Changelog 0.5.5.3:
- Restored compatibility with Passenger and the next version of Thin.
- Fixed ‘requires’ out of order in certain flavors or unix. Hopefully.
April 25th, 2008 — General, Releases, Updates
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::UploadFile 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
April 23rd, 2008 — General, News
So yesterday I committed a Mack adapter to Thin. What does this mean? It means that in the next release of Thin there will native support for Mack. That means We can get rid of those silly config/thin.yml and config/thin.ru files. It also means we can make really easy use of all that the ‘thin’ command line executable has to offer.
When the next version of Thin comes out, there will be an update to Mack to support these changes.
April 18th, 2008 — News, Releases, Updates
This is a pretty cool release. First off Thin has been updated to 0.8.0, a rather nice, stable release. ERB has been replaced with Erubis to give a significant improvement in speed, which, after all is one of Mack’s most important traits.
There’s been a general overhaul of the generators included with Mack. Mostly, cleaning them up. With that said things like the scaffold, model, and migration generators have been updated to do what a lot of people have been asking for, that is take a ‘cols’ parameter and build out the generated code corrrectly. This really makes life, very, very simple.
There will be a re-written ‘blog’ tutorial coming out soon to make use of this, as well as migration support that’s now part of Mack.
Very exciting stuff! Enjoy!
Changelog:
- Mack now uses Erubis, http://www.kuwata-lab.com/erubis/, for it’s rendering engine instead of ERB. This makes Mack even faster now! Yippie!
- Added rake generate:model name=<model_name> (optional: cols=<col_1>:<col_1_type>,<col_2>:<col_2_type>) This will also create a migration for you.
- Updated rake generate:migration name=<model_name> (optional: cols=<col_1>:<col_1_type>,<col_2>:<col_2_type>) This will create the proper table migration for you.
- Updated rake generate:scaffold to use the ModelGenerator now.
- ScaffoldGenerator now create input fields based on the type of columns, if any, passed in.
- Overall general refactoring of the generator classes.
- Fixed a bug with request logging not, well, logging.
- gem: erubis 2.5.0
- gem: thin 0.8.0
February 29th, 2008 — News, Releases, Updates
Please allow for mirror prorogation. Thanks to Matt Todd for finding the first official Mack bug! Strangely enough, I actually welcome people finding bugs in Mack. It only serves to make it a better framework.
If you find a bug, please head on over to RubyForge and submit a ticket for it, and I’ll do my best to turn it around as quick as possible.
Changelog:
- Fixed 18487: #convert_security_of_methods ignores new_level param