what_i_am.upto(2010)

Happy new year!

by Christoph Olszowka on Jan.03, 2010, under Misc

It’s a bit belated for sure, but I was stuck at my girlfriend’s family in southern Germany and in the holidays, so there was no time (or reason) to get in front of a computer… A happy new year to all of you. Of course, the title of this blog had to be updated accordingly to 2010. I’ll try and keep more posts pouring in this year!

Leave a Comment more...

Moving Repos and Redmine from SVN to Git

by Christoph Olszowka on Sep.11, 2009, under rails, ruby

Sorry for not posting in a long time (again), but I’ve been pretty busy with summer vacations, work, of course, The Ruby Toolbox and did not have any time to work on some OSS stuff.

What I did do, though, was to migrate two of our major app repositories from Subversion to Git together with my fellow colleague at Capita Unternehmensberatung, Sebastian, who despite being very jealous of my fancy new HTC Hero being so much cooler than his grumpy old T-Mobile G1, joined me on this one :)

Our main goals were to retain our Release Tags from SVN as Git Tags (not Branches!), which worked out perfectly after working through a couple of online resources on this topic, as well as updating our Redmine issue comments and time entries that included references to specific commits to reflect the changes in revision numbering.

For migrating the repositories, I’ve put together the required steps based upon this, this, and this into a gist, which you can work through manually and should end up with a sweet git repo. Only thing remaining is to set up a bare repository on your scm-server (git init –bare) and push everything over there (at least as long as you sticked to the default SVN repository structure of /tags, /branches and /trunk – everything else you’ll probably have to mess around with the listed commands).

For moving Redmine, we created a simple Ruby script which will work through all your git commit messages, create a hash out of the included svn revision id’s (from the initial migration), connect to your Redmine database and update everything properly. It’s also a gist. Remember you’ll have to do this on your Redmine server.

Further instructions and comments are also included inside the two gists, so check them out:

Happy migrating!

1 Comment :, , , , , , , more...

Latest updates in The Ruby Toolbox

by Christoph Olszowka on Jun.25, 2009, under rails, ruby

Note: This is a cross-posting from the new Ruby Toolbox blog. I won’t do these in the future. For all updates on The Ruby Toolbox, please subscribe to the news feed there!

Finally, here is the news post promised almost two weeks ago. In the last two weeks, a couple of updates have found their way to The Ruby Toolbox. Apart from various updates to the layout and other minor improvements, there are three major feature additions, which I will cover in a little more detail.

Projects and Categories listings

In the top navigation bar, you will now find links to listings for categories and projects. They also have some rather nice tooltips, so try and hover them :)

The super-ugly dropdown cateogry selector in the upper right has also been replaced by a fancier navigation which hopefully also addresses the increasing navigation issues that grew out of the old select tag with the boatload of categories that have been added since the Toolbox launched.

Project news

Thanks to the Technorati API, each project now has a listing of blog posts featuring information about it.

The search is done based upon links to the project’s Github repository, so all you people out there writing about something Ruby that is hosted on Github and featured here, please remember to link up the project repo from within your post!

Assuming your blog is being indexed by Technorati, your post should appear on the corresponding project’s category listing. Please let me know if there are issues with that!

The inclusion of project news from the blogosphere leads us straight to the next big addition:

Feeds

Plenty of people have been asking for them, and yes, they finally have arrived!

Apart from the obvious feed for this latest news blog, there are also feeds for recently added categories, recently added projects and, last but not least, a feed for the aforementioned blogosphere index, which will give you the latest blogposts about projects covered in The Ruby Toolbox.

I hope you will enjoy the new features. Please let me know what you would like to see in The Ruby Toolbox and of course you’re free to report any issues and projects currently missing!

Leave a Comment :, , , , more...

Announcing: The Ruby Toolbox

by Christoph Olszowka on May.01, 2009, under rails, ruby

