Geckoboard & Rails 3 Jan 4 2011

As it might be obvious from my previous post, I dig Geckoboard a great deal. It’s a fantastic, useful tool for visualising data at-a-glance. My immediate thought when I got my invite and started to play with it was of course, “what other stats can I hook up to this awesome app?”.

Once I’d gotten Watchy integrated with Geckoboard, and exposed a wide variety of cool, useful widgets based on FreeAgent data, I got thinking about how cool it would be to have a plug-in, easy to use solution for exposing data from Rails apps. Thus, Chameleon was born.

Chameleon is a Rails 3 engine in a gem that you simply add to your Gemfile, and it provides a generator for creating the widget files needed to declare the data you want to expose, and also includes the controller/views to handle requests to render different widget types. Currently it can handle the “number and secondary optional stat” widget, the line chart widget, and the pie chart widget. It handles authorisation for widgets using static keys/tokens, or optional dynamic blocks to be evaluated at runtime, and also allows for public widgets that require no authorisation.

Using Chameleon, I was able to add a widget to let me know how many people sign up on the holding page for my new app Stashlog, in under five minutes - from Chameleon installation through to deployment.

So on to the good stuff - the latest and greatest version of Chameleon, 0.2.0, is now pushed to RubyGems, so simply adding:

gem 'chameleon'

to your Gemfile should work. It’s open source, and available on GitHub, so for anyone that wants to check out the code, or indeed wants to fork it and add to it, then go right ahead! And there is documentation on the wiki on GitHub too, outlining installation, creating a widget, configuring a widget, and the different available widget types.

Any suggestions are more than welcome - this is just the initial release and I plan to improve it and add additional widget types in the future.

Gem: https://rubygems.org/gems/chameleon

Code: https://github.com/ejdraper/chameleon

Documentation: https://github.com/ejdraper/chameleon/wiki

And don’t forget to follow me on Twitter for all of the latest updates on Chameleon, amongst other things!

chameleongeckoboardpluginrails 3 engine