Hector G. Parra

Notes &

GitHub is good for Ruby-SerialPort

I use Git and GitHub for various private projects, but its power came into use for a public one that’s been a little lonely.

ruby-serialport is a ruby library for accessing serial (RS-232) ports. I use ruby-serialport for Martinelli (Telios), a RESTful web service that allows you to control any serial port device over HTTP by using specification written in JavaScript.

Work on ruby-serialport began in 2002 by Guillaume Pierronnet (moumar) and “Tom”. The majority of the work, including Windows support, was complete by version 0.6 in 2003. Daniel Shipton (dshipton) made it a gem.

Originally a Concurrent Versions Systems (CVS) repository, it was converted to Subversion (SVN) in 2002. The repository and code is hosted on RubyForge, with a 0.7.0 release, where it has stayed for over a year.

Two related problems came about: changes needed to be made but changes couldn’t be made. There were bugs to be fixed, but the nature of centralized version control like CVS and SVN prevents people from hacking and just plugging changes back in. You first need access to the repo, then you need to make sure no one else was working on a particular file, then the project administrator needs to release it. RubyForge follows this exact methodology.

Git changes all this. Since its a distributive version control system every person has a copy of the repository and they may do what they wish with it. Like a tree, you can branch out at any point in the repository’s history to make changes. Aaron Patterson (tenderlove) imported the repository to GitHub, but Tobin Richard (toholio) immediately branched it and began fixing bugs and added a missing feature. I then branched off of him to add MinGW support. People branched off me to add Ruby 1.9 POSIX support, which I merged and fixed to continue 1.8 support. 64-bit support was fixed and we finally got Ruby 1.9 on Windows working.

So Git, and the Git social network and online tool that is GitHub, rock!

With people leaving RubyForge, many are now releasing their gems to Gemcutter. For better or for worse, this recentralizes distribution. I went ahead and released our version as ‘serialport’. It’s been mentioned that Gemcutter may soon have gem distribution that more closely resembles decentralized systems. Until then, ‘serialport’ is the most up-to-date version, and I inadvertently signed up as its maintainer.

I’d like to thank the people who branched me, submitted fixes, and helped test the latest 1.0 release:

Thanks again!

HGP

hparra’s ruby-serialport at GitHub

Filed under code