So, after my return from Cairo and right before heading to Las Vegas for RailsConf tomorrow morning, I have put together a little website called The Ruby Toolbox.

The page is meant to give you information on what Ruby tool from GitHub you could use to do X, Y or Z. The tools are assorted in categories like “Testing Frameworks”, “State Machines”, “Markup Processors” and so on. The projects listed in each category have scores calculated from their respective GitHub repositories’ watcher and fork counts, so you can get an idea which project is the most popular in the dev community.

I hope this will be of use to people i.e. wondering which test framework they should choose from the plethora of options or to find out about alternatives to currently used tools and their popularity.

So, head over to ruby-toolbox.com and drop me a line whether you like it, tweet me @thedeadserious or tell me right at RailsConf in Vegas!

If you want a (your?) project or another category added, please also drop me a line because the categories and projects on the page only serve as a starting point. This will hopefully grow in time!

4 Comments :, , , , more...

Burn like fire in Cairo

by Christoph Olszowka on Apr.13, 2009, under Uncategorized

Sorry for not posting a lot in the last weeks, I’ve been really busy and today I’m leaving for my well-deserved holidays in Egypt, joining my girl and friends who have been there for a couple of weeks already. When I’m back I’ll be in Hamburg for one week and hopefully able to finally write about my XMPP-Bot called MessageMate.rb. In the meantime, you are of course allowed to check it out on your own, the Readme provided on GitHub should provide you with some directions. Saturday, May 2nd then, I’m departing for RailsConf 09, which hopefully will be a blast like the last two RailsConfs in Portland, which I thankfully was able to attend. I’m not looking forward to Vegas as a city though, Portland was really impressive and I hope that I can get back there some day :)

1 Comment more...

Ruby, Rails, RHTML and Shoulda Snippets for gedit

by Christoph Olszowka on Apr.10, 2009, under Ubuntu, rails, ruby

Gedit is the built-in text editor of Gnome. It is really straight-forward and no-bs, so it is my favorite environment for coding, since I prefer things to be really snappy rather than standing in my way.

It has a built-in snippets plugin which allows for easy expanding of your predefined shortcuts into the actual method name by hitting TAB – very much like TextMate or plenty of other editors that have such a feature. The snippets for Ruby supplied by default are pretty sloppy and incomplete though, so I’ve built my own.

They feature not only the default Ruby def, class, if (…) statements, vastly improved compared to the original ones supplied with gedit, but also ActiveRecord validations, associations, ActionController before filters, ERB, and Shoulda macros. For example, sstft<TAB> will expand to should_set_the_flash_to :( cursor_position).

Please check the command cheatsheet on the corresponding github page and have a look at the documentation in the Readme supplied in the Github repository for instructions on how to install them, which basically are two shell commands

If you need to set up mime-types and syntax highlighting for Ruby and friends, please also check out these two articles, which are a tad dated but still should lead to a working setup for your coding galore:

In the Readme on Github, I also supplied a couple of rules that I am trying to stick to when writing new snippets. Feel free to fork the repository, add Snippets and send me a pull request!

And to make things even fancier, here is a sweet little video demonstration of some of the snippets:

7 Comments :, , , , , , more...

Another state machine for Ruby

by Christoph Olszowka on Mar.09, 2009, under Uncategorized

Aaron Pfeifer from PluginAWeek has released a pretty decent state machine today. It’s got plenty of neat features like before- and after-transition hooks, state machine namespacing and the ability to add multiple state machines to a single class, integration with ActiveRecord, DataMapper and Sequel, the possibility to add validations to your model in certain states and, last but not least, an automated GraphViz visualization generator, which will give you a nice little drawing of your state machine.

I will definetely check this out next time I need a state machine.

Leave a Comment more...

Introducing ActiveRecord Skeleton

by Christoph Olszowka on Feb.21, 2009, under ruby

It’s common knowledge that ActiveRecord can be used nicely without Rails in Ruby apps. Setting up the basic stuff is pretty easy by just requiring the activerecord gem in your app and defining a couple of models.

