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.

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:

Locate those Missing Puts!

Do you co workers sometimes forget to remove their #puts; or do you sometimes forget where you put* yours? …


Now you can find them ;D

* Pun intended

This year´s Rails Rumble

As co-founders of Coworking Cologne and lightweight sponsors of this year´s Rails Rumble we´re happy to announce that Coworking Cologne opens its doors for Rumble Rails Rumble teams during the 2010 Rails weekend from October 16th-18th and offers free work spaces to use during the 48 hour competition. The competition will begin Saturday, October 16th at 2am (MEZ) and continue until Monday, October 18th at 01:59am.

If your team is looking for a space to work on your app and hang with other Rumblers feel free to join us at Coworking Cologne just give us a call or contact at team@railslove.com.

For more information about the space check out coworkingcologne.de.

Freckly + Freckly App

At Railslove we use Freckle and Pivotal Tracker for our client projects.

We wanted a super simple dashboard that just showed us a list of our Pivotal projects and the total number of hours we’ve worked on that project.

You can find the project over here.

I will eventually get round to writing some decent documentation for it, but to roughly get started:

As an added bonus, I didn’t like any of the existing Ruby library so we bundled the code we were using and released it as a gem. It currently only two of the API calls, mainly because that is all we needed. I do plan on extending the gem to cover the whole API.

Heres a quick run through

← Previous PageNext Page →