Well, it’s finally here, Mack 0.6.0! This release has taken a long time, but I feel that it’s definitely worth it. This has to be the best release of Mack to date. During this release the Mack dev team grew by 100%, Darsono Sutedja, previously a contributor to Mack, is now a full time Mack core team developer! Darsono has done an absolutely great job on this release, thanks Darsono. With that out of the way, let’s jump straight to the good stuff, shall we?
DataMapper 0.9.2 Support
At long last Mack supports DataMapper 0.9.2. Because previous versions of Mack used DataMapper 0.3.2, there is some upgrade work that you’ll need to do, but trust me, it’s worth it. DataMapper 0.9.2 is a gigantic leap forward from 0.3.2. If you have problems installing the data_mapper gem, make sure that you don’t have gems.datamapper.org in your source path for rubygems. You can remove it with the following command:
gem source -r http://gems.datamapper.orgÂ
RSpec Testing Support
RSpec is now the default testing framework for new Mack applications. This innovative testing framework makes it fun, and simple, to do behavior driven development. If you haven’t yet played with RSpec, I would highly recommend it. I wasn’t a big fan of ‘spec’ testing prior to meeting Adam French, of DataMapper fame, and he turned me on to the joys of rspec. I think you’ll like it too, if you give it a chance.
mack-more
There is now a mack-more package. This will house all the optional gems available to the Mack framework. This include things like HAML and Markaby support, localization, etc… Use what you want, ignore the rest. This will help keep the core code clean, light, and of course, fast.
Localization/l10n Support
Darsono did a great job with the mack-localization gem. There is now optional support for internationalization in Mack applications. Check out the gem, it’s definitely worth it if you need to support multiple languages for your web application.
Much, much more!
Of course, there’s a lot more Mack than the stuff I just mentioned, there’s tons of bug fixes, some code clean up, some API changes, transactional testing support, the ability to catch specific errors in routes and have them diverted to a controller/action for handling.
There is a great wiki entry on upgrading your existing Mack project to 0.6.0 here. I highly recommend reading it whether or not you have an existing Mack application.
With this release the Mack team is also fully embracing Lighthouse. If you find bugs, or have suggestions please visit http://lighthouse.mackframework.com and log them there. You’ll also find the list of features that will eventually be added to Mack.
Changelog:
- INCOMPATIBILITY NOTICE: Moved Mack::Configuration.root to Mack.root
- INCOMPATIBILITY NOTICE: Moved Mack::Configuration.env to Mack.env
- INCOMPATIBILITY NOTICE: Mack::Configuration.* path methods no longer exist. Use mack-paths instead.
- INCOMPATIBILITY NOTICE: Dropped mack_ruby_core_extensions in favor or mack-facets
- INCOMPATIBILITY NOTICE: Mack::Controller::Base is now Mack::Controller (and it’s now a module)
- INCOMPATIBILITY NOTICE: Haml renderer is now part of mack-more.
- INCOMPATIBILITY NOTICE: Markaby renderer is now part of mack-more.
- INCOMPATIBILITY NOTICE: Changed request param’s accessor routine, from params(key) to params[key]
- INCOMPATIBILITY NOTICE: Test::Unit::TestCase is no longer the default testing framework, RSpec is. If you wish to use Test::Unit::TestCase add the following config parameter to your config/app_config/default.yml file:
  mack::testing_framework: test_case
- INCOMPATIBILITY NOTICE: ENV["_mack_env"] and ENV["_mack_root"] are no longer supported, please use ENV["MACK_ENV"] and ENV["MACK_ROOT"], or just Mack.env and Mack.root
- INCOMPATIBILITY NOTICE: MACK_DEFAULT_LOGGER constant is no longer available. Please use Mack.logger instead.
- INCOMPATIBILITY NOTICE: The ApplicationHelper module is now deprecated. Please move view level helpers into Mack::ViewHelpers::* and controller helpers into Mack::ControllerHelpers::<controller_name>
- thin.ru and thin.yml are no longer needed, you may delete them.
- RSpec assertions are now automatically added.
- Added a Mack::Testing::Response class to make testing of responses easier.
- moved test_extensions to testing and added the module Testing to the files in it.
- Added a dependency on mack-more
- Added a set of Rake tasks to update existing Mack applications.
- [#30] Added Mack::Logging::Filter to filter out unwanted parameters from the logs.
- In routing you can now define a route that will catch an Exception from another controller.
- ORM will not be initialized if the app never specify which ORM to use.
- All Mack unit tests are now written using rspec-1.1.4.
- mack command now takes an optional -t flag to determine which testing framework to use–value could be test_case or rspec [default]
- new setting added to app_config: testing_framework
- gem: cachetastic 1.7.2
- gem: application_configuration 1.5.0
- gem: erubis 2.6.2
- gem: genosaurus 1.2.1
- gem: thin 0.8.2
- gem: rspec 1.1.4