Posts Tagged ‘rails’

Debian packages for Phusion Passenger 2.0.5

Saturday, December 6th, 2008

The debian packages of Phusion Passenger 2.0.5 are available since this night on debian.tryphon.org.

Like the 2.0.4 ones, they are based Brightbox ubuntu packages released few hours before.

Patchs, on runtime dependency with apache2 mpm worker, have been merged.

Debian packages for Phusion Passenger 2.0.4

Tuesday, December 2nd, 2008

The Debian packages for Phusion Passenger 2.0.4 are available on the debian tryphon repository.

It’s a small backport from ubuntu packages provided by Brightbox.

The installation instruction are almost the same but use the debian tryphon repository instead of brightbox one …

Phusion Passenger™ debian packages are available for etch, lenny and sid on i386 and amd64.

Update: The etch/stable packages are now available.

GitHub repository for Google Analytics with multiple accounts plugin

Friday, November 28th, 2008

The Google Analytics with multiple accounts plugin is now published into my GitHub repository.

I forked the rubaidh’s plugin and applied the current patch created this summer for Bonnes-Ondes.

Google Analytics ‘rubaidh’ plugin with multiple account support

Monday, August 11th, 2008

For the Bonnes-Ondes project, we want to allow users to follow their listener visits. The solution is simple : associate a Google Analytics tracker id to the Bonnes-Ondes host … but the Google Analytics ‘rubaidh’ plugin supports only a single Google Analytics account.

A recent patch allows to override the Google Anaytics tracker id, but we wanted to use several tracker ids in our case.

A small patch later and the Bonnes-Ondes controller can associate a Google Analytics account to the request. The after filter generates google code for several accounts. This plugin fork uses a GoogleAnalytics instance for each account and concats the code of each found instance.

(more…)

“Java, c’est legacy”

Tuesday, December 11th, 2007

.. et oui … entendu hier à Paris On Rails. Après avoir 10 ans à essayer de prouver que Java était un vrai langage qui avait tout sa place .. l’objectif est atteint voir .. dépassé :-)

Bon, sinon, le propos était plutôt sur Rails … Quelques conférences intéressantes en particulier celles de Nicolas Mérouze sur HAML et SASS, Christophe Porteneuve sur Prototype (snif, j’ai tout compris) ou encore Jean-Michel Garnier sur RSpec (enfin quelqu’un qui parle de CruiseControl.rb :-) ).

Le démarrage de Rails en France est apparemment plus poussif en France que dans d’autres pays. Mais ca fait plaisir de voir qu’on est pas tout seul à rouler sur les mêmes .. rails :-D

Fix Rails Hotkeys underscore limitation

Friday, November 23rd, 2007

I’m using the Rails Hotkeys plugin for a moment in gedit. There is a small bug, a bit painful : if you’re editing a file customer_report.rb, Rails Hotkeys uses only customer as basename to open related file. So you’ll open customer.rb and not customer_report_test.rb :-(

Here is a small patch to fix Rails Hotkeys underscore limitation. The basename is now computed by removing only _controller, _test or _controller_test to the file basename.

If needed, the two lines to install :

cd ~/.gnome2/gedit/plugins/rails_hotkeys
patch < 2007-11-23-rails_hotkeys_underscore_limitation.patch

Test ActionMailer for a multipart mail

Thursday, November 22nd, 2007

When your ActionMailer creates multipart mails with both html et text bodies, your unit test can become a nightmare. The default policy to test ActionMailer (provided by the generated testcase) is comparing the created mail content with a static fixture. It’s very difficult to maintain. And this approach is impossible with a multipart mail. Several things in the encoded mail are randomly created (like the mimepart boundaries).

Another policy is promoted by Dave Thomas in his book Agile Web Development with Rails or Shanti A. Braford. The principle is simple : test only that the important information is present into the mail body.

This approach is meanful in a html/text mail. The two parts contain often the same important information. So the same assertions can be performed on the two parts of the mail :

sent.parts.each do |part|
  assert_match #{user.name}, part.body, "#{part.content_type} invalid"
  ...
end