After a 6 month contract gig, the employer told me they were going to bring me on full-time. I stopped interviewing thinking I had a full-time spot. They told me two weeks before the end of the contract they didn't have anything else for me and I was cut at the beginning of January after our project ended.
I did find a job with a small company, but after three days, realized they were looking for a Javascript developer, not a front-end developer. From then on, I was out of work for almost four months. Luckily, I picked up a freelance project which filled the gap during the time I wasn't technically "working".
On my resume, I put it was a private freelance project that lasted the time I was unemployed (four months). Since it was relevant to my work history, nobody asks about it, or just wants me to go over what we did and the technologies we used.
The interesting thing is when recruiters see "freelance" projects they instantly equate it with being unemployed. While the actual HR people at the companies I interviewed with never made the same connection. To them, work is work as long as its relevant to your career.