A couple of days ago I found a nice Vim plugin to show the flog scores of your Ruby code insise your Vim editor.
But because it wasn’t really displayed the way I wanted, I forked and customized it.
Now what is Flog?
Flog shows you the most torturous code you wrote. The more painful the code, the higher the score. The higher the score, the harder it is to test.
Here is a screenshot of what flog integration looks like in Vim:
As you can see you now always have a number in front of each
def block. This number is the flog score, the higher, the more complex your code is.
In case you would like to use it, you can install it by following these steps.
All the credits for this plugin go to @skammer because he initially wrote the plugin, I just jumped on it and changed it a bit.
A couple of weeks ago, ruby-play was imminent and in such a case one should always try some new things. Heroku is hot, so it had to be something I could deploy on Heroku. Sinatra 1.0 was released, so it had to be something using Sinatra.
More? Sure. To experiment with something else then ActiveRecord I used Sequel.
Does it blend? Sure!
A new example app was born: SPIC. Spic (secret pictures) allows you to upload files to S3 for your sharing pleasure.
Heroku really is fun to use. One can setup Spic in only a matter of seconds.
git clone git://github.com/atog/spic.git
git push heroku master
heroku config:add S3_KEY=your_s3_key S3_SECRET=your_amazon_secret S3_BUCKET=your_bucket SECRET=your_own_personal_jesus
It was fun. It was short. It is good.
We use github for all our projects, and we use Campfire as our office backchannel. So when we saw this post we (or maybe it was just me, I’m a sucker for this kind of stuff) knew we had to have a way to easily use this on all our projects; so here it is: Capfire
What it does
Besides being a kickass gem name, it sends a message to Campfire each time you deploy an application. In this message is a link to Github’s compare-view, so you can easily scan just what has changed since your previous deployment. Since it’s being sent to Campfire everyone can take a peek. Great !
First install the gem:
gem install capfire
script/generate capfire -k campfiretoken -a campfireaccount -r campfireroom
This will add a snippet to your
config/deploy.rb to include the capfire capistrano script and will create a file in your home folder named .campfire containing your token, account, room and a configurable message (the parts between ##’s are substituted).
Like this (be careful with your spaces):
campfire: account: 10to1 token: thishastobeyourtoken room: General message: "I (#deployer#) deployed #application# with `cap #args#` (#compare_url#)"
If you’re not sure about this automagically thing, you can do it by hand as well, create the
~/.campfire file and add the following to your
begin require 'capfire/capistrano' rescue Object # Don't force other users to install Capfire. end
~/.campfire file already exists you can just run
script/generate capfire to add the snippet to your deploy script in each app. You can run this as much you want it will only add the snippet once. No worries.
If someone else on your team doesn’t have
capfire installed, he won’t notice a thing (but be sure to mock him).
I hope you, dear reader, like it as much as we do :)
Maybe you know it, maybe you don’t but yUML is awesome!
Create and share simple UML diagrams in your blogs, wikis, forums, bug-trackers and emails.
Yesterday I was creating a new class diagram using yUML and besides it’s a great product it was a bit cumbersome working in a small textarea and pressing ‘Generate!’ (all the time). I fired up textmate and created a diagram using the yUML syntax. A couple of minutes later I had ruby script which generated the diagram using yUML by taking a text file as input.
sudo gem install yumlcmd
yumlme -f your-diagram.txt
Syntax overview: http://yuml.me/diagram/scruffy/class/draw
I hope you like it as much as I do :)
Sign up for our newsletter
Who’s got the mic?
Architecture & Design
Koen Van Der Auwera
Bob Van Landuyt
Nathan de Witte