Zuhao has been maintaining the app for quite some time now, with recent changes the port to [https://github.com/zuhao/isitfedoraruby/tree/rails4 rails4]. That said, an important amount of work is already done. From my side I will try to find if the existing code needs any refinement.

==Write tests==

==Write tests==

Revision as of 23:07, 20 March 2014

isitfedoraruby.com is a web-application built with Ruby on Rails, that keeps track of the Fedora/Ruby integration, especially gem -> rpm conversion.

The project was started on 2012 as a Google Summer Of Code project by User:Zuhao and later were added some new features during the Google Code In program. This is my idea of enhancing it from a packager's point of view.

An overview of your proposal

isitfedoraduby is a nice project that never got the attention it deserved. I believe this is because it serves merely as a portal of the gems packaged for Fedora, showing their statuses and some nice statistics and graphs.

Being a packager myself for almost a year now, I am familiar with the difficulties one has to overcome in order to package a gem. This idea aims to facilitate the packaging process by providing some new tools and promote the site among Fedora ruby packagers.

The need you believe it fulfills

These enhancements will hopefully promote the site usage among Fedora ruby packagers and attract new ones.

For new packagers

Based on my experience as a new rubygem packager a year ago, I have compiled some useful information for the packaging process that would help new users to engage in ruby packaging much quicker than I did. You can read a draft here. This will be accessed through a special docs page on isitfedoraruby.com and could be edited with pull requests in the github repo.

I also plan to document the workflow a packager follows to build/update a gem, the tools needed to achieve this and the ones that would make the process easier, e.g. using the polisher gem and its binaries.

Of course documentation is not the only important thing, new packagers could also use the advanced features I describe below.

For existing packagers

The new enhancement that I have in mind for the gemfile_tool will help packagers that want to package an application with many dependencies. For example, Gitorious and GitLab are two big rails projects with over 100 dependencies each. The way gemfile_tool is now implemented isn't of much use. Using the polisher gem we can enhance it to depict the dependencies in a nice format (eg. table), export to json, display only the runtime dependencies, etc.

Any relevant experience you have

How you intend to implement your proposal

Refactor basecode where needed

Zuhao has been maintaining the app for quite some time now, with recent changes the port to rails4. That said, an important amount of work is already done. From my side I will try to find if the existing code needs any refinement.

Write tests

The current test suite is almost non-existent. I will use:

rspec for models/controllers

factory_girl for feeding tests

capybara to simulate users' interaction with the app

selenium-webdriver to test javascript interactions

For views I will use feature specs. Existing minitest tests will be replaced with rspec ones.

As a first step, I will make a list of things that need testing, as well as reporting some existing bugs that will be added to the tests to avoid future repetition.

Enhance gemfile_tool

gemfile_tool has the ability to parse a given Gemfile{,.lock} and tell you whether the gems found are already packaged and in what Fedora versions. In its current implementation it uses a hacky way to calculate the gems. Also, it has the drawback that it uses cached versions of Fedora's repos.

On the other hand, using the polisher gem we can query a bunch of services (koji,buzilla,rubygems.org) on the fly and learn about the status of the gems at the given time.

As an enhancement, you will be able to see a table like the one I keep track of GitLab's dependencies.

Show the packaging progress of a rails app or a gem

A separate page that shows the packaging progress of a gem will be provided.

Scenario

The packager submits a Pull Request on the issue tracker providing a yml file. When the patch gets merged and deployed to production, a new page will be created depicting the packaging progress of this certain gem.

Implementation

The yml file will contain information of the gem name as per the review request and the bugzilla issue number. Each time the gem page gets loaded, it will query koji for rawhide builds and bugzilla for any Blocks issues. If we have those two values we can calculate how many dependents gems there are not yet or already packaged.

A nice progress bar with the percentage of gem packaging completion will be provided as well. For each gem that gets in rawhide, the progress bar gets a little further. There can also be a number of other cool info in the page, like links to bugzilla requests so that someone could lend a hand, etc.

TODO Add mockup or scrot(ex from gitlab's milestone)

Future enhancement

At first I will focus on implementing this for a single gem but later it can be extended to track the progress of a rails app.

Enhance dependency checker

The current representation of a gem's dependencies is in a tree format, not very handy if you want to extract information.

Influenced by https://www.gemlou.pe, I plan to implement a similar representation and show the dependencies in a more elaborate way, for example in a table format like:

gem1
|- gem2
|- gem3
|- gem4

This feature will also be available for gems not yet packaged, with an extra addition: one could find out which gem should start packaging first, that is this that has no dependencies or its dependencies are already packaged. For example consider a gem with three dependencies (children) and each of them has some children as well.

Implementing a breadth-first search algorithm we can move along and see whether the children nodes are packaged. Starting with gem2, since it is packaged, that implies that its children are also packaged so we move on to the next gem3. Following this process we can tag which gems are free of dependencies, so that they could be packaged first and build up the chain.

Special pages

Pages that would help the user experience are:

list of gems pending review

list of gems already assigned but stagnated for too long

list of gems pending review and marked as NEEDSPONSOR

All these can be queried from bugzilla through the ruby-bugzilla gem.

RSS feeds

To make it easy to follow up
rss for one's packages with categories:

not up-to-date

pending review

etc

A rough timeline for your progress

27/03 - 27/04

The first month I will study the codebase, get in touch with the current maintainers and straighten out any queries I might have. During this time, I will also decide which parts might need a cleanup.