Using SimpleCov with FactoryGirl
FactoryGirl is a great replacement for your Ruby-on-rails fixtures. They offer more flexibility for generating stubs and mack-ups for your automated testing.
SimpleCov is the test coverage tool for Ruby 1.9.x (Use RCov for Ruby 1.8.x).
Using both in conjunction requires two extra lines in your test/test_helper.rb file not covered by any documentation. This will prevent you from getting messages like "Factory not registered: " or "uninitialized constant Test::Unit::TestCase::FactoryGirl (NameError)".
My test_helper.rb file looks like:
- Code: Select all
-
require 'simplecov' SimpleCov.start 'rails' ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' # The following two lines of code will reinitialize Factorygirl: require 'factory_girl' FactoryGirl.reload class ActiveSupport::TestCase ... end
Kantoorruimte voor collegazelfstandigen
Per 1 februari zijn wij intern verhuisd naar onze nieuwe ruimte op Timorplein 30 te Amsterdam.
Daar is nog plaats voor zeker drie collegazelfstandigen die graag een bureau willen bemannen op één van de leukste locaties van Amsterdam.
Het Timorplein is een volledig gemoderniseerd bedrijfsverzamelgebouw in de prachtige oude ambachtsschool. Op de begane grond zit grand-café en bioscoop Studio-K. Er is een gratis fietsenstalling en op de gang tref je diverse creatieve bedrijfjes aan. Wij maken gebruik van een gezamenlijke keuken.
Onze kantoorruimte (totaal 90m2) is nog eens voorzien van een eigen vergader- annex lunchkamer.
Wij zullen met ongeveer 5 mensen in één ruimte zitten. Genoeg plaats voor gezelligheid, maar niet voor schreeuwerige werkzaamheden.
De huur is 285,- excl BTW per maand inclusief voorzieningen zoals gebruik van keuken en een glasvezelverbinding, opzegtermijn 3 maanden.
Klik hier voor een foto van het pand.
Met vriendelijke groet,
Rolf
Linda
Jan
Fix jQuery .replaceWith() method to perform in IE8
This article applies to jQuery 1.4.4
The jQuery .replaceWith() method replaces a DOM-element and all of its children by another DOM-element. This function is ideal for use in Ajax applications.
The .replaceWith() method however internally uses the jQuery .remove() method which in Internet Explorer can be dramatically slow. There is a tric however to improve this performance radically by emptying the DOM-element first before removing it.
It enhanced my performance in IE at least 10 times!
Here's the line:
jQuery(selector).empty().replaceWith(newContent);
Show jQuery tabs promptly
jQuery tabs are just fabulous!
But if you have a lot of content then you might see your tabs being built up when jQuery applies them.
Here's the solution. Just hide the tabs HTML element initially:
<div id="my_tabs" style="display:none;">
Then use the following jQuery Tabs Event to display them when they are ready:
$('#my_tabs').tabs({
show: function(event, ui)
{jQ(event.target).not(':visible').show();}
});
By using jQuery's .not(:visible) filter method show() is executed only once.
Migrating mail from MS Outlook to Apple Mail
Ever tried moving your mail from MS-Outlook to Apple Mail? It's not even supported by neither Microsoft nor Apple. Apple refers to three third-party applications. I tried one - the cheapest. It's O2M by Little Machines but did not work out for me.
What a hassle
O2M is the paid option. It generates MBOX styles mailboxes which you can import directly into Apple Mail. Unfortunately Apple Mail will not set correct headers and time stamps on importing. It will leave your sent-box a mess although this is not immediately clear.
The other - free - option is downloading Thunderbird on your Windows machine and import your Outlook into it. Then you just copy your Thunderbird profiles folder to your Mac and choose import from Thunderbird. Unfortunately this option cannot be trusted neither. Some folders are ignored, attachments as well, headers are incorrect.
Eudora Mailbox Cleaner
Luckilly there is Eudora Mailbox Cleaner to the rescue. It handles more than the name suggests. You can just drop your Thunderbird profiles folder - compact your folders first - onto this wonderfull app and it will correctly import your mail folders and attachments. After having done that, just rebuild every folder in Mail - try applying a short-cut - and you're done!