Archive for August, 2008

Mack Sake Tasks

Sunday, August 31st, 2008

Thanks to Mack user, DeLynn Berry, for writing up some great Sake tasks! Now getting up and running with Mack development is even easier. Thanks DeLynn!

All you need to do is install Sake.

Once Sake is installed you can install the Mack sake tasks like so:

sake -i http://www.mackframework.com/mack-dev.sake

You can see a full list of tasks with the following command:

sake -T

Configatron 1.0.0 Released!

Friday, August 29th, 2008

Configatron makes configuring your applications and scripts incredibly easy. No longer is a there a need to use constants or global variables. Now you can use a simple and painless system to configure your life. And, because it’s all Ruby, you can do any crazy thing you would like to! API

Note: Configatron is a general purpose library, that can be used in ANY Ruby application or script, it’s not Mack specific. So go on and configure to your hearts content. :)

$ sudo gem install configatron

Examples

Simple

Now, anywhere in your code you can do the following:

Viola! Simple as can be.

Now you’re saying, what if I want to have a ‘default’ set of options, but then override them later, based on other information? Simple again. Let’s use our above example. We’ve configured our ‘database_url’ option to be “postgres://localhost/mack_framework_rocks”. The problem with that is that is our production database url, not our development url. Fair enough, all you have to do is redeclare it:

becomes:

Notice how our other configuration parameters haven’t changed? Cool, eh?

Namespaces

The question that should be on your lips is what I need to have namespaced configuration parameters. It’s easy! Configatron allows you to create namespaces.

becomes:

Configatron allows you to nest namespaces to your hearts content! Just keep going, it’s that easy.

Enjoy!

Patch Releases 0.7.0.1 and 0.6.1.2

Friday, August 29th, 2008

Today two patches to Mack have been released, 0.7.0.1 and 0.6.1.2. They upgrade the version of application_configuration and are highly recommended. There was a bug with application_configuration that could cause it to stop loading configuration settings, which obviously, would be bad. :) Please update your version of Mack accordingly. 

As a side note, Mack will be moving away from application_configuration to configatron around version 0.8.0, but more on that later.

Mack w/ Apache and mod_rails

Tuesday, August 26th, 2008

Thanks to Mack user, Diogo Almeida, there’s a great write up on the wiki on how to configure Apache using mod_rails to host a Mack app.  Thanks Diogo.

http://www.mackwiki.com/using_passenger_phusion_to_host_a_mack_application

Mack Article/Interview on RubyInside

Tuesday, August 26th, 2008

Peter Cooper just posted a very nice article about Mack, which features an interview with me, Mark Bates, over on Ruby Inside. Please check it out:

http://www.rubyinside.com/mack-distributed-ruby-web-application-framework-releases-070-1107.htmlÂ