But what about migrations, yaml config and different environments? You have to set all this up manually, and even though this is not really hard, it’s still a time-consuming task. No more!

Enter: ActiveRecord Skeleton

I published a new project on GitHub today, called ActiveRecord Skeleton, and it really is just that: It will instantly give you YAML db config, database migrations (including Rake tasks for migrating the database as well as generating new migrations), a Rails-style project directory structure, and also the option of using environments by specifying the RACK_ENV environment variable. Why RACK_ENV? Well, you might also see this as a super-minimalist web app template, allowing you to set up a db-backed Sinatra (just an example, anything should work really) app instantly. All you really got to do is get the skeleton and add an application.rb file containing the following:

require 'sinatra'
require 'init'

get '/' do
  User.all.map {|u| u.name}.to_sentence
end

After running application.rb and pointing your browser to localhost:4567, you will see the list of existing users (assuming you’ve got the database and model set up properly, of course).

Want to create a user? Start irb, do a require 'init' followed by User.create.

This skeleton is really minimalist, as I didn’t want it to be over-opinionated. It’s meant to give an easy start for about any Ruby code you might want to have database-interaction with and is ready to go with sqlite 3 in the default setup, but you really can use it with any database ActiveRecord supports.

As a consequence of the minimalist approach, the skeleton does not supply tasks or folders for tests. The reason for this is simply that I did not want to force users of the skeleton into using a certain testing library. Test::Unit, Shoulda, RSpec, (your favorite testing framework mentioned here), just pick your favorite and add it your project. This is by no means a suggestion to ditch testing altogether though. You’re just supposed to pick your flavour of TDD or BDD.

Now head over to GitHub and give it a spin!

Leave a Comment :, , , more...

Giraffesoft releasing Gems and Plugins this week

by Christoph Olszowka on Feb.17, 2009, under ruby

The folks at Giraffesoft have decided to release some of the common code they’ve been using in their projects into plugins and gems on their brand-new company blog. In their own words:

At giraffesoft, we’re big believers in extracting functionality sooner rather than later. This practice has resulted in a ton of code that we use in all of our projects — nice and DRY.

Only problem is, we never get around to releasing this stuff. Starting a blog seemed like a good excuse to spend some time polishing up some code and, you know, writing READMEs.

So, starting today, we’ll be releasing an open source project every day this week. They’ll probably be mostly rails plugins. But, you never know. Something else might float in.

Actually, something else did float in right on the first day: Classy Resources for Sinatra, a gem allowing you to create restful web services that can be consumed by ActiveResource without manually defining all of the controller actions, but rather with a (very Railsish) configuration-style method:

define_resource :posts, :member => [:get, :put, :delete],
:collection => [:get, :post],
:formats => [:xml, :json, :yaml]

The thing is pretty customizable and even if it’s not exactly what you need, it still might be interesting to investigate the source code to see how to refactor common code into modules in Sinatra.

If you don’t know Sinatra yet, you really should go and check it out at Github and have a look at the Sinatra book.

Leave a Comment :, , , more...

RDoc index for your Gems

by Christoph Olszowka on Feb.13, 2009, under Ubuntu, ruby

I just posted a tiny script on gist.github.com I wrote recently for usage on my dev machine that will create a HTML index for your locally installed RubyGems because I got really tired of having to browse through extraordinarily long paths to get to that local RDoc for ActiveRecord 2.0.2.

Just generate the index with the script, bookmark the index.html file in the output directory and get immediate access to your local RDocs. You might also want to put the script into a cron job for automatic updating.

Here’s a screenshot of the index in action on my machine:
local gem rdoc index thumb

The code is certainly not beautiful or anything, but it works for me and hopefully for you too!

Get the thing here: Local RDoc Index Generator

2 Comments :, , , , , , more...

Looking for something?

Use the form below to search the site:

Recommended read!

A few highly recommended sites...