ruby gem polisher

Mohammed Morsi mmorsi at redhat.com
Thu Jan 14 18:18:59 UTC 2010


Hey to start off, anyone that missed it on Fedora Planet should read 
Pavol Rusnak's excellent blog post 
(http://stick.gk2.sk/blog/2010/01/gemcutter-opensuse-build-service-cooperation-idea/) 
about the state of rubygems, specifically with gemcutter becomming the 
official rubygems source 
(http://update.gemcutter.org/2009/10/26/transition.html) and the 
introduction of the new gemcutter webhook API to register callbacks to 
be invoked upon gem updates 
(http://gemcutter.org/pages/api_docs#webhook). Also discussed is 
gem2rpm, which automatically converts a gem to a rpm specfile / srpm, 
and the need of a tool to bind those two components together.

Introducing Polisher which does just that, a rails based webapp that 
allows a user to add any number of gem sources, customize the packages 
they want to track, and register handlers to be invoked on certain gem 
events. Currently I have handlers to simply send an email, and/or 
generate a rpm artifact from the gem, and the interface is extensible 
enough so that anyone can add any event handler easily. I am currently 
working on a module that will automatically submit a bugzilla request 
for the gem/rpm. This will entail a feature akin to the 'dirty bit' 
discussed in Pavol's blogpost, for packages that need extra maintenance 
before submission, but polisher will still assist in the process in any 
case (and its possible we can develop a maintenance automation system 
which runs a maintainer's scripts to make changes to the package before 
bugzilla submission).

It is still early in development, the current state is the result of 
only a few days of coding, but I think it's already useful for the Ruby 
-> Fedora process. Lots of things still need to be added, there is 
no-multiuser support currently for example, but I'm already able to 
register callbacks for gemcutter gems, which upon being updated, get 
invoked.

Polisher is a webapp since the gemcutter webhook API takes a http url 
which to invoke w/ POST params upon a gem update. Whoever will want to 
run this will need a public-facing domain to do so. I put a copy up on 
my personal domain, feel free to give it a try, just please don't try to 
stress test it ;-) (and forgive the simplistic interface, was going for 
functional/quick).

http://projects.morsi.org/polisher/demo

At some point, if this takes off, it would be awesome to get some 
hosting space for the Fedora community, and to setup an automated 
Ruby->Fedora workflow engine, w/ maintainer intervention at the 
appropriate points. Also what are everyone's thoughts on a dedicated 
rubygem yum repository for Fedora, something that could be optionally 
added by any user independently of the core Fedora repos and have all 
the greatest / latest versions of all the rubygems. Just a random idea 
that I had, not sure about the feasibility / everything that would be 
entailed.

The polisher source is licensed under the gpl and can be downloaded from 
github:

    http://github.com/movitto/polisher

I also pushed the polisher gem to the gemcutter repo and you can install 
it w/

    gem install polisher

provided you have a recent enough version of rubygems (w/ gemcutter 
officially part of the repo list).

Feel free to send any thoughts or questions to me on/off list.

    -Mo



More information about the ruby-sig mailing list