Introducing Bieber.ly

justin-bieber-breaks-neck

Last night at The Riot HQ we had a hack night. It was an awesome night of beer, pizza and hacking.

From the hacking emerged the most awesome URL shortener…Bieber.ly. It even got on Techcrunch!

Big thanks to @elliottkember, @dizzup, @juliancheal, @philsturgeon and of course @theriothq for holding such a great night.

Scalarium CLI

zeppelin

We use Scalarium for a number of client and in house projects. It’s awesome; you should check it out if you use, or plan to use Amazons EC2.

However, currently, the only way to deploy your application is to login to the Scalarium website and press the deploy button. This is pretty simple but I miss a CLI.

So let me introduce you to the Scalarium CLI gem.

First things first…Install the gem.

Add scalarium.yml in your config folder. It should look something like:

You will find the slug of the application inside the URL:

scalarium slug

Then from the Root directory, just run:

Or if you wish to run migrations:

For more information just check out the README.

Happy Christmas!

The first 50 people to send an email to ilovestickers@railslove.com, with their postal address, will receive some lovely Railslove and Nybbl.me stickers!

large_photo
yey-stickers

Rspec Is Lovely

Several months ago my choice of testing framework was TestUnit + Shoulda. Rspec looked good, but I didn’t see what made it particularly special.

When working on a client project which was using Rspec I decided to properly look into it. What I found was that it made my tests incredibly organised and very easy to follow. Below are some methods I take when writing Rspec tests.

Describes

Don’t skimp on them! If you find your “it”s becoming too long or describing too much then it is usually a good sign that you should be using a describe.

Setting The Subject

I find setting the subject great for focussing your testing. Setting the subject tells Rspec…what the subject of the is test is. i.e. what these tests are in reference to.

Its

This is probably easier to just show in code rather than describe…

Context

This is great for outlining different outcomes for a method:

Let

From the docs: “Generates a method whose return value is memoized after the first call.”

Specify

Specify is just like it. I like to use it when I am not testing against a subject:

One Last Thing

You can specify Rspec configurations in a .rspec file. I have the color and profile options which: make pretty colours and will display the 10 slowest tests.

That’s not all! You should definitely look at the Rspec source code.

Happy Rspec’in!

Edit:

Thanks to @bumi and @clemensk for reminding me about expect.

Using expect is a lot nicer than using the good old lambda route:

Say Hey to Nybbl.me

nybbl

This week we launched a new project called Nybbl.me.

“Nybbl.me gives you an easy way to share and consume knowledge.”

We hope you enjoy it! You can follow any developments over on Twitter or on the Nybbl.me blog.

Next Page →