Posts Tagged ‘rspec’

Configatron 2.2.0 Released, now with Ruby 1.9 and JRuby support!

Thursday, January 1st, 2009

Happy New Year everyone!

With the help of the absolutely amazing multiruby library and an edge version of rspec from GitHub, the latest version of Configatron now supports JRuby 1.1.6 and Ruby 1.9.1rc1. There are no other functional changes to the library, so it’s a full drop in replacement for vesion 2.1.6.

I highly encourage everyone to checkout multiruby and start upgrading their libraries so we can all move to 1.9 quicker, which means more speed and more power. Once we’re all in 1.9 land we can really make use of some of the amazing features it provides.

Anyway, I’ll be working on upgrading all my libraries and applications to work on 1.8 and 1.9, and hopefully JRuby, over the next couple of months. So be on the look out for a new versions of Cachetastic, Genosaurus [update: Genosaurus already works with 1.9 and JRuby. Hoorah!], and, of course, Mack.

Release 0.8.2

Sunday, November 30th, 2008

Hey there folks, sorry for the long wait for this release, but it’s here. It’s been a long November for yours truly. I’ve had to find a new job. I’ve had pneumonia. We, at least in America, have celebrated Thanksgiving. And, of course, who can forget RubyConf 2008?

So with that said, what’s in 0.8.2? Honestly, not a whole lot. There are a couple of bug fixes, a button_to_remote (think submit_to_remote in Rails) helper, and deferred routes. More on deferred routes in a moment, as it’s actually a pretty cool feature that only Mack and Merb share. And finally there is bundled gems.

Bundled Gems

What do I mean I say ‘bundled gems’? Well, because of the rather large number of gems that get installed with Mack, and because of some gem version dependency issues, Mack is now bundling it’s third party dependency gems inside itself. For example, mack-facets used to rely on the gems ‘facets’ and ‘english’. Those gems are now bundled inside the mack-facets gem and now longer need to be downloaded and installed by end users. This should make installing Mack super easy. It should also make dealing with having multiple versions of Mack installed on your system easier to deal with and maintain.

Deferred? Routes

So what are deferred routes? Ezra wrote a really great write up back in April. The idea is simple, with newer web servers such as Thin and Ebb, you can tell them to spawn a new thread to handle particular requests, such as long running processes like file uploads. This can really help speed things up as server can process regular requests using an event machine model, which is very fast, but can be really slow and block the server for longer processes. Now those processes can spawn into their own threads and not block the server.

In Mack 0.8.2 you can mark your routes with a deferred? => true option which will trigger this behavior. It’s much more advanced than the similar feature that can be found in Merb, which requires a separate configuration for your deferred actions, and the urls have to be ‘hard coded’. Mack let’s you use all the dynamic power of your routes, like you would want to. It’s just another option on the route itself. For a great tutorial on using deferred routes, check out the following page on www.mackery.com:

http://www.mackery.com/routing/deferred_routes

Upgraded Dependencies

A few gems have been upgraded as part of this release, the big ones include DataMapper to 0.9.7, ActiveRecord to 2.2.2, and Haml to 2.0.4.

Changelog:

  • [#237] Fixed render :rjs throws errors
  • [#236] Upgraded to ActiveRecord 2.2.2
  • [#235] Upgraded to DataMapper 0.9.7
  • [#230] Upgraded to facets 2.4.5
  • [#229] Upgraded to english 0.3.1
  • [#227] Removed WEBrick logging
  • [#226] Bundled gems.
  • [#225] Removed dependency on Thin
  • [#223] Fixed mackery console fails
  • [#148] Added button_to_remote helper method.
  • [#16] Added deferred? routes.
  • gem: active_record 2.2.2
  • gem: data_mapper 0.9.7
  • gem: addressable 2.0.0
  • gem: facets 2.4.5
  • gem: english 0.3.1
  • gem: rspec 1.1.11
  • gem: haml 2.0.4

Release 0.6.0

Wednesday, July 16th, 2008

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

0.6.0 Coming VERY soon!

Thursday, July 10th, 2008

Well folks, as you know, things have been a bit quiet on the Mack front these days, but it’s all been for a very good reason. We’ve been prepping the next release, 0.6.0. This release is expected to hit the streets sometime the beginning of next week. There’s a lot of really great stuff in the release, DataMapper 0.9.2 support (finally!), RSpec testing support, a mack-more project to house a bunch of cool Mack related gems, Exception handling in Routing, and more… A full list will be available when the release happens.

In addition to the great new features, a lot of bugs have been worked out, and more of the API has solidified further. Because of some of these changes I’ve posted an upgrade guide from 0.5.x to 0.6.0. This guide can be found on the wiki

This guide is meant to make upgrading as quickly and as a painless possible. There are a couple of big changes, but they should be fairly simple to make.

I’m very happy with this release, it’s been long toiled over, and it shows. It’s very stable, fast, and fun. I think everyone is really going to like it. 

As more info about the release becomes available, I’ll keep everyone posted.